MDM workflow in Android
Asked Answered
C

3

22

Can any one help me out how to do MDM Integration in Android from client and server prespective?

I want to do an enterprise application which having lock and wipe functionality. I have no any clue of workflow of MDM in Android.

Thanks.

Composition answered 7/3, 2012 at 9:17 Comment(4)
have you read through - developer.android.com/guide/topics/admin/device-admin.html? I'm not totally clear on the Android side of things other than what I've overheard in meetings, but you can either have an app poll a server for commands which the app then executes or there is a Google equivalent of Apple's APNS (push messages) that instruct the device to 'phone home' and get commands.Surplusage
Yes I have implemented DeviceAdmin sample, main problem is how to do these from remotely. As in iPhone MDM server sends commands to device and iOS execute that command automatically. Same process in Android how can I do?Composition
The most simple approach would be to have your app poll a server periodically and have the server respond with a command if there is one for that device.Surplusage
@Android Learner, Have you controlled your android device remotely to wipe/lock the device.If so let you guide me to implement the same.Salchunas
B
9

Android Device Admin API will do both things what you want to do (lock/wipe device and even more). An example is given and also you can find this complete source code in your Android SDK directory.

Now as client server perspective:

You have to implement your task (lock and wipe) in your android application (in client, i.e. known as agent). Now your application should be capable to communicate with your server or vice-verse.

I am 100% agree with adamk as he said "Remote controlling your application remains exclusively your responsibility - the Android framework does not provide (or enforce) any solution for that."

And Android gives your this feature too, as adamk said to use C2DM, he was right but now C2DM is deprecated, and GCM has been introduced, “a service that helps developers send data from servers to their Android applications on Android devices.” The service can send a message of up to 4 kb to an application on an Android device, most often to tell the application to retrieve a larger set of data. GCM will now handle all queueing and delivery for messages to Android applications.

You should read how to use GCM, and you can find sample code too. Download GCM Android Library from SDK Manager enter image description here and check android-sdk/extras/google/GCM directory

After establishing successful communication between your agent and server, evaluate msg in agent sent by server and perform desire action (lock/ wipe). This is again up to you how you define your message payload and how you handle those payloads in agent application.

Here is an article about Android MDM.

Happy Coding :)

Broadcasting answered 26/7, 2012 at 6:34 Comment(4)
Can you explain the steps need to follow wipe out the device data over remotely.and also update apk remotely without accessing any market place, with the use of internal server.Salchunas
With GCM will I be able to push a google play application into the enrolled android devices?Tamworth
@Tamworth No, That in not possible in any way. You can send url of app to device and device can go to the url.Broadcasting
Ok! Anyhow GCM with Device Admin is the only way to configure MDM in android devices right.?Tamworth
S
4

You can use DeviceAdmin to gain privileges for managing the Lock preferences and performing device wipe (among other stuff). (The user must add your app as a device administrator beforehand)

Remote controlling your application remains exclusively your responsibility - the Android framework does not provide (or enforce) any solution for that.

You may want to consider using Google's C2DM API, which is a convenient push mechanism.

Supinator answered 16/4, 2012 at 16:24 Comment(0)
S
0

As mentioned in the above answer, DeviceAdmin API can help. If you are using an Android device, you might know about the Android Device Manager (the web-based version) which allows you to manage your device. Basically, you can track, locate, lock, and wipe your device, some of the basic features of an MDM solution. So, in coding (though I am not a coding expert), you need to get access to the Device Manager (I guess, using some listener codes, or notification access).

Apart from this, MDM allows creating policies and groups of users (which would be a part of the coding in the app itself), then pushing the command over the internet (or OTA) to the connected device.

MDM also allows managing Apps and Data on the device, for which, you need the app to get access to the internal as well as external device storage. Hope this helps. Good luck creating your MDM software

Susanasusanetta answered 17/6, 2017 at 12:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.