In Android some system applications cannot be uninstalled.
Is there any way to configure an application so that it cannot be uninstalled by the user?
I want to hide the uninstall button in app settings, like a system app such as this:
Not really - the only way to achieve this would be to create a custom ROM. The uninstallable apps are "system apps", or apps installed by default. Often, those are unneeded apps added there by the mobile network or the phone producer. Even those can be uninstalled though when you root your phone :)
Your app can disable the Uninstall button by requesting Device Administration permission from the user.
The user cannot uninstall until they remove the Device Administration permission in Settings. In this case your app's DeviceAdminReceiver will be called, giving your app a chance to react.
http://developer.android.com/guide/topics/admin/device-admin.html
I guess you're mainly looking for a technical solution. But as there is no purely technical solution for a wider audience, you might be open for alternatives:
The phone manufacturer and the telecom provider have means to pre-install apps on a phone that cannot be uninstalled. So one way would be to get in contact with them and see if one of them is willing to cooperate with you. You'll probably need to offer them something in return.
Related
Android system now gives users the decision to give or restrict internet access to selected apps. This is very detrimental to developers, especially for developers that use AdMob and other advertisement services. How to know that users don't give internet access to our app so i can give them warnings?
This is what i mean "Android system now gives users the decision to give or restrict internet access to selected apps":
Internet permission is normal permission in android 12(Which is least preview version of android) too. I don't know what is your problem but if you want to check user's network status, see this document https://developer.android.com/training/basics/network-ops/managing
EDIT
In your case, if turning off switch, android will block network in background. This document will help you https://developer.android.com/training/basics/network-ops/data-saver?hl=en
Forground access will works fine. You're able to access internet switch has been disabled also.
I am a beginner in android development. I want to know that is it possible to know the app which is opened currently. I came to know that finding the apps which are running currently through Activity Manager (getRunningTasks()) is now removed from the Android studio. So I want to know is there any other way to know? I just want to know the app which is opened and running currently on the mobile but not the apps running in the background Could somebody please help me in this case?
You can use AccessibilityService to get event notification. But AccessibilityService are specifically for accessibility uses. If you use the service for other purposes, then the application will more likely to be downed/removed for PlayStore due to policies. Another viable option is UsageStatsManager, but with some limitations.
UsageStatsManager is not push event based system. You have to poll in few mills(depends upon the use-case)
Usage Access Permission grant/deny is not straight forward. You have to start Setting Activity with Settings#ACTION_USAGE_ACCESS_SETTINGS action and have to rely on the users understanding of how to grant permission(Since permission list may contain other applications).
I was wondering if anyone had a relatively simple solution for us.
We created an app to be used by our clients on android devices that we give them.
We would like the client to only be able to use our app and have limited access to everything else (i.e. settings, email etc.) What is the best way to achieve this without using 3rd party apps.
Thank you in advance!
This may not help but the L preview has a task locking feature included that may be of some insight, I'm not aware of how it functions as yet
Task locking
The L Developer Preview introduces a new task locking API that lets you temporarily restrict users from leaving your app or being interrupted by notifications. This could be used, for example, if you are developing an education app to support high stakes assessment requirements on Android. Once your app activates this mode, users will not be able to see notifications, access other apps, or return to the Home screen, until your app exits the mode.
http://developer.android.com/preview/api-overview.html
Hope this helped
Suppress the Title Bar & Make Your App a Launcher
Root Your Tablet
Modify System Files and Settings to hide the soft keys
On the next link you can find the complete solution for the Nexus 7 (2012)
http://thebitplague.wordpress.com/2013/04/05/kiosk-mode-on-the-nexus-7/
simple Answer is:
Lock Install button with modify system settings.
Create your own customized-ROM and apply your requirement to that ROM.
more info, visit XDADavelopers
I am installing security software/hardware into a couple different school districts. The application is at it's final stage, however I will need to send updates to users periodically. For example, a general password will be changed for the application every 6 months.
Installing an .apk is considered an "update" after the initial application is installed, correct?
I just have a feeling that there should be some easy way of doing this. I don't really want to give people an .apk. Someone could get smart and tear it apart to find the contents. That, and some others might not understand how to install files on their phone.
What are your ideas? Maybe a web link a user can go to that starts the install for them?
You have multiple misconceptions how updating, APKs and keeping keys secure work.
You have to host your APKs somewhere. Github releases is a pretty common way (but slow), but you could also use google drive, dropbox or your own server.
Your app has to fetch the server regularly and check if a new APK is available (pull-based). Second option is to use push notification in some kind e.g. FCM (push-based). Then you download the APK and let the user install it. Your app cannot start a installation by itself, it has to be done by the user.
But you can redirect the user to the installation menu with that APK, so he just has to click "Install". "Install from unknown sources" has to be enabled for that, if not the user will get an information about that from the OS with a way to enable.
There are apps like "APK extractor" which get you the APKs from google play without root, so there's nothing wrong about giving out the APK. Your APK should never contain secure keys which the user isn't allowed to see. It's easy to reverse engineer those keys, it's just a matter of time.
Is there a way to search another devices installed application using bluetooth? Actual requirement is, is there a way to search the paired devices installed applications.
Any help is really appreciated.
Sorry, but this is not possible, unless you specifically have your own app on both sides and are somehow enabling this yourself. There is nothing built into Android to allow an arbitrary device to attack another arbitrary device (e.g., get at private information like installed applications).