Tampilkan postingan dengan label Android for Work. Tampilkan semua postingan
Tampilkan postingan dengan label Android for Work. Tampilkan semua postingan

Rabu, 11 November 2015

Testing your app for Android for Work

Posted by, Rich Hyndman, Developer Advocate





Testing is important whether you’re building a dedicated app for the workplace, rolling out new features, or making it easy for IT departments to deploy.



Test DPC is now available for you and is a fully featured, open-source, sample Device Policy Controller (DPC) which allows you to test your apps with any Android for Work feature. A DPC manages the security policies and work apps on devices using Android for Work.
You can configure Test DPC to be either a device or profile owner to test all the Android for Work scenarios:




  • Profile Owner: Employees using their personal phones for work and allowing their company to own the work applications and data (i.e. bring your own device or BYOD)

  • Device Owner: Enterprises providing devices to employees and managing the entire device

  • Device Owner: Enterprises deploying devices for a narrow use case, such as a mall directory or restaurant menu (i.e. corporate owned, single use devices)


Test DPC simplifies testing and development because you can use it to set the kinds of policies an IT administrator might enforce. You can establish app and intent restrictions, set up managed work profiles, enforce policies, and can even set up fully managed Android devices — something you might find as an info board or kiosk in a public place.



The Test DPC app can be found on Google Play with the source on GitHub. Set up Test DPC as a device/profile owner on your device by checking out this user guide.



If you want to learn more about Android for Work and its capabilities, check out Android for Work Application Developer Guide for full guidance on optimizing your app for Android for Work.



Note: Your test Android device needs to run Android 5.0 or later and be able to support Android for Work natively.

Rabu, 22 April 2015

New Android Code Samples

Posted by Rich Hyndman, Developer Advocate



A new set of Android code samples, covering Android Wear, Android for Work, NFC and Screen capturing, have been committed to our Google Samples repository on GitHub. Here’s a summary of the new code samples:



XYZTouristAttractions



This sample mimics a real world mobile and Android Wear app. It has a more refined design and also provides a practical example of how a mobile app would interact and communicate with its Wear counterpart.



The app itself is modeled after a hypothetical tourist attractions experience that notifies the user when they are in close proximity to notable points of interest. In parallel,the Wear component shows tourist attraction images and summary information, and provides quick actions for nearby tourist attractions in a GridViewPager UI component.



DeviceOwner - A Device Owner is a specialized type of device administrator that can control device security and configuration. This sample uses the DevicePolicyManager to demonstrate how to use device owner features, including configuring global settings (e.g.automatic time and time-zone) and setting the default launcher.



NfcProvisioning - This sample demonstrates how to use NFC to provision a device with a device owner. This sample sets up the peer device with the DeviceOwner sample by default. You can rewrite the configuration to use any other device owner.



NFC BeamLargeFiles - A demonstration of how to transfer large files via Android Beam on Android 4.1 and above. After the initial handshake over NFC, file transfer will take place over a secondary high-speed communication channel such as Bluetooth or WiFi Direct.



ScreenCapture - The MediaProjection API was added in Android Lollipop and allows you to easily capture screen contents and/or record system audio. The ScreenCapture sample demonstrates how to use the API to capture device screen in real time and show it on a SurfaceView.



As an additional bonus, the Santa Tracker Android app, including three games, two watch-faces and other goodies, was also recently open sourced and is now available on GitHub.





As with all the Android samples, you can also easily access these new additions in Android Studio using the built in Import Samples feature and they’re also available through our Samples Browser.





Check out a sample today to help you with your development!