Posts

Showing posts from August, 2018

Alert Controller for Exit application

Image
import { Component,ViewChild } from '@angular/core'; import { Nav, Platform, AlertController  } from 'ionic-angular'; import { StatusBar } from '@ionic-native/status-bar'; import { SplashScreen } from '@ionic-native/splash-screen'; import { MenuPage } from "../pages/menu/menu"; @Component({   templateUrl: 'app.html' }) export class MyApp {   @ViewChild(Nav) nav: Nav;   rootPage:any = MenuPage;   alert: any;   constructor(public platform: Platform,public statusBar: StatusBar, public splashScreen: SplashScreen,  public alertCtrl:  AlertController) {     this.platform.ready().then(() => {       // Okay, so the platform is ready and our plugins are available.       // Here you can do any higher level native things you might need.       this.statusBar.backgroundColorByHexString('#161f27');       this.splashScreen.hide();       this.platform.regist...

Upload your first app on Google Playstore

Image
1 ). we probably don’t want the debug console plugin enabled ionic cordova plugin rm cordova-plugin-console 2 ). To generate a release build for Android, we can use the following cordova cli command: ionic cordova build --release android 3 ). Let’s generate our private key using the keytool command that comes with the JDK. (if you have .keytool then skip this command.)   keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 4 ). To sign the unsigned APK, run the jarsigner tool which is also included in the JDK: jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore HelloWorld-release-unsigned.apk alias_name 5 ). This signs the apk in place. Finally, we need to run the zip align tool to optimize the APK. zipalign -v 4 HelloWorld-release-unsigned.apk HelloWorld.apk NOTE :  Before upload your .apk some important work to do. first check your APK version becaus...

ionic cordova run android is not working

Image
> Goto device manager > and check adb driver is install properly or not