How to know other application is in use from my application - android

I have a requirement that , I want to do some changes in my application, If some other application ,let say "com.android.abc" is in use.
Pl. let me know can I get the package names of the currently running apps in my application..?
I can use Broad cast receiver , but I dont have access for the other application to modify it and send some notification to my app.
thanks.

See this.
If you can't do that (as in, get that permission), then you can't accomplish this.

Related

Where can I find this line of code getWindow().setFlags (WindowManager.FLAG_SECU RE, WindowManager.FLAG_SECURE);

I want to disable flag secure in a particular application after searching I got to know this is the line of code I need to remove.....
getWindow().setFlags (WindowManager.FLAG_SECU RE, WindowManager.FLAG_SECURE);
I am not a programmer or anything no knowledge just a beginner by myself. I don't know where can I find this line of code I checked in androidmenifest.xml but there's nothing. If someone is explaining can you please tell me that after removing this line of code I will be able to screen recording of that application right? Nothing more I have to do? Just remove this line of code?
I tried taichi application too it worked in other applications like jio tv, Remini etc but not in that application. I think The reason behind it can be that application stores id of my phone or imei number at their server and you guys know taichi run its pached application on their platform that's why my application recognise it and error comes out. Now you may know that if I try to download that application in another phone (rooted/nonrooted) and login with my phone number it shows error...
Conclusion- I can't login in another phone with same login id ...the phone must be same which I used to create login id and pass in the beginning....HELP PLEASE
you can use getActivity() or requireActivity() before.getWindow()
this getActivity() will return the Activity this fragment is currently
associated with.
Example from Activity
getActivity().getWindow().setFlags (WindowManager.FLAG_SECU RE, WindowManager.FLAG_SECURE);
Example from Fragment
requireActivity().getWindow().setFlags (WindowManager.FLAG_SECU RE, WindowManager.FLAG_SECURE);
Those lines should usually be applied in an Application class if the whole app can't be screen recorded. If only certain screens are secured, check the Activity or Fragment classes.
Despite all that, you can just use the software srcpy on your PC to connect your phone and screen record it even when FLAG_SECURE is set.

use ACTION_PACKAGE_REMOVED

I want to make an app when I remove it in setting meno,shows me a message that includ app's information . I know that I have to use BroadcastRiceiver for doing it, but I don't know how can I do it?
Thanks

Is it possible to get latest missed call or received sms notification from a class which we created on android?

I am able to see getting new sms or calllog from apks which I built but my question is that;
for example I create a .class which in
<com.example.xx
Can I use it on my any other apk's layout xml file using <com.example.xx ... /> using with layout width and height.
Is that possible? If so can you create this class file ?
( I know manifest needs receiver and permissions for latest missed calls & messages)
I hope I can explain clearly what I mean
I'm also not sure what you're asking, but...
Yes, you can access the latest sms or the call log from any Activity you want, from any apk you want, and/or from pretty much from anywhere you want on the phone.
You'd use a Content Provider to access that information. If you wanted to, you could even use a Broadcast Receiver to trigger your application whenever you received a message or phone call.
And yes, you could even do this in a library if you wanted (so that others could use it from their own layouts). If that's what you're asking.
And yes, you could even do this from one apk to another apk through intents if you wanted (not that I would see any advantage to doing that). May be, that last one is not what you were asking.
Have I answered your question?

Sending data to server when android application is unistalled

I would like to notify my server that the user deleted the application. How can I accomplish this?
Get application uninstall event in android
According to this post what you ask for is not possible. Are you by any chance using a C2DM implementation?
Unfortunately there is currently no way for an Android package to execute code when it is removed. However, you can register a BroadcastReceiver for ACTION_PACKAGE_REMOVED in a different package that will be called when packages are removed from the phone.
Also see this question.

How can i know supported intents of the 3rd party app

I've built an app called xLancer (https://market.android.com/details?id=kz.jay.xlancer.activity) that retrieves job listings from Elance. Now i want to implement a feature that would remind me to bid on a project at a later time. Instead of reinventing the wheel i want to launch any external TODO/Task manager app. But now i am stuck, i don't know which URI or action should be specified, so far i've only used intents to call my internal activities by specifying class name explicitly.
So the question is: how can i know which URI/action should be specified?
Look here, I didn't see any Todo/Task intents there though....

Categories

Resources