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. Issues with debugging using Ganymede Eclipse

This page is about setting up eclispe to do Platform development.

If you are using the SDK, please refer to the documentation on
http://developer.android.com

On Fri, Apr 24, 2009 at 2:01 AM, Explore Android









-- 
Xavier Ducrohet
Android Developer Tools Engineer
Google Inc.

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

2. Voice Recognition in API demos crashing

I tried to run the voice recognition in api demo from sdk 1.5 and it
crashed with this stacktrace:

04-16 10:32:00.725: INFO/ActivityManager(568): Starting activity:
Intent { comp={com.example.android.apis/
com.example.android.apis.app.VoiceRecognition} }
04-16 10:32:00.945: INFO/ActivityManager(568): Displayed activity
com.example.android.apis/.app.VoiceRecognition: 215 ms
04-16 10:32:04.275: INFO/ActivityManager(568): Starting activity:
Intent { action=android.speech.action.RECOGNIZE_SPEECH (has extras) }
04-16 10:32:04.295: DEBUG/AndroidRuntime(823): Shutting down VM
04-16 10:32:04.295: WARN/dalvikvm(823): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
04-16 10:32:04.295: ERROR/AndroidRuntime(823): Uncaught handler:
thread main exiting due to uncaught exception
04-16 10:32:04.315: ERROR/AndroidRuntime(823):
android.content.ActivityNotFoundException: No Activity found to handle
Intent { action=android.speech.action.RECOGNIZE_SPEECH (has extras) }
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
android.app.Instrumentation.checkStartActivityResult
(Instrumentation.java:1484)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
android.app.Instrumentation.execStartActivity(Instrumentation.java:
1454)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
android.app.Activity.startActivityForResult(Activity.java:2656)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
com.example.android.apis.app.VoiceRecognition.startVoiceRecognitionActivity
(VoiceRecognition.java:79)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
com.example.android.apis.app.VoiceRecognition.onClick
(VoiceRecognition.java:66)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
android.view.View.performClick(View.java:2179)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
android.view.View.onTouchEvent(View.java:3828)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
android.widget.TextView.onTouchEvent(TextView.java:6291)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
android.view.View.dispatchTouchEvent(View.java:3368)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchTouchEvent(PhoneWindow.java:1707)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent
(PhoneWindow.java:1197)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
android.app.Activity.dispatchTouchEvent(Activity.java:1993)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(PhoneWindow.java:1691)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
android.view.ViewRoot.handleMessage(ViewRoot.java:1525)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
android.os.Handler.dispatchMessage(Handler.java:99)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
android.os.Looper.loop(Looper.java:123)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
android.app.ActivityThread.main(ActivityThread.java:3948)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
java.lang.reflect.Method.invokeNative(Native Method)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
java.lang.reflect.Method.invoke(Method.java:521)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
04-16 10:32:04.315: ERROR/AndroidRuntime(823):     at
dalvik.system.NativeStart.main(Native Method)
04-16 10:32:04.335: INFO/Process(568): Sending signal. PID: 823 SIG: 3
04-16 10:32:04.335: INFO/dalvikvm(823): threadid=7: reacting to signal
3
04-16 10:32:04.415: INFO/dalvikvm(823): Wrote stack trace to '/data/
anr/traces.txt'
04-16 10:32:12.225: DEBUG/dalvikvm(608): GC freed 9273 objects /
524264 bytes in 98ms

Has anyone get this working?

Zhao
--~--~---------~--~----~------------~-------~--~----~

3. android sqlite question

4. Blank screen when switching activities

5. Framerate killed by onTouchEvent spam

6. Samsung launches I7500, The Co mpany鈥檚 First Android-Powered Mobile Phone

7. Combining free and paid versions of app into a single apk - a proposal to the Google engineers