Install specific apk - android

I am doing an Ionic project. Also I have added Crosswalk. So when I run ionic run android, android-debug.apk is installing in my phone. But I need to install the Crosswalk app (means android-armv7-debug.apk).
Is there any way to install this app by using the command ionic run android instead of copying this file?
Thanks

I don't know if this is possible with an ionic comand.
But you can do this.
ionic build android
adb -d install /path/to/file/android-armv7-debug.apk

Related

ionic cordova run android --prod events not working properly

I have installed ion2-calendar in my ionic application using npm install ion2-calendar moment --save and i have made some changes on its files located in node_modules/ion2-calendar/dist/components/month.component.js, i have added (panEnd) and (panStart) in its dates.it is working good using ionic serve and ionic cordova run android.but the events are not working when we make build usinng --prod option like
ionic cordova run android --prod
the build was successfull and we can run the app on mobile,but the added event does not works.is there anything we need to do to add this changees in production build?
I had the same situation but I solved this doing this step and rebuilding the project for production.
try production build commands
after removing local page module file (i.e login.module.ts) of each of your page!
I mean do this
To
NOTE!! if that does not work for your do post your logs by testing your device logs using
CHROME DEV tools. you can inspect device logs there using
chrome://inspect/#devices
make sure you are using ADB drivers for your android on your machine!
you won't require this for IOS though you can directly check your log commands in XCODE Console!

Cannot Emulate Ionic v1 app to Android Emulator

I am developing an ionic app. And I want to emulate it on real Android device. I already downloaded the Android Studio. I plugged my Android device and when I tried to run this command ionic cordova run android There's a lot of errors.
Note: I am on Windows 8.1 32bit. JDK 32 bit.
This is for an academic thesis.
This is the error:
Have you enabled usb debugging on your device? You'll have to enable developer mode on your Android. Google can tell you how, but you just go to settings/about/build number, tap 7 or 8 times... Then, you should be able to use ionic run android --device. That should build out to emulate so long as you've installed the Android sdk.
It can be solved by removing platforms, then add again.
ionic cordova platform rm android
ionic cordova platform add android
if above solution does not work please run following command,
ionic cordova run android --livereload
If still problem persist,run same command with --verbose options,
ionic cordova run android --verbose
Alternatively , and way faster , you can build your app then drag/drop it inside the emulator (running aside)..it will install quicker and run sleeker.
And you'll have peace of mind , I know this is not what you're looking for ,but still a nice hack if you're time-bound.
I already solved my problem! As we can see in the error that I posted, it is the gradle file! It is corrupted download. What I did is delete the .gradle folder and run ionic cordova run adnroid. In that way, it will automatically download the gradle file! Thanks for the replies by the way!

Android installation of .apk (hybrid app developed with ionic)

I have a strange behavior, I have developed a hybrid app with ionic, afterwards I have installed it at my mobile with this command:
everything was fine, but on my phone I cannot find this app and also cannot find this paths and the file .apk:
/data/local/tmp/android-debug.apk
pkg: /data/local/tmp/android-debug.apk
What I'm doing wrong?
To run on device -
ionic run android
This will install application on mobile
Testing as a native app
$ ionic run android
More about testing as a native app
To generate a release build for Android
$ cordova build --release android
Android Publishing

Cordova phonegap finale convert to apk

I created Simple cordova project using visual studio. I want ask
How to convert, save to apk? I tryed to run relise device, didnt
work, the file don't created. Should I use build.phonegap.com? Its
free?
After adding the android platform successfully you can easily use the cli to build the apk with the following command
cordova build android
you can even run the application in an emulator or device connected to your pc via the command
cordova run android
if you prefer to manually copy the apk to your device and then install from there, you can find the apk under " \platforms\android\ant-build "
You can create the apk making a build using the cordova command line. You have to use this command inside your cordova app dir:
cordova build android
And after that look for you apk inside the android platform folder. Of course first you have to add the platform if you have not already done:
cordova platform add android
I hope this helps you!

how to run sencha app on a physical device

I want to run my sencha app on an android tablet. I wrote "sencha app build" to compile it. And the compilation was successfull. But now how can I run it on my tablet?
Follow below steps :
Run command sencha app build production. It will create production build inside build folder.
You can use either cordova or phonegap,i am using cordova,you can install it by below command.
npm install -g cordova
Create a cordova app in another directory.
cordova create scraper com.test.scraper Scraper
Step 3 will create a directory scraper, Now execute below command in sequence's.
cd scraper
cordova platform add android
Now copy the build\production\scraper\ folder data(from step 1),Ex :-(your_app_name)\build\production\scraper\ to cordova app www folder.
Now run cordova app build android
Step 6 will create apk file inside *platforms\android\ant-build\* folder.Now you can install this apk to your android tablet.
For more Information,you can refer :-
http://www.sencha.com/forum/showthread.php?270566-Building-Sencha-Touch-2-Phonegap-Application-for-Android-Windows/page2
http://cordova.apache.org/docs/en/3.6.0/guide_cli_index.md.html#The%20Command-Line%20Interface

Categories

Resources