Have every control on android phone for company - android

Is it possible to have some controls on a mobile phone. ( Working for a company )
I want to do something like:
Disable access to parameter
Disable call
Disable play store
Disable message
...
Enable only my application for my company
I thaught that I could made my own system, but it's seems to take so much time. So if someone has an idea. Thanks

Related

How to know if your app was enabled by Hey Siri or OK Google?

I want my app to basically know when the user spoke to the device and switched to my app (or launched it). Something like:
“Hey Siri, ”
Or
“OK Google, ”
That’s it. From there, my app would automatically emit a prompting sound and enable the microphone for eg more complex commands, which I plan to use OpenEars or other onboard AI for — no need to send to server.
But how do I know on iOS and Android that the app was put into the foreground by Siri or Google Assistant?

Android- programmatically restrict which apps can be run

I'm building an app that needs to restrict which apps can be run along with it.
In example, when my app is running (foreground or background) I can allow user to run only GoogleMaps, and MusicPlayer.
I've read a bit about Device Policy Controller and creating profiles, and up to some point it seems to have the feature I need, but it is designed for enterprise deployment, and user needs to encrypt their phone beforehand. Is creating personalized profiles a way to go?
My other idea was to run a service that each few milliseconds check if there is any forbidden app running and finish it, but it seems to be not robust.
Is there any way of handling this problem programmatically?
I don't think that Device Policy Controller is a right thing for you.
And you can't just kill other apps without root.
So some kind of user-friendly way to achieve the goal is to check running apps list with ActivityManager.getRunningAppProcesses and to notify user that he has to finish particular apps to use your app.

Is there a way to remotely monitor a specific Android application?

There is an android application I am planning to write, that will be used as an "always on" application (kiosk-mode) used on Android tablets running restaurant menu. Today, I already have a rudimentary application, but it is not quite what might qualify as kiosk-mode, since sometimes users close the application.
I wanted to see if there is a way to monitor the application remotely (or on device itself) and automatically restart it, s.t. it comes the foreground application ?
Of course, I'd prefer to remotely monitor for some remote customer service. It is not exactly essential to view (in remote desktop / vnc sense), but gather information like application health (running in foreground or not), get it's logs etc. Now I understand that on an unrooted device an applications log is not visible to other applications. So I was wondering if I could design my application to create light logs or status information, in a non-standard way, that could be shared by my other monitoring application.
While I get a feel that I am reinventing the wheel, since requirements like these seem far-from-unique, but in my search haven't found much beyond the standard 'screen cast' / 'screen share' applications... most of which either don't work too well (especially without root), or need one to jump through hoops to get them working.
There are ways to monitor activities of your application. There are utilities available to help you keep logs of events carried out by the users of the application. Like getting statistical information. They are typically Mobile Analytics tools.
Check this for instance: https://mixpanel.com/
This for example can help to keep track of events fired by the application. You can even send mails and notification to the users. There are similar tools available. For instance Google Analytics for Mobile Apps
The other possibility is to use Google Cloud Messaging. I believe this is even more powerful, which may help us to control our application to some extent. You may find this of help: http://hmkcode.com/android-google-cloud-messaging-tutorial/

Android turn gps on using NDK?

I would like to ask about something. I'm now aware that there's no possibility to turn GPS on via normal SDK application. My problem is that I need to do it without user's confirmation (my application's fundamental is to work silently). I need it because my application is meant to be used by a company to track their devices (tablets). It needs to turn on GPS to obtain location and after that turn it off. That means, if we prompt user to turn GPS on, he may not do it and the application (a service actually) will not work properly.
My next step is to find an alternative solution, I mean, if we turn GPS on using settings, it eventually gets turned on by a core application/service. My assumption is that it uses native code to access the GPS device and turn it on (if I'm wrong, please correct me and point to the right answer).
Therefore my question is - if possible, how can I do that in NDK and later on how to integrate it with my application. If NDK can't handle it, how it can be done? There must be a way, since it's eventually done in settings.
I would also like to ask the same question about Internet connection (to alternatively use network provider to obtain location).
Thanks in advance for any contribution!
You might find a way to handle GPS with NDK/JNI calls, but there's no such thing as GPS without notice to the user on an Android device. He can switch GPS off or refuse to switch it on. In such a case, that device itself (the hardware) switches the GPS sensor off.
What might be possible is to use other ways to locate the device:
Wifi gives you the position not as accurate as GPS, but better then nothing
Carrier track the position of a device according to the signal strength arriving at their antennas. But I haven't seen any Android interface able to handle that (might be a question to ask here, if anybody knows how to get that information)
The way, I'd handle your problem is on the organizational side (as this is company internal stuff): You basically say to the user: "Switch on GPS and you, user, get access to your emails" (well, as an example)
Give something and you will get something back :-)
"Settings" is not an application to begin with.
So if you already made an application you should understand somehow the basics of Android applications but if you didn't really understand them then I'd like to say that the applications generally run in a "sandbox" and these applications may be destroyed / terminated by the system should it deem it necessary. There's also no such thing as "silent mode" either. The user MUST ACCEPT / DECLINE permissions and the user MUST be in control of his device should you have the Android OS installed on your devices.
There are ways to circumvent that of course and those ways may be ranging from:
Make all devices have one central account on Google Play and activate the service to erase / destroy the device if they get lost, (You can find that in settings since you mentioned it ... under administrator accounts) and leave things right there as they are since that's all you need at the end of the day.
(Requires 1 to be enabled) You should make all your corporate devices (if you want to be that kind of jailer but going that path will make your employees just see you as a not so great employer) to run your piece of software and every single thing that needs access to your network will be running on a proprietary custom encrypted channel (no public encryption) and with the usage of the administrator account you being able to control what the users can install on their devices you can restrict that the only application is that said application that was mentioned above. Now make all that your employees need as a subapplication of your application ;) and on top of that enable these applications to be able to run ONLY if there's GPS signal (so if your employee gets in the tube ... his device will stop working) add / subtract whatever you feel right from this.
Be a good employer and just leave them do whatever they please with the devices you gave them. If you give trust you'll receive joy for the work they're doing meanwhile if you jail people you receive negative emotions and bad performance (eventually it can even go in the direction that people will just leave for a better employer)
From all the 3 I would certain go for the third option if I were in your shoes. From a technology challenge the #2 is I think the only way and a very interesting architecture that you could implement ... in a long time ... so you also need to make sure the effort invested in this is worth the 2 hours your employer will play angry birds at home with his child ;) nevertheless if you're in it for the challenge more than any real world application this is a great chance for you to learn the android operating system from all its perspectives. NDK may help you here but not the way you want it... more along the lines of custom encryption and so on.
EDIT: Sorry for my twisted logic and way of expressing but it's pretty late and has been a very long day.

Screen Lock password in android

I am developing an application where I have to change the screen lock password on a button click,can anybody tell me how can I do this.
If you are talking about the unlock pass word set in the device settings by the user then the answer is you can't.
If an application could change the unlock password/pattern without user interaction then these security features would be mostly useless. A rogue application could in theory lock the user out of their own device if this were possible.
Edit: if your aim is not to change this value without interaction but just to send them to the correct settings page. You might be able to do that some how. You'd want to look into what intents you can use to start the Settings Activities. But if you are developing this application for use by the general public I would strongly recommend you rethink having try to do anything with the users security settings. As a user if an application prompted and then sent me to the security settings page with the intention of having me change something in there I would immediately uninstall it.
Edit 2: I've never seen it until just now so I don't know for sure what they used to achieve that. Since it states that must be android 2.2+ though I would assume they are using the Device Administration APIs The docs seem to indicate that it can "Prompt user to set a new password." Which I would think means that it is just going to start the settings activity for them. It is not actually changing the password value by itself. This whole API is subject to user activation also. So even if you get installed on a device the user must explicitly "activate" your app before it is able to make use of any of the admin APIs
I am sure the only way this is possible is if you signed your APK with the device key. This way it could access API's that are limited to system applications. This isn't possible for a normal app, only one that is baked into a custom ROM or device manufacturer ROM when building Android from source.
I do not exactly understand what you are trying to do. If you wish to change the lock screen password programmatically, and your'e application is A device administration than you can call:
resetPassword method of DevicePolicyManager like this for example:
m_policyManager.resetPassword("bla bla", DevicePolicyManager.PASSWORD_QUALITY_SOMETHING);

Categories

Resources