savedInstanceState after reboot - Android Software Development

Sorry for being a newb to creating apps, but I've searched and searched and cant find anything useful or that answers my question, so maybe you guys will be kind enough to help me out.
savedInstanceState will save text users entered in an EditText field if the user hits the home button and opens the app again. But if the user kills the app, or reboots the phone the data is gone.
Is there a quick way of saving this data? Or is my only alternative to actually save the data to a file on the sdcard, and then pull it form there each time the app opens?
Thanks.

If you want to preserve the state between reboots, place the information in SharedPreferences instead of savedInstanceState.

Thanks for pointing me in the right direction. I'll give that a go.

Related

Simple Question - Selecting

Hi guys, new to the forum, thought i'd start off slowly haha.
This is an extremely simple question, but i had no idea where else to ask. I've been trying to select things on my Blackstone but cannot select anything without also opening it. For instance, i want to select an old note in order to delete it. The only thing i can think of is tapping it and this obviously opens it. Same thing for old or duplicate messages in a text conversation. I can select messages but only if i tap the contact, then press back to return the conversation. Its then highlighted blue and i can delete it. Any ideas on how to do this? Its simple but infuriating!
Davesbeard said:
Hi guys, new to the forum, thought i'd start off slowly haha.
This is an extremely simple question, but i had no idea where else to ask. I've been trying to select things on my Blackstone but cannot select anything without also opening it. For instance, i want to select an old note in order to delete it. The only thing i can think of is tapping it and this obviously opens it. Same thing for old or duplicate messages in a text conversation. I can select messages but only if i tap the contact, then press back to return the conversation. Its then highlighted blue and i can delete it. Any ideas on how to do this? Its simple but infuriating!
Click to expand...
Click to collapse
Tap AND Hold the stylus down until a menu pops up - most applications will respond differently to tap and hold.
I also learnt this early on and it surprised my at first !
Thanks alot that works for getting rid of notes
Can't seem to select individual messages in conversation view still. Weird!
sometime tap and slide or hold as suggested. holding movies and photos for a second selects them

[Q] QuickDesk/Itching Thumb and the DX to work with double-tap

Ok, so this has been really bothering me that i cant fix this myself..so i came for help.. I like both the Quickdesk Beta and Itching Thumb as a kind of in-between for LauncherPro and just getting to apps/widgets, while still in-app. The problem with Droid X is that theres no way to set a third-party app as the default function. Im more interested with getting Quickdesk to work, because that is what i can see myself using more.
I have tried the workarounds that is on the quickdesk site, or where ever the link on it sends you (using titanium backup to freeze the default app you choose for double tap, so nothing would happen except launch quickdesk). The problem with this is that after the first home button press, it exits the current app, to your launcher, then opens quick desk. I have seen/tried the other method using SQL Editor, which i think is the proper route, but dont understand the proper input style. (<Program>/<Activity>)...i do know that the file for quickdesk is (sg.ruqqq.quickdesk) and have tried that, but i think something else is needed for the proper function of it. If someone can point me in the right, more specific direction, it would be greatly appreciated..Thank you
And yes i have searched around and done extensive research first

How to get Android to always open root Activity

Ok, so I have been struggling for a couple days with this, and I hope someone can help me.
I want Android to always run my splash screen activity, because I load a bunch of data from web services that I need throughout the rest of the app. This works fine with the flag android:clearTaskOnLaunch="true" set when you launch the app from the home screen.
Where it does not work so well is the long press of the home button and then selecting the app. In that case it starts the app in whatever random spot the user left it last. The problem is that if the app has been killed due to memory, it still shows in that recent apps list and when a user restarts the activity from the long press, all my data is gone so the app force closes.
So, my ugly workaround is to remove the app from the recently run list. I would much rather it showed up there but that it started my app the same way as if it was clicked on the home screen.
Anybody know how to do this? The ebay app pretty much does this, so I know it can be done.
-frank
Instead of reading your data in OnCreate, you could do it in OnResume. See the flow chart here:
http://developer.android.com/reference/android/app/Activity.html
as you can see, OnResume is always called whether the app is created initially, resumed from pause, or reloaded.
kaediil said:
Ok, so I have been struggling for a couple days with this, and I hope someone can help me.
I want Android to always run my splash screen activity, because I load a bunch of data from web services that I need throughout the rest of the app. This works fine with the flag android:clearTaskOnLaunch="true" set when you launch the app from the home screen.
Where it does not work so well is the long press of the home button and then selecting the app. In that case it starts the app in whatever random spot the user left it last. The problem is that if the app has been killed due to memory, it still shows in that recent apps list and when a user restarts the activity from the long press, all my data is gone so the app force closes.
So, my ugly workaround is to remove the app from the recently run list. I would much rather it showed up there but that it started my app the same way as if it was clicked on the home screen.
Anybody know how to do this? The ebay app pretty much does this, so I know it can be done.
-frank
Click to expand...
Click to collapse
In the onResume for the activity that is crashing, you could test your data to see if it's still there, if it's null you can run the code to repopulate it again.

Need some quick help with the sms messaging

Trying to figure out how to turn off the feature where it changes the word automatically unless i hit the little 'skip corrections' arrow....very frustrating because there is no way to know its going to change the word until after i try and hit spacebar, and then i have to go back and redo and then still hit the skip key
also, how do i get it so that it's not blocking swear words? I used to be able to find this but for some reason now cannot, thanks!
Which keyboard are you using?

Press and drag / long press not working

Hi, long time casual forum reader having trouble with my galaxy note 3. I've found so much useful information on these forums it's the first place I decided to ask for help at after unable being to find any answer by searching Google or these forums. The problem:
Whenever I hold down my finger on the touchscreen it is not working properly. I am unable to drag and drop icons on the home screen by holding down then dragging them. I am unable to hold down on a link in Chrome and have the option menu appear which allows you to open in new tab. I CAN hold down and scroll the screen up/down.
I do not know what is causing this problem. I have in the past closed out various unknown/system services in the application manager but haven't ever disabled any. I have restarted my phone multiple times leaving it powered off for over a minute before repowering. I am using a tmobile galaxy note 3. That is not rooted. I have the most recent update from tmobile (installed it hoping that it would fix the problem). Does anyone have any idea what may be wrong or how to fix it? I'd be more than happy to provide more information if required.
Thanks
Correct terminology?
If no one has any ideas for how to solve this problem, does anyone know the correct terminology to use to describe when you press and hold your finger down on the screen then try to drag? I'm thinking part of the problem I'm having with searching for a solution is that I'm using incorrect search terms to describe the problem. I've tried things like press and drag, long hold, drag and drop, and various other similar terms. I'm hoping the correct terminology might yield results related to this issue. Thanks!

Categories

Resources