Detect which applications have been opened [duplicate] - android

This question already has answers here:
Android, Detect when other apps are launched
(8 answers)
Closed 6 years ago.
I have such a problem, it is necessary if you run any application to output Toast with the text "some application to run," and when closed by show again Toast with text "some application is completed."
For example launched Play Market, and in my app Toast with the text "Play Market is run."
I have no idea how it implemented, it seems necessary to use the Service Broadcast. Please tell me how to implement?

To the best of my knowledge, outside of possible security flaws, there is no reliable way to implement what you want on Android 5.0 and higher, for privacy and security reasons.

Related

How to have only one app on an android device? [duplicate]

This question already has answers here:
Kiosk mode in Android
(11 answers)
Closed 7 years ago.
Is there a way to hide all apps installed on the device and make only one app available to the user? In a way that the app automatically starts as soon as the screen is unlocked?
What I basically want to do is to have a device that's dedicated to the use of a single app. Can this somehow be accomplished? What options are available?
Since this app won't be distributed through google play or any other official channel, any even undocumented hacks would be an option. Any advise is welcome.
The only way that I think this can be implemented is by creating an custom launcher and include your app inside that launcher.

Launch app in market if not installed [duplicate]

This question already has answers here:
Detect from browser if a specific application is installed in Android
(5 answers)
Closed 8 years ago.
I can launch my app from the browser if it is installed using intent-filters. If the app is not installed, I would like the user brought to the app specific page in the market. I don't care if I have to handle this or if the platform does this for me, I only need to know how to set up the intent-filter, protocols, anchor tags, etc.
thank you!
There is no "normal" way to do it. What you can do, however, is to always provide a link to your app in Google Play and have an intent in your app handle that link. Thus, the app will open when the market link is clicked if it has already been installed. The downside is if the app is installed, the user will be presented with a dialog and will have to make a choice of whether to launch the link in a browser or in your app.
See this answer for a code sample: https://stackoverflow.com/a/12901352/379245

Overriding HomeKey in Android JB and above [duplicate]

This question already has an answer here:
override Home key in android ICS
(1 answer)
Closed 8 years ago.
How can we override the home key in Android JB and above.I have searched a lot of threads but those doesn't work for Latest android versions.Also this is possible as I have checked in some apps available in Play Store such as "Active LockScreen".
you cannot override the home button for security reason. it is the only way a user can always leave an app
As of now I have found the way by making my app Launcher and let the user chose if he/she want to disable the home key functionality while App is running.While App is not in foreground My App fires Intent DEFAULT_LAUNCHER_INTENT to display the DEFAULT Launcher.
I'll post if find another work around without making the app Launcher.

Screenshot without root [duplicate]

This question already has answers here:
How to programmatically take a screenshot on Android?
(26 answers)
Closed 9 years ago.
Which class is responsible for creating screenshots? Is it possible to change it and include in own project to take screenshots of ANY application? Has anyone tried to do so?
Is it possible to change it and include in own project to take screenshots of ANY application?
Fortunately, no, for obvious privacy and security reasons. Development tools and rooted device users can take arbitrary screenshots. Apps can take "screenshots" of their own content, but not that of other apps, to help prevent malware from stealing data from other apps.

How to detect if the user has linked to Google Market account [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to find Gmail account associated with Android Market?
In Android, is there an easy way in code to detect if the user has linked their phone to Google Market using a gmail address?
It seems to me like the right thing to ask at this point is, "What are you really trying to do?"
The most obvious use case I can think of is to verify that the user is legitimately using your app, in which case you might find the right answer in Application Licensing: http://developer.android.com/guide/google/play/licensing/index.html
The next most obvious use case I can think of is you want to help the user install something, in which case maybe your answer is in Linking to your Application: http://developer.android.com/distribute/googleplay/promote/linking.html
For other cases, the answer may begin with Account Manager. Try here: http://developer.android.com/training/id-auth/identify.html

Categories

Resources