I would like an Android build system procedure, command line or Eclipse, to generate several .apk files from a single source codebase. Some common reasons for this - having specific versions for markets with different requirements or a free and paid version.
Asked
Active
Viewed 116 times
1
-
I think any program with sufficient permissions will receive BOOT_COMPLETED regardless of where the program is located. So, you, probably, can put everything into a single project on external storage – Alexander Kulyakhtin Nov 10 '14 at 06:59
-
I need when my device rebooted service call again. I programmed it but works on phone memory – Nov 10 '14 at 07:03
1 Answers
1
Use Activity-alias in manifest file to launch multiple apks from single apk.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test "
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="@drawable/images"
android:label="@string/app_name"
android:theme="@style/AppTheme" android:logo="@drawable/images">
<activity
android:name="com.mmx.mccandmnc.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Alias activity used to set the wallpaper on Home. The alias is used
simply to have a different label. -->
<activity-alias android:name="WallpaperActivity"
android:targetActivity="LoginActivity"
android:label="@string/activity_set_wallpaper">
<intent-filter>
<action android:name="android.intent.action.SET_WALLPAPER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity-alias>
</application>
</manifest>

Vibhor Chopra
- 647
- 4
- 14
-
tnx, can i generate them so that one of them install on external storage and other project install on phone memory? – Nov 10 '14 at 07:26
-
Soheila, there is a tag in
, which is android:installLocation="internalOnly", but it will store the entire application where you want it to store. – Vibhor Chopra Nov 10 '14 at 07:35 -
-
-
tnx, please visit this page : http://stackoverflow.com/questions/2784441/trying-to-start-a-service-on-boot-on-android this is my problem too, but user3439968 answerd to it and is his answer 1.Install your app to internal storage 2.Instal another small app in internal storage. This app recieves BOOT_COMPLETE and run second app on external storage. – Nov 10 '14 at 07:44
-
i want to my project install on external memory and when device rebooted sevice run again, he said : 2.Instal another small app in internal storage. This app recieves BOOT_COMPLETE and run second app on external storage. – Nov 10 '14 at 07:48
-
Soheila, have to run for a urgent meeting. Will come and revert you back. – Vibhor Chopra Nov 10 '14 at 07:52
-
if is possible visit this : http://stackoverflow.com/questions/26816921/how-to-use-service-and-broadcast-receiver – Nov 10 '14 at 08:13