Private Storage with App2sd.

by Nathan » Fri, 20 May 2011 05:05:32 GMT


Sponsored Links
 I found this message about App Install location:

"The .apk file is saved on the external storage, but all private user
data, databases, optimized .dex files, and extracted native code are
saved on the internal device memory"

Based on this, I believe it is a bad idea to place anything large
(meaning more than a few megabytes), as a private storage file.

ie, if I call

openFileOutput(FILENAME, Context.MODE_PRIVATE);

It should be only for little files. If a user moves their app to the
SD Card, it doesn't really give them any more room for these files.

For anything else, I should plan on it being on the storage card, and
open to the public.

Am I right?

Nathan

-- 



Re: Private Storage with App2sd.

by Mark Murphy » Fri, 20 May 2011 05:11:23 GMT


 


Yes. IOW, having the app installed on external storage has no effect
on files created on openFileOutput().

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://github.com/commonsguy 
 http://commonsware.com/blog  |  http://twitter.com/commonsguy 

Android 3.0 Programming Books:  http://commonsware.com/books 

-- 


Sponsored Links


Other Threads

1. ALSA Waiting for sevice media.audio_flinger

hi,

i'm porting android an a apf27 plateform... It works...

But there is no sound... So i installed the ALSA lib and compiled...
Now i can't boot android... What is wrong?

thanks

what i did
-----------------------------------

cd ~/mydroid/external
git clone git://android.git.kernel.org/platform/external/alsa-lib.git
git clone git://android.git.kernel.org/platform/external/alsa-utils.git
cd ~/mydroid/hardware
git clone git://android.git.kernel.org/platform/hardware/alsa_sound.git
gedit ~/mydroid/build/target/board/generic/BoardConfig.mk
BOARD_USES_ALSA_AUDIO := true
BUILD_WITH_ALSA_UTILS=true
# BOARD_USES_GENERIC_AUDIO := true

cd ~/mydroid
make


the logcat
------------------------------------------------

I/DEBUG   ( 1770):     be870b48  be870b84
[stack]
I/DEBUG   ( 1770):     be870b4c  00016128
[heap]
I/DEBUG   ( 1770):     be870b50  be870b84
[stack]
I/DEBUG   ( 1770):     be870b54  0000acb0
[heap]
I/DEBUG   ( 1770):     be870b58
000003ac
I/DEBUG   ( 1770):     be870b5c  ab016b8f  /system/lib/
libaudioflinger.so
W/AudioSystem( 1808): AudioFlinger not published,
waiting...
I/ServiceManager( 1808): Waiting for sevice
media.audio_flinger...
I/ServiceManager( 1808): Waiting for sevice
media.audio_flinger...
I/ServiceManager( 1808): Waiting for sevice
media.audio_flinger...
I/        ( 1959): ServiceManager:
0xac38
I/ServiceManager( 1808): Waiting for sevice
media.audio_flinger...
E/ALSALib ( 1959): external/alsa-lib/src/control/control.c:909:
(snd_ctl_open_noupdate) Invalid CTL
AndroidPlayback
E/AudioHardwareALSA( 1959): Unable to attach mixer to device
AndroidPlayback: No such file or
directory
E/ALSALib ( 1959): external/alsa-lib/src/control/control.c:909:
(snd_ctl_open_noupdate) Invalid CTL
AndroidRecord
E/AudioHardwareAL[   78.250000] snd_imx_pcm_open Playback stream @:
0xd39cbb00
SA( 1959): Unable to attach mixe[   78.260000]
imx_ssi_get_dma_tx_channel =
13
r to device AndroidRecord: No su[   78.260000] playback
supported
ch file or directory



the init.rc
----------------------------------------

# set the alsa audio driver
    symlink /dev/snd/pcmC0D0c /dev/pcmC0D0c
    symlink /dev/snd/pcmC0D0p /dev/pcmC0D0p
    symlink /dev/snd/controlC0 /dev/controlC0
    symlink /dev/snd/timer /dev/timer
    chmod 0777 /dev/pcmC0D0c
    chmod 0777 /dev/pcmC0D0p
    chmod 0777 /dev/controlC0
    chmod 0777 /dev/timer
    chown root audio /dev/snd/controlC0
    chown root audio /dev/snd/pcmC0D0c
    chown root audio /dev/snd/pcmC0D0p
    chown root audio /dev/snd/timer
    setprop alsa.mixer.playback.master Front
    setprop alsa.mixer.capture.master Capture
    setprop alsa.mixer.playback.earpiece Master
    setprop alsa.mixer.capture.earpiece Capture
    setprop alsa.mixer.playback.headset Master
    setprop alsa.mixer.playback.speaker
Master
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Integrate Own Application in Contact Application

No, but I believe it is possible to distribute a new modified Contact
app that includes the functionality you want to add.




--~--~---------~--~----~------------~-------~--~----~

3. Capture HTTP petitions from the Android browser.

4. pre-built kernel for emulator

5. CPU state

6. SMS Query

7. the way to have more powerful and flexible UI components set in Android applications