Activate Apps2SD / Android / Froyo
Hi,
does anyone know whether it is possible to activate apps2sd for android?
I set the installLocation property in my custom android xml to preferExternal as described here http://android-developers.blogspot.com/2010/07/apps-on-sd-card-details.html .
Since then I always get the error "error: No resource identifier found for attribute 'installLocation' in package 'android'" when launching the simulator. I found a solution on a blog (http://mobile.tutsplus.com/tutorials/android/move-to-sd-card/) "Change the build target by editing the project properties (right-click on the project in Eclipse), and choose a target with at least API Level 8:"
But I do use Titanium not Eclipse. Then I set the "android:targetSdkVersion" to 8 in my custom android xml file and the I sill get this error in Titanium log.
Greetz
1 Answer
-
I found a way to activate apps2sd by doing these steps:
- Create a custom Android manifest file as described here http://developer.appcelerator.com/doc/mobile/android-custom-androidmanifest
- Add this attribute to the root element
manifest
:android:installLocation="preferExternal"
Further possible values are described here http://developer.android.com/guide/appendix/install-location.html - Change
<uses-sdk android:minSdkVersion="4" /> to
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="8" /> - Change "target=android-4" to "target=android-8" in file
projectfolder/build/android/default.properties
- In the file
mobilesdk/{windows|linux|mac}/{titaniummobilesdkversion}/android/builder.py
change the following lines:
self.sdk = AndroidSDK(sdk, 4)
toself.sdk = AndroidSDK(sdk, 8)
android_sdk_version = '4'
toandroid_sdk_version = '8'
Please attend that you have to change these values each time you update to a new mobile sdk version.
- Change something in tiapp.xml to force a full rebuild of the app…
That works for me. My app runs perfectly on Android 1.6, 2.1 and 2.2. But I give no warranty that it will work for you or that all Titanium features will work after doing these steps…