0

I get issue when install apk file, follow is: 1. A apk file copy from /bin of Eclipse

Way 1:

Use commandline: adb install [path to apk file]

Result 1: - Go to anywhere in app then touch home button.

  • Use launcher re run app, app go to previous screen (ok)

Way 2:

Copy that apk file to sdcard and run directly by click it.

Result 1:

  • Go to anywhere in app then touch home button.

- Use launcher re run app, app go to first screen (not ok)

AndroidManifest: these are definned in tag application

android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:launchMode="singleTop"
android:logo="@drawable/ic_launcher"

How can i export APK and install it direct and result like install by adb or ctrl + f11 in Eclipse?


Big thanks to @marek-sebera. I resolved my issue, it's different in how to open my app, isn't how to install an app.

ribbon
  • 11
  • 3

1 Answers1

0

Use the procedure Eclipse uses, but manually:

  • Push APK into temp
  • Install APK via ADB
  • Run application

example

adb push bin/my_app-debug.apk /data/local/tmp/my_app-debug.apk
pm install -r "/data/local/tmp/my_app-debug.apk"
am start -n "my.package.name/my.package.name.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER

replace my_app-debug.apk and my.package.name with real info of your application

Marek Sebera
  • 39,650
  • 37
  • 158
  • 244
  • thanks for your solution, but my customer can not install by adb, they want to install with touch direct to apk file only. Would you provide reason and how to make "Way 2" always like another way? – ribbon Dec 17 '13 at 01:43
  • @ribbon sorry, but your english is quite confusing. If they cannot use ADB and cannot use Google Play, have you considered some MDM BYOB solutions? – Marek Sebera Dec 17 '13 at 12:42
  • sorry about my english :D, my product has not released yet, so i don't know result when install via Play. I have only way to provide apk to customer is send .apk to them. And important i can not understand why my application give other result with other ways of installing. – ribbon Dec 18 '13 at 01:58
  • In Play Store Publisher Console (interface for publishing) is option to have alpha and beta releases. There you can test both store listing and install/update/uninstall behavior. You can connect your client devices to Alpha/Beta testing group, and provide them with updates directly via Play. – Marek Sebera Dec 18 '13 at 06:36