Ionic2: Package com.my.app has no certificates at entry AndroidManifest.xml - ionic2

I created one application using Ionic2 and when i run the command ionic cordova run android --prod --release I am getting an error
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Package /data/app/vmdl
971492117.tmp/base.apk has no certificates at entry AndroidManifest.xml]
Do anyone know how to fix this error?
NB: I have seen similar questions all of them are for native application development.

You cannot install a package build with --release without signing it. See this question on Ionic Forum
Try ionic cordova run android --prod to install an unsigned app to your phone.

Probably you have another app installed with the same name, signed with another type of key. Ie in your device you the app singed with a release key. Other possibility is there is an app in your device with a newer version.

Related

ionic cordova plugin add cordova-plugin-advanced-http already installed

I am new on Ionic Mobile application development, so I am trying to POST data from Ionic app. Whenever I have run the app in browser using
ionic cordova run browser
It display below issue in console,
Native: tried calling HTTP.post, but the HTTP plugin is not installed.
Install the HTTP plugin: 'ionic cordova plugin add cordova-plugin-advanced-http'.
I have installed same plugin using terminal but terminal give warnings as its already installed.
Please Suggest.
Based on this https://ionicframework.com/docs/native/http/ you also need to run
npm install --save #ionic-native/http
and referencing it correctly in your app, please take a look at above link
Also for running app in browser try below command
Ionic serve
See https://github.com/ionic-team/ionic-native/issues/1975
The issue appears to have been fixed but there might be a lag in updating npm
I hade the same problem and I solve it with uninstall and reinstall the plugin
Uninstall plugin completely
ionic cordova plugin remove cordova-plugin-advanced-http
npm uninstall #ionic-native/http
and reinstall it
ionic cordova plugin add cordova-plugin-advanced-http
npm install #ionic-native/http
The Native Http plugin is the only way to handle the CORS from the client-side.
The way I see your problem, there might two possible fixes
Check whether the plugin is called after the platform.ready().
Even after it, if doesn't work or show the same error then follow this method.
// Declare cordova as a global constant
declare const cordova;
// directly call the cordova pulgin using "cordova.pulgin.http"
cordova.plugin.http.post(apiUrl, {}, {},
response => {},
response => {})

usage of --livereload command in Ionic2/ Ionic3

Ionic CLI 3.8 has come up with a --livereload option to live reload the changes from your app. Can someone tell the proper command for using it?
I tried with only --livereload and also ionic cordova --livreload but neither seems to work!
Just like #Duannx mentioned in the comments, the proper CLI command is
ionic cordova run android --livereload / ionic cordova run ios --livereload
or
ionic cordova run android --l / ionic cordova run ios --l
(Or just ionic run android/ios --l if you're using an older version of the CLI).
Please notice that in order to make the livereload feature to work, both the device and the computer running the command must be in the same WIFI network.
Otherwise you'll see errors like:
The connection to the server was unsuccessful
(http://XX.XX.XX.XX:XXXX)

Ionic-Native issue in ionic 2

I have added a Cordova file transfer plugin from Ionic native and imported transfer from ionic native to my application page
I am not getting any syntax error as well as command prompt errors
But when I run my application using Ionic serve it is showing me
{Cannot find module "ionic-native"}
Can anyone please help me on this
Did u check it properly, weather u have installed ionic-native ?
Plus which version of ionic are you using, in ionic 3 (launched recently) they removed ionic-native and kept it seperately in #ionic-native. And u'll have to indivisually install every plugin u r using.
http://blog.ionic.io/ionic-native-3-x/

Allow installation of apps from unknown sources inside work profile in Android Marshmallow

I've managed to set WSO2 EMM 2.2.0 server and have tested out the emm android agent which works. However, for "Android for work", when I tried to push enterprise applications, it says that "Your administrator doesn't allow installation of apps obtained from unknown sources".
Is there a way to install the apps in the work profile from unknown sources?
The intention of work-profile is to have a safe container for work-related data. Therefore Android is not allowing to install apps from unknown sources in work-profile what so ever. What is only possible is enabling playstore in the work-profile and downloading apps from there.
The only work-around that you can do to install apps from unknown source is by ADB.
Configure the work profile first and then using ADB push an app to the device. The app will be installed in both work-profile and personal profile.
At the moment that is the only work-around possible.
Android for Work is still not saturated. There are grey areas to be addressed. I believe Android will come up with options for this scenario soon.

Ionic 2 build release 404 error

I build an ionic 2 app. When I build an android debug version with ionic build android --prod the app works like a charm. But when I build the same unchanged app with ionic build android --prod --release and I sign the app and zip align it and open the app nothing works and all request give a 404 error. Anyone suggestions?
I installed the whitelist plugin and also set the meta security in the index and in the config.xml the <allow tags
Problem was the SSL certificate. The hoster forgot to add the Intermediate Certificate. On IOS this is no problem but on android it is.