• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How to save a file when user closes app

I created an app in which a user will enter words that i want to store in an array. When the user closes the app i want this array to be written to a file for when they open the app again they don't have to reenter the words.

This is my first app and figured this wouldn't be that hard but i've been struggling to find this information online. I did find there are several places to save a file. I know that this list won't be too big and no other apps need access to this list, so i planned on saving it in the app specific internal storage location. I'm also programing in Kotlin.

During my research i saw there is a onPause( ), onStop( ), and onDestroy( ). However, i'm not sure how to have the file save based on a user swiping the app away. Do i create a function and have it save the file, then do something along the lines of if onStop( ) run my function to save file?

Huawei p8 lte doesnt turn on

Be sure to explain your dilemma to the service shop person just so they're aware a primary need is to retain your data. They'll probably be very careful of that at least once they're aware it's an issue. Some shops will consider replacing the motherboard as the easiest and quickest fix, and then people freak out when they get their device back. A little open communication on both parts is often very helpful.

Unable to login to AC Central app

Ha Ha! Only I'm only partially mad then.
I did assume our new poster was referring to something like that.
As it happens I have just been perusing Xiaomi phones on the UK web, finally thinking and finding out about their Redmi and Mi devices and following video reviews after initially looking at Realme products. Great reductions on some sub £250 Xaomi atm, They tick a lot of boxes for low cost (extra apps and improving UI aside) and of course they are still big on IR.

Browse archive via Windows Explorer - wifi

Welcome to Android Forums, Uther13! :)

I can easily do on my PCs what you're asking, using KDE Connect. Of course, all of my PCs, including laptops and Chromebooks, run Kubuntu Linux. :D

I know you don't want to use a browser, but if you change your mind, Airdroid is very well known and easy to use. If you give it a try you may find that it's a workable, albeit not ideal, solution.

Factory Reset problems

Any chance your friend can take those Tab E's back to the hospital to have the IT staff there disable MDM?
An important aspect to Mobile Device Management is preventing the user from being to readily bypass the security protocols in place. For the rest of us, typical consumers, Android's FRP is sometimes overcome by flashing an appropriate ROM but MDM is more of a corporate/small business service so it gets extra layers of protection. From your description, it sounds like someone at the hospital still needs to properly 'decommission' those devices from the hospital's inventory records.

the new PS5 announcement.....really Sony?????

this was how i feel right now with Sony's new announcement for their nextgen console, the PS5:

https://www.youtube.com/embed/wQ9wAZ8wruA?wmode=opaque

i can't wait for the ps5 to come out. but Sony's news about their new console was just plain stupid and offered nothing other than a rough estimate on release date.

incase you missed it:
https://www.youtube.com/embed/E429XW4isFs?wmode=opaque

the reason they are so vague about the release date is to keep you anticipating and wondering, so when the new system finally gets released, you will go ahead and purchase it. Its all an advertising tactic.

[Beta] SRT Vault - Multiple Accounts, Data Security, Work Profile

[Update] SRT Vault

New Update, check it out!

What's New?
- Contact management: Activate the contact management in the settings to import your contacts and to manage them in the work profile.
- App Control: You can lock the Vault or hide your running Apps directly from their Notification.
- File-transfer 2.0: You can select multiple files for transfer between the Vault (work profile) storage and the normal file storage.


When will it be available?
- Right now, if it is not already queued in your automatic update list, you can trigger the update manually in the Play store

parse burning image fail

My android box is bricked. I tried to unbrick, but fail. I try to load an IMG file into USB Burning Tool, but came this tnotification, "parse burning image fail". Now the box is completely dead after I tried to update the firmware using the SD Card, reset method, and no lights. Somebody help me, please.

Help Root Huawei android

now unplug your device From USB turn off by hold Volume Down Key + power Key
-Download Magisk Flashable from this http://tiny.cc/latestmagisk
-Copy magisk file to sd card
-Enter to recovery mode by press volume Up Key + Power Key
-flash magisk file0


No option sd card in memory
do you have a sd card reader? you just magisk on the sd card.....does not matter how you do it.

Filter

Back
Top Bottom