Commit Graph

2116 Commits

Author SHA1 Message Date
Nick Kralevich
2ad812d4aa Initial checkin: optional permissions sample code
This is an initial checkin of a small demonstration program
which demonstrates how optional permissions can be used.
This app can do three things, which require permissions:

* Vibrate the device (android.permission.VIBRATE)
* Access the internet (android.permission.INTERNET)
* Get the phone number (android.permission.READ_PHONE_STATE)

At install time, this app has zero permissions.  However, the app can
request that the user grant permissions, based on pressing the "Prompt"
button. The user can then choose to allow or deny the permissions.

Known bugs and limitations:
* Once a permission is granted, it currently cannot be revoked by the
application nor the user.
* Due to the way it's implemented, the INTERNET permission requires a
restart of the application. That isn't in the sample code.
* Getting the device phone number doesn't make sense for a tablet.

This code was mostly written by klyubin@google.com with heavy
modification by myself.

Change-Id: I620db52c4a1f10ac7aa604ba34f77f7ec03af023
2013-03-27 16:54:04 -07:00
Jeff Sharkey
ccf3ef27ce Merge "Remove reference to <root-path>." into jb-mr2-dev 2013-03-26 17:13:12 +00:00
Jeff Sharkey
29045946c0 Remove reference to <root-path>.
Bug: 8409523
Change-Id: I42834e33d0d664977dca9277ae364d2cf8986d07
2013-03-25 16:16:51 -07:00
Fabrice Di Meglio
e7b90faf8f Merge "Fix ExpandableList1 sample" into jb-mr2-dev 2013-03-25 21:20:25 +00:00
Scott Main
8e2b7c5d3f am e92f6467: am 35964ea6: am 449326f1: am d49fbdbc: add support library JAR to sample
* commit 'e92f6467d0c85c7f2f8f5f5dc1dbfb8695f8c545':
  add support library JAR to sample
2013-03-25 09:02:54 -07:00
Scott Main
e92f6467d0 am 35964ea6: am 449326f1: am d49fbdbc: add support library JAR to sample
* commit '35964ea619381ed65aa04ea2e5071ebaa1b56f92':
  add support library JAR to sample
2013-03-25 09:00:26 -07:00
Jeff Brown
fbe0890bb4 Rename methods of RouteController.
Add basic support for returning stream ids.

Change-Id: Iaa11980e6195e23bd598075cb066c6234f000198
2013-03-22 19:46:23 -07:00
Fabrice Di Meglio
de817c95df Fix ExpandableList1 sample
- also increase android:targetSdkVersion to 17

Change-Id: Ibceb38f5514a7c321f75d267e40c338c0340b1ef
2013-03-22 16:28:46 -07:00
Dianne Hackborn
d2655277cd Add TransportController API demo.
Change-Id: Id852ac8de1bcfbfba2d9e8557664c1aaa1e75df4
2013-03-22 14:28:52 -07:00
Scott Main
d49fbdbcc1 add support library JAR to sample
Change-Id: I15c30e19606a0b3415d5883bced4c2f56fd703fa
2013-03-22 09:53:15 -07:00
Jeff Brown
84e6be0c69 Add action bar support library samples.
These samples are simply ported from the ApiDemos package
with package names updated to use the support library
implementation instead.

Bug: 8175766
Change-Id: Idfa35708d4db65a201a20c3726bb18663c2c0a81
2013-03-20 18:20:18 -07:00
Jeff Brown
63c90a5512 Add grid layout support library samples.
These samples are simply ported from the ApiDemos package
with package names updated to use the support library
implementation instead.

Bug: 8175766
Change-Id: Ib24c1250ed7571353f606422734a4660f382b368
2013-03-20 18:20:18 -07:00
Jeff Brown
bda0c73168 Move media router samples to new Support7Demos project.
Add media router support library to SDK build.

Bug: 8175766
Change-Id: I2f333d40ad39e820e8d706a7dab086241692a861
2013-03-20 18:20:18 -07:00
Elliott Hughes
16617b1712 am 48f4a1f8: am 8c4c7b6a: Merge "Use H rather than k in date/time formats."
* commit '48f4a1f86e59c97a0a67d520ff0daa3726e2f62b':
  Use H rather than k in date/time formats.
2013-03-20 09:52:38 -07:00
Elliott Hughes
48f4a1f86e am 8c4c7b6a: Merge "Use H rather than k in date/time formats."
* commit '8c4c7b6a9851554371f94aef9f09813a7f0bc14e':
  Use H rather than k in date/time formats.
2013-03-20 09:47:31 -07:00
Adam Koch
bae0692c9c am 5004577d: am 303c2c87: am 0a605d37: am 90808a36: am bc1a645f: Contacts Provider Training Class - Sample App Initial Commit This is the sample app for the Contacts Provider Android training class. It\'s a basic master/detail view with a list of contacts in the maste
* commit '5004577dbaf1719c787ce610189151531c70652d':
  Contacts Provider Training Class - Sample App Initial Commit This is the sample app for the Contacts Provider Android training class. It's a basic master/detail view with a list of contacts in the master and contact name, photo and mailing addresses in the detail. This sample app is backward compatible to API level 7 and also optimized for all screen sizes.
2013-03-19 11:31:23 -07:00
Adam Koch
5004577dba am 303c2c87: am 0a605d37: am 90808a36: am bc1a645f: Contacts Provider Training Class - Sample App Initial Commit This is the sample app for the Contacts Provider Android training class. It\'s a basic master/detail view with a list of contacts in the master and contact
* commit '303c2c87f893d144e6982f1b2ad097141fe25ea7':
  Contacts Provider Training Class - Sample App Initial Commit This is the sample app for the Contacts Provider Android training class. It's a basic master/detail view with a list of contacts in the master and contact name, photo and mailing addresses in the detail. This sample app is backward compatible to API level 7 and also optimized for all screen sizes.
2013-03-19 11:30:12 -07:00
Adam Koch
90808a363f am bc1a645f: Contacts Provider Training Class - Sample App Initial Commit This is the sample app for the Contacts Provider Android training class. It\'s a basic master/detail view with a list of contacts in the master and contact name, photo and mailing addresses in th
* commit 'bc1a645f26a30fd95e68043b608038537b7c798f':
  Contacts Provider Training Class - Sample App Initial Commit This is the sample app for the Contacts Provider Android training class. It's a basic master/detail view with a list of contacts in the master and contact name, photo and mailing addresses in the detail. This sample app is backward compatible to API level 7 and also optimized for all screen sizes.
2013-03-19 11:25:44 -07:00
Adam Koch
bc1a645f26 Contacts Provider Training Class - Sample App Initial Commit
This is the sample app for the Contacts Provider Android training
class. It's a basic master/detail view with a list of contacts in the
master and contact name, photo and mailing addresses in the detail.
This sample app is backward compatible to API level 7 and also
optimized for all screen sizes.

Change-Id: I83fe6beae9fd4c3fe710426b7dd0863e094cbc89
2013-03-19 12:40:00 -04:00
Elliott Hughes
da6181c891 Use H rather than k in date/time formats.
Bug: 8359981
Change-Id: Ica1741aafc801d017252f74189aca0946bed9a0f
2013-03-18 16:29:12 -07:00
Fabrice Di Meglio
65e58fe5c9 Fix #8185319 Need to put Android BidiFormatter into the Support Library
- add demo into Support4Demos

Change-Id: I041144510c907dd1639ea56c45321486d86fe859
2013-03-14 12:00:10 -07:00
Jaikumar Ganesh
a54d53a656 Revert "Add Trigger Sensor API Demo."
This reverts commit 50435d3e6f.
2013-03-13 14:58:01 -07:00
Jeff Brown
fd5a3f30de Samples for media router support library.
Change-Id: I3c578f61e310b552b0dd372dc27c709c35193bbd
2013-03-12 21:34:38 -07:00
Jaikumar Ganesh
50435d3e6f Add Trigger Sensor API Demo.
Add sensor API demo for significant motion sensor.

Change-Id: I9d55fef52bdda2b804003bb07d6d977f13cda5b0
2013-03-12 14:13:21 -07:00
Jeff Sharkey
dafe2546c9 Merge "Example code for FileProvider." into jb-mr2-dev 2013-03-12 17:13:16 +00:00
Michael Wright
def9515cb0 Merge "Update ApiDemos to use new input source check" into jb-mr2-dev 2013-03-12 02:10:47 +00:00
Roman Nurik
574bec3b90 am 573642d8: am f3084087: am ee77f868: am 85364937: Add InteractiveChart sample code for update to Gestures training class.
* commit '573642d8e9fdb5fbd1d2a7cd9a0a9fe0204eacd7':
  Add InteractiveChart sample code for update to Gestures training class.
2013-03-11 16:31:38 -07:00
Roman Nurik
573642d8e9 am f3084087: am ee77f868: am 85364937: Add InteractiveChart sample code for update to Gestures training class.
* commit 'f308408752736df3e67362584dbad5899ba58d71':
  Add InteractiveChart sample code for update to Gestures training class.
2013-03-11 16:29:03 -07:00
Roman Nurik
85364937ce Add InteractiveChart sample code for update to Gestures training class.
Change-Id: I1e245cd6735d54603174045ca557057763861469
2013-03-11 16:22:53 -07:00
Michael Wright
8f48506e2d Update ApiDemos to use new input source check
Change-Id: Iab20881dca49cfef66fa35396942cdb5045137aa
2013-03-11 15:57:21 -07:00
Jeff Sharkey
01ae453b0e Example code for FileProvider.
Shows simple usage of FileProvider to share a private thumbnail
across process boundaries.  Also serves as sample code for javadoc
on FileProvider.

Bug: 7005318
Change-Id: I0ca12977a3832c7c2ac1c254d411a547ffee0a51
2013-03-08 10:02:39 -08:00
Dianne Hackborn
654f51aa29 Add API demo for a custom layout.
This serves as a complete, formal layout, with attributes
and all that good stuff.  Intended for use as sample code
in the java docs.

Change-Id: Ic45b9387d724bf574e2bfb8970b26c7b47fc0a2b
2013-03-06 13:46:42 -08:00
Dianne Hackborn
3de0bf970a Add API demo for WindowInputToken.
Change-Id: I2c1521caa30545411f34e57ad2f5eceb16c0b2b1
2013-03-04 18:47:42 -08:00
Dianne Hackborn
a28de3ba59 Add new action bar demos:
- Buttons for showing/hiding action bar and system UI
  in the basic action bar demo.
- New system UI demo that uses a non-overlay action bar.

Change-Id: Id3fbaa77365476489c558a2a43855a01f383551c
2013-02-27 18:32:21 -08:00
Adam Koch
0ff44f0050 am 5f51b7fb: Bitmapfun Sample: Add some docs and clean up some method naming.
* commit '5f51b7fb0caa695e2905545441979c5f0aa6f973':
  Bitmapfun Sample: Add some docs and clean up some method naming.
2013-02-27 06:25:48 +00:00
Adam Koch
0c5b72b4dd am e826ee24: Merge "Bitmapfun Sample: Add additional sample images." into jb-mr1-dev
* commit 'e826ee24ecacce4ff8d7ff511c1d9101f665a1c8':
  Bitmapfun Sample: Add additional sample images.
2013-02-27 06:25:47 +00:00
Chris Banes
ac5a784467 am c5d5c3db: Merge "bitmapfun: Add support to use inBitmap option" into jb-mr1-dev
* commit 'c5d5c3db62354a51b90934511a1f8dd1c87e987f':
  bitmapfun: Add support to use inBitmap option
2013-02-27 06:25:46 +00:00
Craig Mautner
92a74bf534 Merge "Add demo for rotation animation." into jb-mr2-dev 2013-02-26 15:32:03 +00:00
Craig Mautner
d540e6e0b7 Add demo for rotation animation.
New feature in App/Activity/Rotation Animation for overriding
default rotation animation with crossfade or jumpcut.

Change-Id: I3cb3cdb26770e6c7d040f4492eb02149af73b757
2013-02-25 18:21:56 -08:00
Dianne Hackborn
168241ee8e Clean up of system UI flag demo, doc markup for overscan demo.
Change-Id: Iaef99a4c1aeebbd327bcbc42b27d20c8065f8d27
2013-02-25 16:48:06 -08:00
Dianne Hackborn
8227c14902 New overscan API demos.
A new flag on the system UI demo (which needs to be renamed),
and a new pure overscan demo.

Change-Id: I88a7a309147aaad773bbc00971a01369f4658b61
2013-02-22 15:20:55 -08:00
Zak Cohen
f773111c82 Merge "Make query in FileProvider demo respect OpenanbleColumns." 2013-02-22 16:00:02 +00:00
Adam Koch
16a056af3d am 323e1a4f: am ddf2040c: am 985f6801: am 5f51b7fb: Bitmapfun Sample: Add some docs and clean up some method naming.
* commit '323e1a4f89ddeab38e4c0d4a42dad87b03621127':
  Bitmapfun Sample: Add some docs and clean up some method naming.
2013-02-21 15:19:58 -08:00
Adam Koch
01e7cf4f65 am ecc73574: am d337bbbf: am d97830ca: am e826ee24: Merge "Bitmapfun Sample: Add additional sample images." into jb-mr1-dev
* commit 'ecc7357403438d0b0aea355d1ba0f938efeb3b94':
  Bitmapfun Sample: Add additional sample images.
2013-02-21 15:19:57 -08:00
Chris Banes
a3fc703d7b am c11af55d: am 2aac0a0a: am d2de640e: am c5d5c3db: Merge "bitmapfun: Add support to use inBitmap option" into jb-mr1-dev
* commit 'c11af55d1232a1d5b5b4422a16731484a2d38084':
  bitmapfun: Add support to use inBitmap option
2013-02-21 15:19:56 -08:00
Adam Koch
323e1a4f89 am ddf2040c: am 985f6801: am 5f51b7fb: Bitmapfun Sample: Add some docs and clean up some method naming.
* commit 'ddf2040c2d12d5c1984363aff8ad24744f82b6e7':
  Bitmapfun Sample: Add some docs and clean up some method naming.
2013-02-21 14:24:54 -08:00
Adam Koch
ecc7357403 am d337bbbf: am d97830ca: am e826ee24: Merge "Bitmapfun Sample: Add additional sample images." into jb-mr1-dev
* commit 'd337bbbfa5ef29ad95c919a4b97bf4e4884ed533':
  Bitmapfun Sample: Add additional sample images.
2013-02-21 14:24:54 -08:00
Chris Banes
c11af55d12 am 2aac0a0a: am d2de640e: am c5d5c3db: Merge "bitmapfun: Add support to use inBitmap option" into jb-mr1-dev
* commit '2aac0a0a9d16fa494de17b64985517fc73836ca4':
  bitmapfun: Add support to use inBitmap option
2013-02-21 14:24:53 -08:00
Adam Koch
985f6801fc am 5f51b7fb: Bitmapfun Sample: Add some docs and clean up some method naming.
* commit '5f51b7fb0caa695e2905545441979c5f0aa6f973':
  Bitmapfun Sample: Add some docs and clean up some method naming.
2013-02-21 14:14:37 -08:00
Adam Koch
d97830ca46 am e826ee24: Merge "Bitmapfun Sample: Add additional sample images." into jb-mr1-dev
* commit 'e826ee24ecacce4ff8d7ff511c1d9101f665a1c8':
  Bitmapfun Sample: Add additional sample images.
2013-02-21 14:14:36 -08:00