Android enterprise application development

29
Android Enterprise Application Development Device Administration API

description

 

Transcript of Android enterprise application development

Page 1: Android enterprise application development

Android Enterprise Application Development

Device Administration API

Regards,Paramvir Singh

Page 2: Android enterprise application development

Enterprises and Mobiles

• Every employee use mobile, most of them migrating to smart-phones.

• Big enterprises’ IT departments buy mobiles in bulk and issue them to employees.

• Smartphone as business phone : Workplace acceptance?

Page 3: Android enterprise application development

Workplace Acceptance of a mobile phone

• Personal needs?• Social needs?• Productivity needs?

Page 4: Android enterprise application development

Workplace Acceptance of a mobile phone

• Personal needs?• Social needs?• Productivity needs?• IT department

requirements?

Page 5: Android enterprise application development

What they demand from your phone?

• Data security • Device management• Applications

Page 6: Android enterprise application development

Data Security

Loss and theft

Interception

Employees

Page 7: Android enterprise application development

Device Management

• Registering different devices in company’s network

• Specific security policies for organization• User support• Keeping an eye

Page 8: Android enterprise application development

Deploying Applications

Page 9: Android enterprise application development

Deploying ApplicationsTo Enhance productivity

Page 10: Android enterprise application development

Deploying Applications

Identify

apps

Buy or

build

Distribution to employees

Updates

Usage

policies

To Enhance productivity

Page 11: Android enterprise application development

So how Android fits here?

Page 12: Android enterprise application development

So how Android fits here?

• VPN Support and secure Wi-Fi• Exchange email• Password / PIN Lock• Device Policies• Remote Lock / remote wipe API• Exchange calendar

Page 13: Android enterprise application development

• Exchange Active Sync• NFC Platform support for read, write, P2P

&• Improving continuously…

So how Android fits here?

Page 14: Android enterprise application development

What is there for developers?

Page 15: Android enterprise application development

What is there for developers?

Device Administration API

Page 16: Android enterprise application development

Device Administration API

• From 2.2• For “security aware ” apps• For almost all type of enterprise mobile

solutions

Page 17: Android enterprise application development

Application + Device administration API =

IT people are watching you!

Page 18: Android enterprise application development

Application + Device administration API =

You get the (sensitive) data!

Page 19: Android enterprise application development

Device Administration API

• Password policy• Remote wipe• Disable Camera • Enforced data encryption• Remote lock

Page 20: Android enterprise application development

Show me the API’s

• DeviceAdminReceiver • DevicePolicyManager• DeviceAdminInfo

Page 21: Android enterprise application development

DeviceAdminReceiver

• Broadcast Receiver to receive the raw system events

• Must include a subclass of this receiver• Action : DEVICE_ADMIN_ENABLED• Permission : BIND_DEVICE_ADMIN• Handles the event when user “enables” the

admin application

Page 22: Android enterprise application development

AdminReceiver in Manifest<receiver android:name=“.app.SampleAdmin”

android:label=“@string/admin_string” android:description="@string/sample_description” android:permission="android.permission.BIND_DEVICE_ADMIN">

<meta-data android:name="android.app.device_admin"android:resource="@xml/admin_sample_meta" />

<intent-filter><action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />

</intent-filter></receiver>

Page 23: Android enterprise application development

To Enable the device admin app

Intent intent = new Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN);

intent.putExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN, adminReceiverObject);intent.putExtra(DevicePolicyManager.EXTRA_ADD_EXPLANATION, “Some explanation.");startActivityForResult(intent, RESULT_ENABLE);

Page 24: Android enterprise application development

DeviceAdminInfo : Meta data : usage policies

<limit-password /><reset-password /><force-lock /><wipe-data /><expire-password /><encrypted-storage />

Page 25: Android enterprise application development

public class SampleAdmin extends DeviceAdminReceiver {

@Override

public void onEnabled(Context context, Intent intent) {

}

@Override

public CharSequence onDisableRequested(Context context, Intent intent) {

return “Custom message ";

}

@Override

public void onDisabled(Context context, Intent intent) {

}

@Override

public void onPasswordChanged(Context context, Intent intent) {

}

}

Page 26: Android enterprise application development

DevicePolicyManager

• To manage policies• Can be related to one or more admin receivers

DevicePolicyManager objDPM = (DevicePolicyManager)getSystemService(Context.DEVICE_POLICY_SERVICE);

objDevicePolicyManager. isAdminActive(objDeviceAdminSample)

Page 27: Android enterprise application development

DevicePolicyManager

• To set all password policies• To perform device lock• To perform data wipeIntent intent = new

Intent(DevicePolicyManager.ACTION_SET_NEW_PASSWORD);startActivity(intent);

objDPM.setPasswordQuality(objDeviceAdminReceiver, DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC);

long timeMs =1000 *5 *60;// 5 minutesobjDPM.setMaximumTimeToLock(objDeviceAdminReceiver, timeMs);

Page 28: Android enterprise application development

• Lock now : objDevicePolicyManager.lockNow();

• Data wipe : objDevicePolicyManager.wipeData(0); //argument currently must be zero

Page 29: Android enterprise application development

Q?

Paramvir SinghConsultant, Xebia

@param_vir88+919779623863