How to block or hide app access on Android? - android

I want to know from your experience what are the best practices for remotely block/hide Android App?
With iOS you can hide certain (or all) apps with iOS profile and push the profile to iOS using MDM Server (if iOS in supervised mode)
Some people suggest creating an android app that monitors the foreground app and creates an overlay on top of it. do you think about this?

Let me tell you briefly about this because i did these type of things in past.
We can hide only our app in user mobile,we can't hide other apps in user mobile but we can block any app in user mobile. For this you can use any way either statically or dynamically(via server)
Now the question is how ? So here is the answer
You need to run background and foreground both service. Now detect the app (package). It means you need to detect whether app is in foreground or in background.
So if the app is in foreground then you need to close/block the app.
Now the another question is how we can close/block the app ?
Suppose you want to close/block Facebook app in user mobile then use condition like
if (packagename.equals("com.facebook.katana"){
Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addCategory(Intent.CATEGORY_HOME);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(startMain);
}
You need to use above code in service. Service will detect continuously whether Facebook app is in foreground or not. You can use timer or thread for this.
As soon as the service gets the Facebook Open then service will fire intent to Home Screen.
Above is the best possible way to close/ block the apps.
Thanks!

Do you plan to use it on your own devices?
If so, you can create an app that will be started when you boot the device that will control running tasks. And when you detect the app you wish to kill, the service will kill it. You can create remotely configuration about which apps you blacklist using Firebase RemoteConfig functionality. https://firebase.google.com/docs/remote-config/

Related

Can I build an app that interacts with another app that I don't own?

New here. I still didn't decide which technology I'll use to make this app, but the main feature is basically this:
There's app A and app B (I don't own any of these);
My app (C) needs only one role: when I login on app A it'll logout on app B and when I login on app B it'll logout on app A.
Note: Forcing app A or B to close will not logout or in.
Anyone knows a way to develop this? The app is supposed to be available on Android and iOS, I was planning to use nativescript.
Any help will be appreciated! Thanks,
Diogo
Unfortunately not because every app run in its specific sand box for security reasons. The only way to do something like that it is using broadcasts intents but the apps A and B should already be prepared to respond to a intent to log out and send a broadcast when log in. Probably it doesn't happen.
In iOS, this won't happen as every app is running on different sandbox and there is no relation between two sandboxes.
Thank you for all your answers. Very useful. Can I use an app to close and open others? For example, If I open Spotify it automatically closes YouTube music using my app. This way would only have to do with the smartphone or tablet.

Android app launch on background

We're developing an Android app for a POS system. Our app forwards the user to an app of a payment provider (Adyen) to handle the payment:
Intent intent = new Intent("com.adyen.posregister.payment");
// Here goes some irrelevant intent config
startActivityForResult(intent, 1);
However, the only thing the Adyen app does is firing up the payment terminal (over bluetooth). We would like to keep our own app visible all the time.
Question: is it possible to launch an external app (the Adyen app in this case) from our app, while keeping our app on the foreground?
Best regards,
Willem
The common methods to ask another app to perform a task for you without displaying any UI would be:
Starting a Service
Sending a message to a BroadcastReceiver
If the component you are using does not require UI it would make sense for it to support either or both methods, but whether or not it actually does is a question for the vendor.
In general there is no method to start another activity, forcing it to display no UI and return right away. Whether that happens is up to the other activity.

How to make an Android app running all the time

I am makin an android application on Emergency communication.I want my application should run all the time and whenever it needs it should be able to run.I want that user should not be able to close it by any means.Like Google Maps application which is restarted again on killing its all activities and even we force close it,it will be restarted.
Seems you are learning app development ... but this is not the way you should pose question here... you should post what you have done and code issues and not ask for an entire class...
But i will try to answer your question are you trying to create an app which when started wont be able to be closed and come back to home screen ???!!!!!
See you are creating an app which will run on android operating system which is similar to linux so you must follow the Activity
LifeCycle
I remember i created an app where there were shortcuts on screen so using that i was directing the user to specific links but you can use for calling etc.. i donno if that is what you are searching for...
You might create a notification bar if you want which cannot be cancelled and you can place the code in the intent which will be called from this...
Also services are there which u can utilized what other users have suggested...
thx
You could use an extra service running in the foreground, but there will be always a notification of this service in the notification bar.
See here: http://developer.android.com/guide/components/services.html#Foreground

Close android service with a password

I'm working on android application which have one service runs in background,
I need to make sure that the user will close the app/service only upon inserting password (like app lock on the market only for the service and the app).
Any ideas suggestion of how to implement such a feature?
On android 2.3 isn't possible the user will kill your app, but starting with Android 4.0 and Device Administrator it is: reasonable. Take a look at Kaspersky's parental control app.

Android phone as a dedicated device

We want to use Android mobile for dedicated application. Can somebody suggest how can we make it happen.
Here are the requirement:
The phone when started, should launch our application., so the user cannot launch any other application. The application will be a 1D barcode reader.
The application should be live as long as the phone is up and running, user cannot close the application at all.
Thanks for your help.
Regards,
Manish
Android after boot is complete sends a bradcast intent:
android.intent.action.BOOT_COMPLETED
if you listen for this intent, you can launch a service that in turn launch your activity.
In the Activity you have to take care of the user's interactions that explicitly close the activity, like home button, back button and camera button press.
Setting your activity to be full-screen also should prevent the user to use the notification bar to interact with notification like those from market-app that can close your activity.
Finally, your activity can be killed by the system by various and uncatchable reasons: in those cases, the service that first launched your Activity comes in handy, as it can periodically monitor the general state of the application and relaunch components as needed.
Check out the new Android Enterprise solutions for your use case.
https://developers.google.com/android/work/overview
Its well documented. You can either use
Android Management API to provision the devices and apply policies to the device which will be applied to the device using Android's Device Policy Controller (DPC) or,
Use Google Play EMM API and develop your custom DPC
It depends upon your use-case really, but the first solution set should serve your purpose
I'm afraid there's no single answer to this, but you need to work on multiple fronts.
One of these fronts is preventing user from running other applications: for this there are applications sold on Android Market that can put other apps of your choosing behind passcode.
You need to combine this with automatic launch, but I don't yet know how to do that.

Categories

Resources