Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 71531 articles
Browse latest View live

How to generate a JPG image from html

$
0
0

@jose_inesta wrote:

Hi,

I would like to render an image from a html information, in order to share it later via SocialSharing.

How can I create a JPG image? is there any cordova plugin or javascript ionic compatible library?

Thanks in advance.

Posts: 1

Participants: 1

Read full topic


Save files to device storage ionic

$
0
0

@imadi wrote:

Hi,

I want to save files to device storage and display them back in UI. Can anyone help me out with this ?

Posts: 1

Participants: 1

Read full topic

DocumentViewer is not working for me

$
0
0

@hissou86 wrote:

Hi,

This is my code:

showDocument() {
var options: DocumentViewerOptions = {
title: ‘A book’,
documentView: { closeLabel: ‘’ },
navigationView: { closeLabel: ‘’ },
email: { enabled: true },
print: { enabled: true },
openWith: { enabled: true },
bookmarks: { enabled: true },
search: { enabled: false },
autoClose: { onPause: false }
}
this.docViewer.viewDocument(‘assets/arabic.pdf’, ‘application/pdf’, options);
}

Fo course I did not forget to import :slight_smile:

import { DocumentViewer,DocumentViewerOptions } from ‘@ionic-native/document-viewer’;

And in the HTML:

I added a button to call the function.

But when I run it (emulation), the click does not make any action (the triggering works fine since I added an Alert and it showed up).

What am I missing??

ioni_info

Posts: 1

Participants: 1

Read full topic

Ion-select button background at top of page

$
0
0

@dhook wrote:

I am trying to use an ion-select on a page (for the size field on this page). The button background for the ion-select ends up displaying a black button background at the top of the page (under the Item Details) which partially covers the field at the top of the page. I am not sure what CSS attribute this is to make is transparent or white. The same thing happens when I added an ion-select to other pages.

Thanks in advance.

image

Posts: 1

Participants: 1

Read full topic

Upload app Google Play Store / Apple Store

$
0
0

@IonicZb wrote:

Hello,
I have an app developed for internal use of my company, that can be access by username/password. The accounts are not created in the app but in separate web module.
Does anyone know if I can upload it on Google Play Store / App Store ?
Thanks.

Posts: 1

Participants: 1

Read full topic

Cannot Push Notification with Firebase FCM in ios

$
0
0

@huynhcr wrote:

Hello everybody. I am working on Notification Push with Firebase FCM. But I do it on Android is OK. On the IOS, I can not add the phonegap-plugin-push or cordova-plugin-fcm. I add on Android then OK on the IOS is error. Who knows why. Please help me. Thank you very much.

Posts: 1

Participants: 1

Read full topic

Peerinvalid errors after updating ionic 3

$
0
0

@artemorlov wrote:

Hello!

Recently I’ve updated my ionic configuration to ionic@latest and got ‘peerinvalid’ errors for angular package. Please tell me how to satisfy the required dependencies:

$ ionic cordova platform add android
> cordova platform add android --save
✖ Running command - failed!
[ERROR] Exception: Using cordova-fetch for cordova-android@^6.3.0

        Error: Failed to fetch platform cordova-android@^6.3.0
        Probably this is either a connection problem, or platform spec is incorrect.
        Check your connection and platform name/version/URL.
        Error: npm: Command failed with exit code 1 Error output:
        npm ERR! Linux 3.16.0-4-amd64
        npm ERR! argv "/home/artem/.nvm/versions/node/v6.11.4/bin/node"
        "/home/artem/disk2/Projects/AcroLink/Client/Mobile/node_modules/.bin/npm" "install" "cordova-android@^6.3.0"
        "--production" "--save-exact"
        npm ERR! node v6.11.4
        npm ERR! npm  v2.15.12
        npm ERR! code EPEERINVALID

        npm ERR! peerinvalid The package @angular/common@4.4.6 does not satisfy its siblings' peerDependencies
        requirements!
        npm ERR! peerinvalid Peer @angular/forms@4.4.6 wants @angular/common@4.4.6
        npm ERR! peerinvalid Peer @angular/platform-browser@4.4.6 wants @angular/common@4.4.6
        npm ERR! peerinvalid Peer @angular/platform-browser-dynamic@4.4.6 wants @angular/common@4.4.6
        npm ERR! peerinvalid Peer ionic-angular@3.0.1 wants @angular/common@4.0.0

        npm ERR! Please include the following file with any support request:
        npm ERR!     /home/artem/disk2/Projects/AcroLink/Client/Mobile/npm-debug.log
$ ionic info

cli packages: (/home/artem/disk2/Projects/AcroLink/Client/Mobile/node_modules)

    @ionic/cli-utils  : 1.13.1
    ionic (Ionic CLI) : 3.13.2

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.0.0
    Cordova Platforms  : none
    Ionic Framework    : ionic-angular 3.0.1

System:

    Android SDK Tools : 26.1.1
    Node              : v6.11.4
    npm               : 2.15.12
    OS                : Linux 3.16

Misc:

    backend : legacy

npm-debug.log

2579 info install cordova-android@6.3.0
2580 info postinstall cordova-android@6.3.0
2581 verbose unlock done using /home/artem/.npm/_locks/cordova-android-662ced93f6303832.lock for /home/artem/disk2/Projects/AcroLink/Client/Mobile/node_modules/cordova-android
2582 verbose validateInstall loading /home/artem/disk2/Projects/AcroLink/Client/Mobile/package.json for validation
2583 verbose stack Error: The package @angular/common@4.4.6 does not satisfy its siblings' peerDependencies requirements!
2583 verbose stack     at /home/artem/disk2/Projects/AcroLink/Client/Mobile/node_modules/npm/lib/install.js:125:32
2583 verbose stack     at /home/artem/disk2/Projects/AcroLink/Client/Mobile/node_modules/npm/lib/install.js:268:7
2583 verbose stack     at /home/artem/disk2/Projects/AcroLink/Client/Mobile/node_modules/npm/node_modules/read-installed/read-installed.js:142:5
2583 verbose stack     at /home/artem/disk2/Projects/AcroLink/Client/Mobile/node_modules/npm/node_modules/read-installed/read-installed.js:263:14
2583 verbose stack     at cb (/home/artem/disk2/Projects/AcroLink/Client/Mobile/node_modules/npm/node_modules/slide/lib/async-map.js:47:24)
2583 verbose stack     at /home/artem/disk2/Projects/AcroLink/Client/Mobile/node_modules/npm/node_modules/read-installed/read-installed.js:263:14
2583 verbose stack     at cb (/home/artem/disk2/Projects/AcroLink/Client/Mobile/node_modules/npm/node_modules/slide/lib/async-map.js:47:24)
2583 verbose stack     at /home/artem/disk2/Projects/AcroLink/Client/Mobile/node_modules/npm/node_modules/read-installed/read-installed.js:263:14
2583 verbose stack     at cb (/home/artem/disk2/Projects/AcroLink/Client/Mobile/node_modules/npm/node_modules/slide/lib/async-map.js:47:24)
2583 verbose stack     at /home/artem/disk2/Projects/AcroLink/Client/Mobile/node_modules/npm/node_modules/read-installed/read-installed.js:263:14
2584 verbose cwd /home/artem/disk2/Projects/AcroLink/Client/Mobile
2585 error Linux 3.16.0-4-amd64
2586 error argv "/home/artem/.nvm/versions/node/v6.11.4/bin/node" "/home/artem/disk2/Projects/AcroLink/Client/Mobile/node_modules/.bin/npm" "install" "cordova-android@^6.3.0" "--production" "--save-exact"
2587 error node v6.11.4
2588 error npm  v2.15.12
2589 error code EPEERINVALID
2590 error peerinvalid The package @angular/common@4.4.6 does not satisfy its siblings' peerDependencies requirements!
2590 error peerinvalid Peer @angular/forms@4.4.6 wants @angular/common@4.4.6
2590 error peerinvalid Peer @angular/platform-browser@4.4.6 wants @angular/common@4.4.6
2590 error peerinvalid Peer @angular/platform-browser-dynamic@4.4.6 wants @angular/common@4.4.6
2590 error peerinvalid Peer ionic-angular@3.0.1 wants @angular/common@4.0.0
2591 verbose exit [ 1, true ]

Posts: 1

Participants: 1

Read full topic

Error: Uncaught (in promise): Error: No provider for AngularFireDatabase!

$
0
0

@jourthoma wrote:

I m beginner in Ionic 3. Right now I’m trying to connect to firebase , but I get Error: Error: Uncaught (in promise): Error: No provider for AngularFireDatabase! (please see the photo attached)
i have the last version !
Runtime Error
Uncaught (in promise): Error: No provider for AngularFireDatabase! Error: No provider for AngularFireDatabase! at injectionError (http://localhost:8100/build/vendor.js:1526:90) at noProviderError (http://localhost:8100/build/vendor.js:1564:12) at ReflectiveInjector_.throwOrNull (http://localhost:8100/build/vendor.js:3006:19) at ReflectiveInjector.getByKeyDefault (http://localhost:8100/build/vendor.js:3045:25) at ReflectiveInjector.getByKey (http://localhost:8100/build/vendor.js:2977:25) at ReflectiveInjector.get (http://localhost:8100/build/vendor.js:2846:21) at resolveNgModuleDep (http://localhost:8100/build/vendor.js:9846:25) at NgModuleRef_.get (http://localhost:8100/build/vendor.js:10934:16) at resolveDep (http://localhost:8100/build/vendor.js:11437:45) at createClass (http://localhost:8100/build/vendor.js:11293:91)
Stack
Error: Uncaught (in promise): Error: No provider for AngularFireDatabase!
Error: No provider for AngularFireDatabase!

Posts: 1

Participants: 1

Read full topic


Ionic 3 - How to intercept dynamic links

$
0
0

@felipefda wrote:

Hello guys,

I was searching the entire Forum and google and I didn’t found a solution for this problem.

We have an Ionic 2 (now 3) App that integrate our software (communication solution) with Android and IOS. I’m grateful that Ionic help me with, for sure. My app is pretty much load webservices (REST) from our main platform and loading into the app.

In this specific part I have a json content load that can include some html features inside it . Like emoctions (that’s ok) and links that user put in when it’s posting. This links is basically http://www.mydomain.com/profile/userid , like facebook feature (mark friends).

When my app is running the app tried to open in Browser this links, but I want to intercept them and open with NavController to push my profile page inside App.

So I need to look inside a json variable (innerHTML) to find this links and split them to get the Id and open inside my App, replace this external clicks.

What I tried:

I tried to treat with replace before show the inner html

funReplaceMarkedUsers(text){
return text.replace(/href=/gm, “(click)=funPushProfile()”);
}

Ionic seemed to not understand this live change and call the function.

I think if I find a way to intecept the click is better. Like is dynamic generated I can’t change this links before to put some click function.

I found some problems like mine:


http://intown.biz/2014/03/30/cordova-ionic-links-in-browser/

But every solution is with Ionic 1.

Anyway. I’m not the person who asks for help without search all the situation and tried a lot to find solutions, but nothing seems to help me. Anyone has any idea how to solve problems like this?

I appreciate any help you can provide for me.

Thanks

Posts: 1

Participants: 1

Read full topic

Error logging with Sentry.io and Sourcemap

$
0
0

@mburger81 wrote:

We tried to integrate sentry.io in our ionic3 app, anything is working fine expecting on production releases, the error logged to sentry is the production code and not mapped with our upploaded sourcemap.

We created our production build for android in this way:
ionic cordova build android --prod --release

Using app-scripts 3.0.0 the sourcemap should be under the new .sourcemaps folder, so we upload the files for release in this way:
sentry-cli releases -o blabla -p blabla files 0.0.10 upload-sourcemaps --url-prefix / .sourcemaps

We configure Raven like this:

Raven
    .config(
        'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        {
            release: '0.0.10',
            dataCallback: data => {

                if (data.culprit) {
                    data.culprit = data.culprit.substring(data.culprit.lastIndexOf('/'));
                }

                var stacktrace = data.stacktrace ||
                                    data.exception &&
                                    data.exception.values[0].stacktrace;

                if (stacktrace) {
                    stacktrace.frames.forEach(function (frame) {
                        frame.filename = frame.filename.substring(frame.filename.lastIndexOf('/'));
                    });
                }
            }
        }
    )
    .install();

But at the end we are always running on error notification without sourcemap, like this:

Can anyone help?

Posts: 1

Participants: 1

Read full topic

My ios app stuck on splash screen

$
0
0

@Abmnukmr wrote:

ionic info

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.13.1
ionic (Ionic CLI) : 3.13.1

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 1.3.4
Cordova Platforms  : android 6.2.3 ios 4.5.2
Ionic Framework    : ionic-angular 2.0.0-rc.5-201701232249

System:

ios-deploy : 1.9.2
Node       : v6.11.4
npm        : 3.10.10
OS         : macOS High Sierra
Xcode      : Xcode 9.0.1 Build version 9A1004

Misc:

backend : pro

Abhimanyus-MacBook-Pro:Vioti abhimanyukumar$

Posts: 1

Participants: 1

Read full topic

Ionic PWA - service worker

$
0
0

@manoemerson wrote:

Hi,

Today I added few more features to my PWA and created a production build. But when I tried to test it on the production environment, my service worker file was not updated. Hence it refers my old versions of - index.html, main.js, main.css and polyfill.js files. It was weird completely

Any suggestion… Thanks in advance!

regards,
Mano

Posts: 1

Participants: 1

Read full topic

Cannot Emulate IOS after signing app for iPhone

$
0
0

@jlmilner wrote:

Hi, I’m running into an issue that I can’t seem to solve by simply google-ing around.

I am running ionic and everytime I try to run an ios emulate after I have installed the app to my phone to test I get the following error.

/usr/local/bin/ionic cordova run --confirm --no-interactive --emulator ios -lc
[WARN] Multiple network interfaces detected!

       You will be prompted to select an external-facing IP for the livereload server that your device or emulator has access to.
       You may also use the --address option to skip this prompt.


[INFO] Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --consolelogs --nobrowser --iscordovaserve --platform ios --target cordova - Ctrl+C to cancel
[09:36:33]  watch started ...
[09:36:33]  build dev started ...
[09:36:33]  clean started ...
[09:36:33]  clean finished in 2 ms
[09:36:33]  copy started ...
[09:36:34]  deeplinks started ...
[09:36:34]  deeplinks finished in 22 ms
[09:36:34]  transpile started ...
[09:36:36]  transpile finished in 2.62 s
[09:36:36]  preprocess started ...
[09:36:36]  copy finished in 2.77 s
[09:36:36]  preprocess finished in 67 ms
[09:36:36]  webpack started ...
[09:36:42]  webpack finished in 6.24 s
[09:36:42]  sass started ...
[09:36:43]  sass finished in 848 ms
[09:36:43]  postprocess started ...
[09:36:43]  postprocess finished in 5 ms
[09:36:43]  lint started ...
[09:36:43]  build dev finished in 9.93 s
[09:36:43]  watch ready in 9.96 s
[09:36:43]  dev server running: http://localhost:8100/

[INFO] Development server running!
       Local: http://localhost:8100
       External: http://192.168.3.200:8100, <REDACTED>

> cordova run ios --emulator
Error: Cannot read property 'indexOf' of null
[ERROR] An error occurred while running cordova run ios --emulator (exit code 1).

Here’s my ionic info. This is on an ionic blank project.

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.11.0
    ionic (Ionic CLI) : 3.11.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.0.0
    Cordova Platforms  : browser 5.0.1 ios 4.5.2
    Ionic Framework    : ionic-angular 3.7.1

System:

    ios-deploy : 1.9.2
    ios-sim    : 6.1.2
    Node       : v8.7.0
    npm        : 2.15.12
    OS         : macOS Sierra
    Xcode      : Xcode 9.0 Build version 9A235

Misc:

    backend : pro

I think it may have to do with my config.xml but I can’t find a solution and I’ve been blocked for 6 hours now.

Posts: 1

Participants: 1

Read full topic

Change side menu items depending on logged in user

$
0
0

@kkoych wrote:

Hello, I have an app with a side menu and a user login. Each user has a role and each role has it’s own associated menus. The menus are loaded trough a REST API.

So far I’ve made it work somewhat by having checks in the app.component constructor and depending on the role it loads different menus, but this has the drawback of not updating after a user logs out and a user with a different role logs in - it keeps the loaded menus from the previous user.

this.storage.get('loggedIn')
.then((loggedIn) => {
  this.loggedIn = loggedIn;

  if (this.loggedIn) {

    this.rootPage = 'HomePage';
    this.storage.get('user')
      .then((storage) => {
        this.userService.getUser(storage.id)
          .subscribe(user => {
            this.loadMenus(user.role.toString(), ['role']);
          })
      });
  } else {
    this.rootPage = 'LoginPage';
  }
  this.initializeApp();
});

This is the code in my app.component constructor. loadMenus sets menus variable with the returned menus depending on role. I was thinking that I need to just set menus = [], but I don’t know where to do it.

Posts: 3

Participants: 3

Read full topic

Ionic 1 --> ui-sref linking issue

$
0
0

@cpdev wrote:

I’m having a hard time having the app change views and looking for some help. This is my code below. When clicked it does nothing.

html

 <ion-list>
	 <ion-item class="coll pic-banner" ng-style="{'background-image': 'url(img/fran.png)'}">
	  <a herf="#" ui-sref="tab.welcome"><h1>Welcome!</h1></a>
	 </ion-item>
</ion-list>

app.js

   .state('tab.welcome', {
                        url: '/welcome',
                        views: {
                            'tab-welcome': {
                                templateUrl: 'templates/tab-welcome.html',
                                controller: 'WelcomeCtrl'
                            }
                        }
                    })

controllers.js

.controller('WelcomeCtrl', function($scope, $stateParams, $ionicScrollDelegate) {
})

Posts: 1

Participants: 1

Read full topic


Open the closed app, feature like whatspp video call

$
0
0

@vasanthb wrote:

Hi, I want to achieve a feature like WhatsApp video calling in my app. Even when the app is closed it should get a trigger from the server and open the app. Can anyone let me know how can I achieve this Ionic?

Posts: 1

Participants: 1

Read full topic

BLE reading on TI C2650

$
0
0

@gsoulie wrote:

Hi all,

I am starting playing with the BLE Texas Instrument C2650 SensorTag, and all does not work as i wish:)

I am using ionic-native BLE plugin, the device scanning is working like a charm :

I also can connect to my sensor and retrieve the list of the services and characteristics :

But i have some problems to read some characteristics. Here is my reading function :

onReadCharacteristic(deviceID, service, characteristic){

    this.ble.read(deviceID,service,characteristic).then(
        function(buffer){
            var databuffer = new Uint8Array(buffer);
            alert("buffer " + String.fromCharCode.apply(null,databuffer));
        }
    )}

It works well when i tryc to read the Device Information service 0x180A, the buffer return me the good informations (device name, manufacturer name, device number etc…).

But when i try to read the Battery Service 0x180F (characteristic 0x2A19) for example, the buffer return me a strange thing like “[” :

And for other services the result can be nothing or really strange results like below :

I searched a lot but i only found topics which deals with the scan or connection with device but not about reading characteristics…

Anyone have an idea ?

Posts: 3

Participants: 3

Read full topic

Ionic cordova platform add android - Unsupported proxy protocol : "xxx.xx.xx.xxx"

$
0
0

@inesgomes wrote:

ionic cordova platform add android
> cordova platform add android --save
√ Running command - done!
> ionic cordova resources android --force
√ Collecting resource configuration and source images - done!
√ Filtering out image resources that do not need regeneration - done!
× Uploading source images to prepare for transformations - failed!
TypeError: unsupported proxy protocol: "xxx.xx.xx.xxx"
    at new ProxyAgent (C:\Users\estagiario2\AppData\Roaming\npm\node_modules\@ionic\cli-plugin-proxy\node_modules\proxy-agent\index.js:109:11)
    at ProxyAgent (C:\Users\estagiario2\AppData\Roaming\npm\node_modules\@ionic\cli-plugin-proxy\node_modules\proxy-agent\index.js:81:45)
    at Request.proxy (C:\Users\estagiario2\AppData\Roaming\npm\node_modules\@ionic\cli-plugin-proxy\node_modules\superagent-proxy\index.js:71:15)
    at Object.<anonymous> (C:\Users\estagiario2\AppData\Roaming\npm\node_modules\ionic\node_modules\@ionic\cli-utils\lib\http.js:31:17)
    at next (native)
    at fulfilled (C:\Users\estagiario2\AppData\Roaming\npm\node_modules\ionic\node_modules\tslib\tslib.js:100:62)
    at process._tickCallback (internal/process/next_tick.js:109:7)

Any help?

Posts: 1

Participants: 1

Read full topic

Send Geolocation Data to Firebase(how to assing it)

$
0
0

@lifesuxtr wrote:

Im trying to send user location data when user press sendmessage button.so each message in db will have location data.

This is model:

export interface Message{
    $key?: string,
    message: string,
    locationlat: number,
    locationlong: number
}

The problem is im assigning message with using ngModel in html file.But how do i assing locationlat and locationlong with data?

    import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import {AngularFireAuth} from 'angularfire2/auth';
import {AngularFireDatabase,FirebaseListObservable} from 'angularfire2/database';
import {Message} from '../../models/message';
import { Geolocation } from '@ionic-native/geolocation';



@Component({
  selector: 'page-newpost',
  templateUrl: 'newpost.html'
})
export class NewPostPage {
  message = {} as Message;

    messageRef$ : FirebaseListObservable<Item[]>;

  constructor(private fire:AngularFireAuth,private db :AngularFireDatabase,public navCtrl: NavController,private geolocation: Geolocation) {
    this.messageRef$ = this.db.list('messages');



}


sendPost(message:Message){
  this.geolocation.getCurrentPosition().then((resp) => {
      var lat =resp.coords.latitude;
    var long =resp.coords.longitude;
    console.log(lat);
    console.log(long);
  }).catch((error) => {
    console.log('Error getting location', error);
  });



  const promise =  this.messageRef$.push({
          message : message.message,
          //locationlat : , //need to fix them
          //locationlong :
      });
      promise
          .then(_ => {
              console.log('message added');
              this.message = {} as message;

          } )



}


}

Posts: 2

Participants: 2

Read full topic

CSS image with relative path not working when build with --prod flag

$
0
0

@Portabilis wrote:

Hi,

when i build my app without the flag --prod or when i test with ionic serve in the browser, the css images are displayed correctly, but when i build for production the images are not displayed. There’s my css:

/*src/pages/app-index/app-index.scss*/
.tab-button-icon[ng-reflect-is-active=false][ng-reflect-name="frequencyicon"] {
  content: url("../assets/img/tabs/iconTabbarLfInactive@2x.png");
}

Does anyone have an idea to fix it?

Posts: 1

Participants: 1

Read full topic

Viewing all 71531 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>