Using serializible to safe data from Android App [closed] - android

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
when I use serializible to store data from an Android app in the internal storage, is there a danger of losing data, or does the data remain safed, even after an update?

App data remains after an app update or a system update. It does not survive the app being uninstalled and reinstalled. However, app data back up might be what you are looking for. Consult the docs here for more info.
If you are serializing your own classes, and the classes might change as your app is updated, there are additional issues (independent of Android) that you need to consider. See, for example, this question.

Related

How to get list of running app in Android [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I'm making an app like the image below and want to get all running app in the system, currently I use ActivityManager with API>21 and get runningAppProcesses but it just returns only my app in the result list. I try many other ways like: getRunningTasks,... but get the same result. Anyone have a better solution? Thanks so much for helping me!
(Described image here: https://www.howtogeek.com/wp-content/uploads/2016/06/Screenshot_2016-06-07-21-06-00.png)
The methods you mention were deprecated because of privacy concerns.
The only substitute I know of is the UsageStatsManager, which you can query to get events like ACTIVITY_RESUMED (An activity moved to foreground) or ACTIVITY_STOPPED (Activity became invisible).
It requires the PACKAGE_USAGE_STATS
special permission. You can not ask for it, you have to direct the user to the settings using Settings.ACTION_USAGE_ACCESS_SETTINGS.

download needed files to aplication android [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm a beginner in android atudio, I recently make my first app, I put in many raw resources file(txt,mp3) that is why it's size is big (~200Mo).
I want to allow user to download what he need in order to benefit my service like listen to mp3 read text.
You should carefully consider why you need this much data in your app, remove all unnecessary parts and put everything you really need into the .apk as resource.
If I find some app is downloading 200MB to my phone, I'll uninstall that immediately.

Is there any way to add activity to app(apk) which is already delivered to customer [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have an Android application,already live on playstore, but due to certain changes in the requirement, I have to add one more activity to the app without updating the app again on playstore.
Also for future projects, how can I make the application update some part of its code, or patch a broken code without updating the app on the store.
In advance thank you!!
You cannot do that, unless your app is explicitly designed and written to support i.e. dynamic UI based on your external resoiurces/files etc. This is not the case so answer is "no".
or patch a broken code without updating the app on the store
You can download APK from external source and init its installation.

To pass an event while uninstalling an app [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
i am developing an app, in which some data is written in a file during a process in the app.
Now what i need to do is to delete that data from that same file during uninstallation and want that same file to be there in the mobile. Can anybody tell me,, is it possible ?
You have no way of knowing this (in short of exploiting some security hole in Android). Just like #FoamyGuy said, this could make an app do a bunch of bad things. There is an intent called ACTION_PACKAGE_REMOVED which is broadcasted when an application is uninstalled. The catch is it is send to all apps except the one being uninstalled.
This is confirmed here in the docs
Now if you are feeling especially nefarious and if you have two of your apps on the users device, then you can listen to the ACTION_PACKAGE_REMOVED intent for each other. But that isnt very feasible and a story for another day.

Where to save my app Settings after I get it from sharedpref [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
In ym android app, I have Settings menu in which use sets their app mode, sound, music ...etc
I retreive/store this in from/in shared preferences.
My question is onceI retreive this info, where is the best place to store it to make accessible by my whole application?
So far what I do is I read it from my mian activityu and sent it as an Extra between activities but something is telling me it is not efficient/correct way. Should I store the info in the Application class so any activity can access it while the app is running
Thank you
Why not just grab it from SharedPreferences every time you want the value? This saves you from having two copies of the same data in the application which could potentially get out of sync.
I'm assuming you don't need to poll these values thousands of time per second such that it would have any kind of meaningful performance impact.
Further reading:
Don't Repeat Yourself - Wikipedia
You should create a static class named like configuration.java, where you can put all the configuration/setting.

Categories

Resources