To pass an event while uninstalling an 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 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.

Related

Using serializible to safe data from Android 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 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.

Keep track of 3rd party app use [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 specifications from my employer. He wants me to track the use of 3rd party apps from inside of our application. Our application is suppose to act as an operating system. We launch 3rd party apps from our application. Is there any way to track how long a user is using these apps?
The only thing I could think of is starting the timer when I start the intent to launch the app, and upon return to our application stopping the timer. Any ideas on a more concrete idea? Thank you in advance.
Have you looked into Interacting with Other Applications does any of that apply? Your method does seem like the only possible way but I would do it by checking the system time in the onPause and onResume J.I.C your stops whilst being on the other app :) Hope I helped!

How to make sure that an app gets installed for one device only in 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 8 years ago.
Improve this question
Hello I am trying to implement an feature in one of my app so that it can be installed only on one device i guess trying with Device ID is one method Or are there any other methods to do so.......
If you are putting this on the Play store, users can always download any paid software again, as long as any device is linked with the same Google account used to purchase the app. This is designed to stop people losing apps should they get a new device etc and paying for it multiple times.
After reading your comments I believe what you wish the app to do potentially breaks Google Play TOC's. That said, you have not really described what you want to do well enough.
You could require the user to register with an email address before using the app. Maintain a database of emails that have been used to register the app and if an email has already been used, block them.
Note that while this is technically a solution to the question you asked, setting a limit like this is just going to irritate your users and is more likely to cause sales to go down (the few who buy will leave negative reviews, causing others to not buy), not up.

How to improve Android Beam discoverability [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
The presenters in the Google I/O session about Android Beam made some comments about "breaking Beam by adding things to it." They used an example of Beam being added to the Share menu, which is bad because Beam should be "magical" and "simple."
The problem that I have is that with no UI, Beam has a big discoverability problem. The average user will never use it if they don't know it is possible.
What are the best practices to let the user know that she can tap to share?
I'm creating a chat app where users can add others by NFC (and other ways). There is an activity where the users can see how to connect to others. In there there is also a piece about NFC. I guess when my users know by then that this is possible they will use it. Still... not all the phones have NFC yet, so users have to ask others: "Oh, umh, you have NFC?" Which they probably won't do to people that they just met or if the user isn't a geek.
I guess the best way to let users know they can use NFC to share stuff is by implementing it in all apps out there so it becomes default that it is there. Untill then, you should just tell your user it's possible like I did, with some text, symbol or animation.

Best place/area to store file for Trail period [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
I need to have a trial period (7 days) in my application. From this I came to know that you can do that by keeping permanent file, database or shared preference.
Where do I keep that file so that the user isn't able to see/delete it.
If I put that logic in Sharedpreference or a file with a path "data/data/packagename", when the application is uninstalled then all history will be lost.
Any other workaround/ideas?
Note: there is no server, application works locally with no Internet.
I would say a better workaround would be encrypt your file and then store it in a random place. This way, even if the user has the access to that file, he/she is least likely to tell it's purpose and delete it anyway. And Android has great support for encryption as well.
Have a look at these to get you started:
Android Crypto Implementation
Android Developer: Crypto Package Summary
You can store as hidden so no chance to delete by user
see this
I would say, make the application's data which can't be cleared from manifest like this:
android:manageSpaceActivity="YourStartingActivity"
in application tag.
Now place the application in database or application folder. This solution will save you from clearing application data. Now for uninstallation issue. Make a broad cast receiver which triggers when any application is uninstalled from the device. Once user will try uninstall your application you can catch it through receiver and prevent it. This broadcast receiver can be in a separate class like Watcher class which will be installed with your application.
You can do it easily. There are many examples.

Categories

Resources