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

Ionic 3 after "run android" build success but no code gets executed

$
0
0

@ies1 wrote:

Hi there

I hope some one can help me with my problem.
I’m currently developing an app for android and ios. My problem is now, that if I run the app with ionic cordova run android --d it builds successfully. But after the app starts, the root page gets loaded (redirect to AuthPage) but no code gets executed inside of it. On iOS it works fine!

The really strange thing now is, this only happens on the very first “startup” after the build. When I close the app and open it again, it works just fine…

ionic info:

Ionic:

   ionic (Ionic CLI)  : 4.0.3 
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.1.9

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.0.0, ios 4.5.5

System:

   ios-deploy : 1.9.2
   NodeJS     : v8.9.4 
   npm        : 5.7.1
   OS         : macOS High Sierra
   Xcode      : Xcode 10.0 Build version 10A255

Now to the code:

app.component.ts:

constructor(public _plt: Platform,
    ...
  ) {
    this.initializeApp();
  }

initializeApp() {
    this._plt.ready().then(() => {

      let parameterPromise = this.referenceService.init();
      let languagePromise = this.languageService.init();

      // Dynamic menu
      this.menuUtils._menuSubject.asObservable().subscribe(() => {
        this.menuItems = this.menuUtils.getPages();
      });

      // Subscribe to network's onDisconnect event
      this.network.onDisconnect().subscribe(() => {
        //doing some stuff
      });

      Promise.all([parameterPromise, languagePromise]).then((values) => {
        return Promise.resolve();
      })
    }).then(() => {
        return this.nav.setRoot(AuthPage)
  });
}

Now the auth page:

ngAfterViewInit() {
      this._plt.ready().then(() => {
        this.init();
      }).catch(ex => {
        console.error(ex);
      });
}

init() {
    ...
    // the code here never gets executed on initial startup after build on android"
    this._storageUtils.checkDeviceSecure().then(res => {
    ...
   });
}

I can open the source code with chrome://inspect and set a breakpoint inside the init() function of the auth page. Like already said, on the very first startup (initial startup) after building/running the app on a device, it will never get there. After closing the app and open it again, it gets executed and the app works fine. The strangest thing is, that this happens with android only.

Anybody got similar problem or have an idea what I did wrong? :slight_smile:

Posts: 1

Participants: 1

Read full topic


Ionic InAppBrowser open ALL links inAppBrowser

$
0
0

@lickos wrote:

From the documentation of InAppBrowser (https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser)

If you want all page loads in your app to go through the InAppBrowser, you can simply hook window.open during initialization. For example:

document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
    window.open = cordova.InAppBrowser.open;
}

How can i do this in ionic since the function open doesn't exist?
The urls i want to open are dynamic and comes from a server, so i don't know them in advance. 

Posts: 1

Participants: 1

Read full topic

After build apk file ads working with isTesting: true but now working with isTesting: false and admob Id in Ionic

@IonicPage not working in upgraded app

$
0
0

@bpeary wrote:

I have an app that was upgraded from Ionic 2 to Ionic 3. I want to add deeplinks (external URLs that open specific pages in the app), but @IonicPage does not function, but Deeplinker (@IonicPage’s predecessor) works.

If I set up the paths with Deeplinker, will deeplink’s urls work with Deeplinker? Can I get to the correct page?

Also, I my URLs look like this http://localhost:8010/index.html#/top/. How can I get rid of that index.html?

Posts: 1

Participants: 1

Read full topic

Warning: No -tsa or -tsacert is provided and this jar is not timestamped

$
0
0

@gokujy wrote:

Here my cmd result:

D:\ionic\demoAds1>jarsigner -verbose -keystore my-release-key.keystore -storepas
s 123456 -keypass 123456 D:\ionic\demoAds1\platforms\android\app\build\outputs\a
pk\release\app-release-unsigned.apk techno
Picked up _JAVA_OPTIONS: -Xmx512M
 updating: META-INF/MANIFEST.MF
 updating: META-INF/TECHNO.SF
 updating: META-INF/TECHNO.RSA
  signing: AndroidManifest.xml
  signing: assets/www/assets/fonts/ionicons.woff
  signing: assets/www/assets/fonts/ionicons.woff2
  signing: assets/www/assets/icon/favicon.ico
  signing: assets/www/assets/imgs/logo.png
  signing: assets/www/build/main.css
  signing: assets/www/build/main.js
  signing: assets/www/build/polyfills.js
  signing: assets/www/build/sw-toolbox.js
  signing: assets/www/build/vendor.js
  signing: assets/www/cordova-js-src/android/nativeapiprovider.js
  signing: assets/www/cordova-js-src/android/promptbasednativeapi.js
  signing: assets/www/cordova-js-src/exec.js
  signing: assets/www/cordova-js-src/platform.js
  signing: assets/www/cordova-js-src/plugin/android/app.js
  signing: assets/www/cordova.js
  signing: assets/www/cordova_plugins.js
  signing: assets/www/index.html
  signing: assets/www/manifest.json
  signing: assets/www/plugins/cordova-plugin-admob-free/www/admob.js
  signing: assets/www/plugins/cordova-plugin-device/www/device.js
  signing: assets/www/plugins/cordova-plugin-ionic-keyboard/www/android/keyboard
.js
  signing: assets/www/plugins/cordova-plugin-ionic-webview/src/www/util.js
  signing: assets/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js
  signing: assets/www/plugins/cordova-plugin-statusbar/www/statusbar.js
  signing: assets/www/plugins/cordova-promise-polyfill/www/Promise.js
  signing: assets/www/plugins/cordova-promise-polyfill/www/promise.min.js
  signing: assets/www/service-worker.js
  signing: build-data.properties
  signing: classes.dex
  signing: jsr305_annotations/Jsr305_annotations.gwt.xml
  signing: res/color/common_google_signin_btn_text_dark.xml
  signing: res/color/common_google_signin_btn_text_light.xml
  signing: res/color/common_google_signin_btn_tint.xml
  signing: res/drawable-hdpi-v4/common_full_open_on_phone.png
  signing: res/drawable-hdpi-v4/common_google_signin_btn_icon_dark_normal_backgr
ound.9.png
  signing: res/drawable-hdpi-v4/common_google_signin_btn_icon_light_normal_backg
round.9.png
  signing: res/drawable-hdpi-v4/common_google_signin_btn_text_dark_normal_backgr
ound.9.png
  signing: res/drawable-hdpi-v4/common_google_signin_btn_text_light_normal_backg
round.9.png
  signing: res/drawable-hdpi-v4/googleg_disabled_color_18.png
  signing: res/drawable-hdpi-v4/googleg_standard_color_18.png
  signing: res/drawable-land-hdpi-v4/screen.png
  signing: res/drawable-land-ldpi-v4/screen.png
  signing: res/drawable-land-mdpi-v4/screen.png
  signing: res/drawable-land-xhdpi-v4/screen.png
  signing: res/drawable-land-xxhdpi-v4/screen.png
  signing: res/drawable-land-xxxhdpi-v4/screen.png
  signing: res/drawable-mdpi-v4/common_google_signin_btn_icon_dark_normal_backgr
ound.9.png
  signing: res/drawable-mdpi-v4/common_google_signin_btn_icon_light_normal_backg
round.9.png
  signing: res/drawable-mdpi-v4/common_google_signin_btn_text_dark_normal_backgr
ound.9.png
  signing: res/drawable-mdpi-v4/common_google_signin_btn_text_light_normal_backg
round.9.png
  signing: res/drawable-mdpi-v4/googleg_disabled_color_18.png
  signing: res/drawable-mdpi-v4/googleg_standard_color_18.png
  signing: res/drawable-port-hdpi-v4/screen.png
  signing: res/drawable-port-ldpi-v4/screen.png
  signing: res/drawable-port-mdpi-v4/screen.png
  signing: res/drawable-port-xhdpi-v4/screen.png
  signing: res/drawable-port-xxhdpi-v4/screen.png
  signing: res/drawable-port-xxxhdpi-v4/screen.png
  signing: res/drawable-xhdpi-v4/common_full_open_on_phone.png
  signing: res/drawable-xhdpi-v4/common_google_signin_btn_icon_dark_normal_backg
round.9.png
  signing: res/drawable-xhdpi-v4/common_google_signin_btn_icon_light_normal_back
ground.9.png
  signing: res/drawable-xhdpi-v4/common_google_signin_btn_text_dark_normal_backg
round.9.png
  signing: res/drawable-xhdpi-v4/common_google_signin_btn_text_light_normal_back
ground.9.png
  signing: res/drawable-xhdpi-v4/googleg_disabled_color_18.png
  signing: res/drawable-xhdpi-v4/googleg_standard_color_18.png
  signing: res/drawable-xxhdpi-v4/common_google_signin_btn_icon_dark_normal_back
ground.9.png
  signing: res/drawable-xxhdpi-v4/common_google_signin_btn_icon_light_normal_bac
kground.9.png
  signing: res/drawable-xxhdpi-v4/common_google_signin_btn_text_dark_normal_back
ground.9.png
  signing: res/drawable-xxhdpi-v4/common_google_signin_btn_text_light_normal_bac
kground.9.png
  signing: res/drawable-xxhdpi-v4/googleg_disabled_color_18.png
  signing: res/drawable-xxhdpi-v4/googleg_standard_color_18.png
  signing: res/drawable/common_google_signin_btn_icon_dark.xml
  signing: res/drawable/common_google_signin_btn_icon_dark_focused.xml
  signing: res/drawable/common_google_signin_btn_icon_dark_normal.xml
  signing: res/drawable/common_google_signin_btn_icon_disabled.xml
  signing: res/drawable/common_google_signin_btn_icon_light.xml
  signing: res/drawable/common_google_signin_btn_icon_light_focused.xml
  signing: res/drawable/common_google_signin_btn_icon_light_normal.xml
  signing: res/drawable/common_google_signin_btn_text_dark.xml
  signing: res/drawable/common_google_signin_btn_text_dark_focused.xml
  signing: res/drawable/common_google_signin_btn_text_dark_normal.xml
  signing: res/drawable/common_google_signin_btn_text_disabled.xml
  signing: res/drawable/common_google_signin_btn_text_light.xml
  signing: res/drawable/common_google_signin_btn_text_light_focused.xml
  signing: res/drawable/common_google_signin_btn_text_light_normal.xml
  signing: res/mipmap-hdpi-v4/icon.png
  signing: res/mipmap-ldpi-v4/icon.png
  signing: res/mipmap-mdpi-v4/icon.png
  signing: res/mipmap-xhdpi-v4/icon.png
  signing: res/mipmap-xxhdpi-v4/icon.png
  signing: res/mipmap-xxxhdpi-v4/icon.png
  signing: res/xml/config.xml
  signing: resources.arsc
jar signed.

Warning:
No -tsa or -tsacert is provided and this jar is not timestamped. Without a times
tamp, users may not be able to validate this jar after the signer certificate's
expiration date (2046-02-04) or after any future revocation date.

D:\ionic\demoAds1>

Posts: 1

Participants: 1

Read full topic

Implementing a server in ionic

$
0
0

@LOSORIO5 wrote:

I want to use node.js in ionic but I don’t know if I do it in the same folders and documents of the app that I’m developing or I do it separate from the app?

Posts: 1

Participants: 1

Read full topic

'apksigner' is not recognized as an internal or external command, operable program or batch file

$
0
0

@gokujy wrote:

Here my cmd Result:

D:\ionic\demoAds1>apksigner verify HelloWorld.apk
'apksigner' is not recognized as an internal or external command,
operable program or batch file.

D:\ionic\demoAds1>

Using this commends: Deploying to a Device
any idea what to do…please help.

Posts: 1

Participants: 1

Read full topic

Ionic Native: tried calling QRScanner.prepare, but the QRScanner plugin is not installed

$
0
0

@muis87 wrote:

Hello,

Im running ionic v3, and doing some tests;

My plugins:

neptune:scanApp chris$ …/node_modules/ionic/bin/ionic cordova plugin ls

cordova plugin ls
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-qrscanner 2.6.0 "QRScanner"
neptune:scanApp chris$

The Camera plugin is working fine, but when I try to use the QR Scanner , i get this error in console:

[app-scripts] [12:58:19]  console.warn: Ionic Native: tried calling QRScanner.prepare, but the QRScanner plugin is not installed.
[app-scripts] [12:58:19]  console.warn: Install the QRScanner plugin: 'ionic cordova plugin add cordova-plugin-qrscanner'
[app-scripts] [12:58:19]  console.log: Error is plugin_not_installed

Installed via this link:

Im using IonicAppDev on Ios.

app.module.ts:

import { Camera } from '@ionic-native/camera';
import { QRScanner } from '@ionic-native/qr-scanner';

...

  providers: [
    StatusBar,
    SplashScreen,
    Camera,
    QRScanner,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]

the page:


import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';
import { Camera, CameraOptions } from '@ionic-native/camera';

@Component({
  selector: 'page-about',
  templateUrl: 'about.html'
})

export class AboutPage {

  currentImage: any;

  constructor(public navCtrl: NavController, private camera: Camera, private qrScanner: QRScanner) {

  }

  takePicture() {
    this.qrScanner.prepare()
......

When clicking on the button, it fires takePicture(). And then im getting that error… ANy one?

Posts: 1

Participants: 1

Read full topic


My xcode generate several ipa, how i use?

$
0
0

@felipexavier wrote:

Hi guys,

I generate my .IPA but i see in folder several .plist and one folder with name app, in folder have .ipa a lot. I need insert .IPA main to download. someone can a help me?

Posts: 1

Participants: 1

Read full topic

NSURLSession/NSURLConnection HTTP load failed - in iOS 10.3

$
0
0

@Sudipta808 wrote:

Recently apple has mandated certificate transparency for application. Possibly, after that ajax API communication stopped working in iOS 10.3. But it is working properly in iOS 11.

Following is security configuration in our application which causes the above issue.

<access minimum-tls-version=“TLSv1.2” origin="[https://abcd.dummydomain.com] requires-certificate-transparency=“true” requires-forward-secrecy=“false” />

If we make following configuration in XCode – info.plist, it works for the same server.
NSExceptionAllowsInsecureHTTPLoads = YES.

But to have this key may cause the apple rejection during release. What kind of justification we need to provide to apple? OR is there any other way to bypass this issue without having the NSExceptionAllowsInsecureHTTPLoads key in iOS 10.3?

Please advise.
Thanks!

Posts: 1

Participants: 1

Read full topic

Cordova diagno Installation failed

$
0
0

@geektech wrote:

My ionic- info

cli packages: (C:\Users\Admin\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0
Gulp CLI              : CLI version 3.9.1 Local version 3.9.1

local packages:

Cordova Platforms : android 6.2.3
Ionic Framework   : ionic1 1.1.0

System:

Android SDK Tools : 26.1.1
Node              : v6.11.0
npm               : 5.6.0
OS                : Windows 7

Environment Variables:

ANDROID_HOME : D:\Android

Misc:

backend : pro

Can’t able to add cordova plugin add cordova.plugins.diagnostic@3.2.1.
It shows Failed to fetch plugin cordova.plugins.diagnostic@3.2.1

Posts: 1

Participants: 1

Read full topic

Get selected text of dropdown when using Formbuilder

Ionic 3 slow starting app on some device android

$
0
0

@eggys wrote:

I’m tried create new blank project ionic and after that I straight add android device with syntax ‘ionic cordova platform add android’, and in my file ‘main.ts’ I add some code 'enableProdMode().

Then I run to my device with syntax ‘cordova run android’ and ‘cordova run android --prod’. But the problem is in my first device (xiaomi mi 5) time of starting app is 5 second (I think that normal), but in my second device (samsung galaxy pro) time of starting app is about 20second (I think that not normal, it’s too long for open apps). So how to boost time starting app in some device which is too long open app?

note : there no other code, I just create project and run
Thanks

Posts: 1

Participants: 1

Read full topic

Rtl in Ionic v4

$
0
0

@Edodi wrote:

Hi,
Is there a way to set direction for rtl in Ionic 4?

On Ionic 3, it was:
this.platform.setDir(‘rtl’, true);

But now I can’t seem to find a replacement to this command.

Thanks

Posts: 1

Participants: 1

Read full topic

Ionic 4 - Dynamically add buttons in Action Sheet

$
0
0

@karvanj wrote:

Hi All, in Ionic 4 has anyone figured out how to dynamically add buttons in action sheets controllers?
In Ionic 3, I would do the following:

let actionSheet = this.actionSheetCtrl.create({
      title: 'Row Actions'});
     
      if (this.hasDeletePermissions) {
        actionSheet.addButton({text:'Delete Row', role: 'destructive', icon:'trash',handler: () =>{
          this.deleteRow();
        }});
      }

      actionSheet.addButton({text:'Add Row', role: 'destructive',handler: () =>{
        console.log('Do Something');
      }});
      actionSheet.addButton({text:'Cancel', role: 'cancel', icon:'close',handler: () =>{        
      }});
    
    actionSheet.present();

Is something similar to the above possible Ionic 4? If so I would really appreciate if someone could show me how. Many thanks in advance.

Posts: 2

Participants: 1

Read full topic


Problem with displaying standard keyboard emojis android/IOS

$
0
0

@codiqa100078139 wrote:

Hi there,
I have an application where user can upload feed.
User can add Image and description.
In the description the user can add text + emojis from the standard keyboard.

But when the user adds emojis they are not displayed at all.
What can be the problem?

How can I submit this emojis properly to the server and show them on the HTML page?

Here is my save function:

save(){
    this.serverApiRequest.setUpdateBusinessFeedItem({
      user_id: this.userData['id'],
      id: this.imageData.id,
      description: this.imageData.description_textarea
    }).subscribe((data) => {
  }

And here I send it to the service:

setUpdateBusinessFeedItem(data){ 
    let headers = new Headers({
			'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
		});
		let options = new RequestOptions({
			headers: headers
    });

    let body = "method=setUpdateBusinessFeedItem&userData="+JSON.stringify(data);
              
    return this.http.post(this.globals.apiUrl, body, options)
    .map(this.extrectData)
    .do(this.logResponse)
    .catch(this.catchError);
  }

In the DB it looks like this:

Posts: 2

Participants: 1

Read full topic

Ionic v4 & Ionic Native v5 -- Wildcard File Search?

$
0
0

@mlynch wrote:

I’m trying to create a relatively simple app that will create new file entries with incrementing file names, with a naming scheme of [FileType]-[FileNumber].ext.

An example would be if I have files:
“TypeA-1.ext”
“TypeA-2.ext”
“TypeB-1.ext”
…and I wanted to create a new “TypeB” file, I want to be able to say “Get me a count of all files in given directory where some part of the file name matches ‘TypeB’, then add one for the new TypeB’s FileNumber value.”

I do not want to just get a count of all files in the given directory. I can work out the logic behind “Get me an array of objects representing each fiole, create a count variable, loop through the array of objects and increment the count for each object where ‘name’ matches my wildcard string,” but I imagine that could become costly and slow when I have a lot of files to work with.

So if there any natively-supported way to do a wildcard search and get a count of matching files returned?

Posts: 1

Participants: 1

Read full topic

Make app with ionic template responsive in v4

$
0
0

@vohtaski wrote:

I am building an app with ionic-v4 vanilla javascript. I require it as the documentation says.

 <script src="https://unpkg.com/@ionic/core@latest/dist/ionic.js"></script>

Everything works fine in the browser, the only problem is when I switch to mobile view it does not adapt and all fonts and buttons are super small. Is there some special setting I have to enable to make it responsive?

Posts: 1

Participants: 1

Read full topic

InappBrowser: Keeps saying Loading

$
0
0

@muis87 wrote:

Hello,

Using code below, opens the inAppBrowser, with the given URL, but when opened; i cannot scroll or does not have a back button (Worked without problems in ionic v1)

Does anyone knowthis?

 import { InAppBrowser } from '@ionic-native/in-app-browser';

....

  scanCode() {
    
    this.barcodeScanner.scan().then(barcodeData => {
      console.log('Barcode data', barcodeData.text);
      const browser = this.iab.create(barcodeData.text, "_blank", "hardwareback=yes,location=yes,closebuttoncaption=Terug");


     }).catch(err => {
         console.log('Error', err);
     });

  
  } 

Posts: 1

Participants: 1

Read full topic

Connect devices

$
0
0

@DzViRuZ wrote:

I want build an application that connects to my PC in order to remote control it
what is the best way to connect them ?

i can use a third party to send informations between pc and phone but i want to connect them via network to make communication fast

and can i use usb port to do that ?

Posts: 1

Participants: 1

Read full topic

Viewing all 71016 articles
Browse latest View live


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