Android Data

Previous topic - Next topic

MrTAToad

I notice that whilst an Android program can be moved to a SD Card, the media it uses stays on the phone (or at least I think that's what the information says) - if so, would it be possible to have an option where Media can could be installed onto an SD Card as well as the program.

[attachment deleted by admin]

spacefractal

The app its selv cannot been moved to sdcard, but media can. This is done in the menifest file. I post it when went home.

Some apps cannot been moved at all, it's depend which service it's use.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrTAToad

If you could show me the manifest modification that would be good - it would be nice to allow the bulk to be moved to the SD card.

ampos

If you set in Android market as "protected", the app will only be installable on main memory.

Code (glbasic) Select
android:installLocation="preferExternal"

will install in external if more memory is available.

http://developer.android.com/guide/appendix/install-location.html

To save data in external disk, you have to find available ones in /mnt folder or something similar.

Anyway, saving to platforminfo(documents) and (appdata) will save in app filepath.
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

spacefractal

#4
Sorry, i did forgot all about it. Ampos has answered how to do :-) and yes its android:installLocation="preferExternal" that does that job.

anyway here is what I currectly use for Greedy Mouse:

Code (glbasic) Select

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.xxx.xxx"
     android:installLocation="preferExternal"
     android:versionCode="4"
     android:versionName="alpha">
    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.BATTERY_STATS" />
<uses-feature android:name="com.acer.android.XLONG_SCREEN" android:required="false" />
<supports-screens android:resizeable="false"
  android:smallScreens="true"
  android:normalScreens="true"
  android:largeScreens="true"
  android:anyDensity="true" />
    <application android:label="@string/app_name" android:icon="@drawable/icon" android:debuggable="false">
        <activity android:name="org.libsdl.app.SDLActivity"
android:label="Greedy Mouse"
android:screenOrientation="nosensor"
android:configChanges="orientation|keyboardHidden" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>


EDIT:
Its seen its have produced a build error, but its was a xlargescreens that did it, so its removed.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/