Airwatch Android implementation
Asked Answered
C

3

6

My question might seem really stupid, to those who have worked on android Airwatch implementation. But their documentation is not very well written, and I have a few doubts.

So I have setup my user, and added my device using airwatch console.

I have added the App restrictions code in my existing android application.

I have also added the key, values to be pushed to application, via Airwatch Agent app.

But I do not receive these key, values, which I should when I execute the following code :

Bundle appRestrictions = myRestrictionsMgr.getApplicationRestrictions();

The appRestrictions bundle is empty.

I read some where in the docs, that the AppConfig requires Android 5.0+ with Android for Work Device. Does this mean I have to enable android for work capability on my android device? Is this required even for development purpose? I tried in vain doing so using this link : https://support.google.com/a/answer/6178111?hl=en. Can some one please share a doc, to enable android for work capability on my android device, if this is required.

Calandra answered 5/5, 2016 at 14:18 Comment(3)
Did you get any solution to this ?Ammadas
Please do share your answer if you had implemented this.Ammadas
Now, are you able to get the bundle with key and value ? If so, could you please let me know how to do thatAmmadas
U
8

You will indeed need Android for Work in order to use Airwatch to configure your application.

You should ensure you are using a device that supports AfW. All devices with Android 6.0+ support work profiles, as well as many devices with Android 5.0+. Some recommended devices can be found here

Once you have done so, you should create a new Profile in the Airwatch console that ensure that they will create a work profile on your device. Go to Devices >> Profiles >> List View and Click on "Add" >> "Add Profile" and choose "Android" >> "Android for Work"

This should allow you to create an AfW policy that will apply to any assigned groups. Any apps you push to these devices can be configured using the App Restrictions framework by editing an application, going to the "Deployment" tab and enabling "Send Application Configuration". You should be able to set the key value pairs from there.

All that being said, if you are testing from a development perspective, you are much better off testing with TestDPC, an open source testing tool Google makes available in Google Play (just search for "TestDPC") and on Github

There is a user guide on github, but it is very easy to use for creating work profiles, setting app configurations using app restrictions and more.

I would use Airwatch once you are ready to do production testing, but TestDPC is a much better tool while you are still developing.

Unready answered 5/5, 2016 at 21:22 Comment(7)
Hey natanel, thanks for the detailed explaination. I just need one clarification. What do you mean by I need Android for Work to use Airwatch. Does it mean implementing App restrictions code, to use App Configuration capability of airwatch? What changes do I need to do to my application, apart from that?Calandra
No changes need to be made to your application, but you will need to use Airwatch or TetDPC to create a work profile, or you will need to provision the device so that TestDPC or Airwatch are the device owner. Essentially you need to rely on the managing application to administer the device correctly. More detail on what Enterprise Mobility Managers have to build to support Android for Work can be found at developers.google.com/android/work. There are some best practices for work profiles at developer.android.com/training/enterprise/….Unready
Hi Natanel. I am using Test Dpc but every time I try to retrieve my app restrictions the bundle is empty. Test Dpc can read my the default values app restrictions, but my application cannot read them. Do you have any ideas why this may be? Any help will be appreciated.Hyponasty
Could not find Android for Work when I choose android. @NatanelFuchs Go to Devices >> Profiles >> List View and Click on "Add" >> "Add Profile" and choose "Android" >> "Android for Work"Ammadas
@NatanelFuchs: Couldn't find even Deployment tab too. Could you please tell me where exactly i can find this "going to the "Deployment" tab and enabling "Send Application Configuration"."Ammadas
Hi people, I found this blog really helpful. It helped it setup the Airwatch for android. Thought it would be worth sharing. aerion.fi/blogi/89-airwatch-integration-with-android-for-workCalandra
Hi @MayurMore: Could you please help me on the following question: #42113188 FYI, I have a created a sample app and published in playstore. All i need is how can push app config from airwatch console to my application. I am able to install the application from airwatch console. But unable to get the key value pairs. Your help is really appreciatedAmmadas
I
0

On Android the key-value pairs must be validated by Google Play. There are 2 ways to achieve that:

  • Publish your app to the Google play store (see Wandera app, for example)
  • Publish your app in the company private store. To do this you'll need to configure your Android for Work account

On iOS is simpler, just specify the key-value pairs at assignment time.

Intoxicated answered 1/12, 2017 at 8:58 Comment(0)
S
-1

For AirWatch, your key-value pair information belongs to CustomSettings, so you should use the APi to retrieve CustomSettings, like below:

final boolean isEnrolled = awSDKManager.isEnrolled();
if (isEnrolled) {
      final String settings = awSDKManager.getCustomSettings();
}
Sural answered 7/9, 2016 at 4:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.