¡@

Home 

2014/10/16 ¤W¤È 08:16:13

android Programming Glossary: intent.putextra

How to read pdf in my android application? [closed]

http://stackoverflow.com/questions/10299839/how-to-read-pdf-in-my-android-application

try final Intent intent new Intent First.this Second.class intent.putExtra PdfViewerActivity.EXTRA_PDFFILENAME path startActivity intent..

Using ZXing to create an android barcode scanning app

http://stackoverflow.com/questions/2050263/using-zxing-to-create-an-android-barcode-scanning-app

intent new Intent com.google.zxing.client.android.SCAN intent.putExtra SCAN_MODE QR_CODE_MODE startActivityForResult intent 0 public..

How do I pass data between activities in Android?

http://stackoverflow.com/questions/2091465/how-do-i-pass-data-between-activities-in-android

intent new Intent getBaseContext SignoutActivity.class intent.putExtra EXTRA_SESSION_ID sessionId startActivity intent The docs for..

Get/pick an image from Android's built-in Gallery app programmatically

http://stackoverflow.com/questions/2169649/get-pick-an-image-from-androids-built-in-gallery-app-programmatically

Set an extra parameter EXTRA_ALLOW_MULTIPLE on the intent intent.putExtra Intent.EXTRA_ALLOW_MULTIPLE true And in the Result handling..

How to return a result (startActivityForResult) from a TabHost Activity?

http://stackoverflow.com/questions/2497205/how-to-return-a-result-startactivityforresult-from-a-tabhost-activity

class is a regular Activity Intent intent this.getIntent intent.putExtra SOMETHING EXTRAS this.setResult RESULT_OK intent finish onActivityResult..

Android camera intent

http://stackoverflow.com/questions/2729267/android-camera-intent

new File Environment.getExternalStorageDirectory Pic.jpg intent.putExtra MediaStore.EXTRA_OUTPUT Uri.fromFile photo imageUri Uri.fromFile..

How to pass object from one activity to another in Android

http://stackoverflow.com/questions/2736389/how-to-pass-object-from-one-activity-to-another-in-android

variant of the Intent#putExtra method. PSEUDO code to pass intent.putExtra MyClass obj to retrieve object in second Activity getIntent..

Download a file with Android, and showing the progress in a ProgressDialog

http://stackoverflow.com/questions/3028306/download-a-file-with-android-and-showing-the-progress-in-a-progressdialog

Intent intent new Intent this DownloadService.class intent.putExtra url url of the file to download intent.putExtra receiver new.. intent.putExtra url url of the file to download intent.putExtra receiver new DownloadReceiver new Handler startService intent..

Restful API service

http://stackoverflow.com/questions/3197335/restful-api-service

new Intent Intent.ACTION_SYNC null this QueryService.class intent.putExtra receiver mReceiver intent.putExtra command query startService.. this QueryService.class intent.putExtra receiver mReceiver intent.putExtra command query startService intent public void onPause mReceiver.setReceiver..

Lock the android device programatically

http://stackoverflow.com/questions/4545079/lock-the-android-device-programatically

new Intent DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN intent.putExtra DevicePolicyManager.EXTRA_DEVICE_ADMIN securemeAdmin share..

Deleting a gallery image after camera intent photo taken

http://stackoverflow.com/questions/6390163/deleting-a-gallery-image-after-camera-intent-photo-taken

ManufacturerText test.png outputFileUri Uri.fromFile file intent.putExtra MediaStore.EXTRA_OUTPUT outputFileUri startActivityForResult.. 1 Intent intent new Intent com.android.camera.action.CROP intent.putExtra crop true intent.putExtra scale true intent.putExtra return.. com.android.camera.action.CROP intent.putExtra crop true intent.putExtra scale true intent.putExtra return data false intent.setDataAndType..

ViewPager and fragments ??what's the right way to store fragment's state?

http://stackoverflow.com/questions/7951730/viewpager-and-fragments-whats-the-right-way-to-store-fragments-state

Intent intent new Intent this StreamActivity.class intent.putExtra Message.class.getName selectedMessage startActivity intent BasePagerActivity..

how to use LocalBroadcastManager?

http://stackoverflow.com/questions/8802157/how-to-use-localbroadcastmanager

custom event name You can also include some extra data. intent.putExtra message This is my message LocalBroadcastManager.getInstance..

Android multiple email attachments using Intent

http://stackoverflow.com/questions/2264622/android-multiple-email-attachments-using-intent

is working when email has a single attachment. I used Intent.putExtra android.content.Intent.EXTRA_STREAM uri to attach the designated.. have multiple images attached to the same mail by calling Intent.putExtra android.content.Intent.EXTRA_STREAM uri multiple times it failed.. emailIntent.setType text plain emailIntent.putExtra android.content.Intent.EXTRA_EMAIL new String emailTo emailIntent.putExtra..

Android: passing paramters between classes

http://stackoverflow.com/questions/2582690/android-passing-paramters-between-classes

android intent share improve this question You can use Intent.putExtra Which uses a Bundle to pass extra data. Intent i new Intent..

In Android: How to Call Function of Activity from a Service?

http://stackoverflow.com/questions/2843874/in-android-how-to-call-function-of-activity-from-a-service

... Now I want to call A.someInfoArrived i from within S. Intent.putExtra has no version where I could pass an Object reference etc .....

Sending arrays with Intent.putExtra

http://stackoverflow.com/questions/3848148/sending-arrays-with-intent-putextra

arrays with Intent.putExtra I have an array of integers in the activity A int array 1 2..

Passing a Int value to another class

http://stackoverflow.com/questions/3937066/passing-a-int-value-to-another-class

such as your webb value then you might want to look at the Intent.putExtra ... methods. More info http www.brighthub.com mobile google..

Asynchronous programming best practices

http://stackoverflow.com/questions/5773853/asynchronous-programming-best-practices

If you do not want to mess up your code with simple Intent.putExtra calls and manage this things for each unique Activity you'll.. this is an excellent tool for just that. No need for dirty Intent.putExtra calls. Use styles One common mistake when making the first Android..

How to send hashmap value to another activity using an intent

http://stackoverflow.com/questions/7578236/how-to-send-hashmap-value-to-another-activity-using-an-intent

which makes it easy to add it to an intent using the Intent.putExtra String Serializable method. In the activity service broadcast..

How to read pdf in my android application? [closed]

http://stackoverflow.com/questions/10299839/how-to-read-pdf-in-my-android-application

openPdfIntent path private void openPdfIntent String path try final Intent intent new Intent First.this Second.class intent.putExtra PdfViewerActivity.EXTRA_PDFFILENAME path startActivity intent catch Exception e e.printStackTrace Second.java public class..

Using ZXing to create an android barcode scanning app

http://stackoverflow.com/questions/2050263/using-zxing-to-create-an-android-barcode-scanning-app

new Button.OnClickListener public void onClick View v Intent intent new Intent com.google.zxing.client.android.SCAN intent.putExtra SCAN_MODE QR_CODE_MODE startActivityForResult intent 0 public void onActivityResult int requestCode int resultCode Intent..

How do I pass data between activities in Android?

http://stackoverflow.com/questions/2091465/how-do-i-pass-data-between-activities-in-android

in the intent you're using to start the activity Intent intent new Intent getBaseContext SignoutActivity.class intent.putExtra EXTRA_SESSION_ID sessionId startActivity intent The docs for Intents has more information look at the section titled Extras..

Get/pick an image from Android's built-in Gallery app programmatically

http://stackoverflow.com/questions/2169649/get-pick-an-image-from-androids-built-in-gallery-app-programmatically

in a comment and it's better to have information gathered. Set an extra parameter EXTRA_ALLOW_MULTIPLE on the intent intent.putExtra Intent.EXTRA_ALLOW_MULTIPLE true And in the Result handling check for that parameter if Intent.ACTION_SEND_MULTIPLE.equals..

How to return a result (startActivityForResult) from a TabHost Activity?

http://stackoverflow.com/questions/2497205/how-to-return-a-result-startactivityforresult-from-a-tabhost-activity

new Intent this ClassC.class tabHost.addTab... Class C this class is a regular Activity Intent intent this.getIntent intent.putExtra SOMETHING EXTRAS this.setResult RESULT_OK intent finish onActivityResult is called in Class A but the resultCode is RESULT_CANCELED..

Android camera intent

http://stackoverflow.com/questions/2729267/android-camera-intent

new Intent android.media.action.IMAGE_CAPTURE File photo new File Environment.getExternalStorageDirectory Pic.jpg intent.putExtra MediaStore.EXTRA_OUTPUT Uri.fromFile photo imageUri Uri.fromFile photo startActivityForResult intent TAKE_PICTURE @Override..

How to pass object from one activity to another in Android

http://stackoverflow.com/questions/2736389/how-to-pass-object-from-one-activity-to-another-in-android

Download a file with Android, and showing the progress in a ProgressDialog

http://stackoverflow.com/questions/3028306/download-a-file-with-android-and-showing-the-progress-in-a-progressdialog

example this is how you fire the downloader mProgressDialog.show Intent intent new Intent this DownloadService.class intent.putExtra url url of the file to download intent.putExtra receiver new DownloadReceiver new Handler startService intent Here is were.. Intent intent new Intent this DownloadService.class intent.putExtra url url of the file to download intent.putExtra receiver new DownloadReceiver new Handler startService intent Here is were ResultReceiver comes to play private class DownloadReceiver..

Restful API service

http://stackoverflow.com/questions/3197335/restful-api-service

Handler mReceiver.setReceiver this ... final Intent intent new Intent Intent.ACTION_SYNC null this QueryService.class intent.putExtra receiver mReceiver intent.putExtra command query startService intent public void onPause mReceiver.setReceiver null clear.. ... final Intent intent new Intent Intent.ACTION_SYNC null this QueryService.class intent.putExtra receiver mReceiver intent.putExtra command query startService intent public void onPause mReceiver.setReceiver null clear receiver so no leaks. public void..

Lock the android device programatically

http://stackoverflow.com/questions/4545079/lock-the-android-device-programatically

Deleting a gallery image after camera intent photo taken

http://stackoverflow.com/questions/6390163/deleting-a-gallery-image-after-camera-intent-photo-taken

new File Environment.getExternalStorageDirectory Coupon2 ManufacturerText test.png outputFileUri Uri.fromFile file intent.putExtra MediaStore.EXTRA_OUTPUT outputFileUri startActivityForResult intent CAMERA_PIC_REQUEST protected void onActivityResult int.. resultCode data if requestCode CAMERA_PIC_REQUEST resultCode 1 Intent intent new Intent com.android.camera.action.CROP intent.putExtra crop true intent.putExtra scale true intent.putExtra return data false intent.setDataAndType outputFileUri image intent.putExtra.. CAMERA_PIC_REQUEST resultCode 1 Intent intent new Intent com.android.camera.action.CROP intent.putExtra crop true intent.putExtra scale true intent.putExtra return data false intent.setDataAndType outputFileUri image intent.putExtra MediaStore.EXTRA_OUTPUT..

ViewPager and fragments ??what's the right way to store fragment's state?

http://stackoverflow.com/questions/7951730/viewpager-and-fragments-whats-the-right-way-to-store-fragments-state

@Override public void onMessageSelected Message selectedMessage Intent intent new Intent this StreamActivity.class intent.putExtra Message.class.getName selectedMessage startActivity intent BasePagerActivity aka helper public class BasePagerActivity extends..

how to use LocalBroadcastManager?

http://stackoverflow.com/questions/8802157/how-to-use-localbroadcastmanager

Log.d sender Broadcasting message Intent intent new Intent custom event name You can also include some extra data. intent.putExtra message This is my message LocalBroadcastManager.getInstance this .sendBroadcast intent With the code above every time the..

Android multiple email attachments using Intent

http://stackoverflow.com/questions/2264622/android-multiple-email-attachments-using-intent

file audio file etc using Intent with ACTION_SEND . The program is working when email has a single attachment. I used Intent.putExtra android.content.Intent.EXTRA_STREAM uri to attach the designated image file to the mail and it is working fine the mail.. can be delivered through the Gmail. However when I tried to have multiple images attached to the same mail by calling Intent.putExtra android.content.Intent.EXTRA_STREAM uri multiple times it failed to work. None of the attachment show up in the email. I.. final Intent emailIntent new Intent android.content.Intent.ACTION_SEND_MULTIPLE emailIntent.setType text plain emailIntent.putExtra android.content.Intent.EXTRA_EMAIL new String emailTo emailIntent.putExtra android.content.Intent.EXTRA_CC new String emailCC..

Android: passing paramters between classes

http://stackoverflow.com/questions/2582690/android-passing-paramters-between-classes

this Class2.class startActivity i android parameters android intent share improve this question You can use Intent.putExtra Which uses a Bundle to pass extra data. Intent i new Intent this Class2.class i.putExtra foo 5.0f i.putExtra bar baz startActivity..

In Android: How to Call Function of Activity from a Service?

http://stackoverflow.com/questions/2843874/in-android-how-to-call-function-of-activity-from-a-service

like this one in A public void someInfoArrived Info i ... Now I want to call A.someInfoArrived i from within S. Intent.putExtra has no version where I could pass an Object reference etc ... Please help PS The other way around A polling S for new info..

Sending arrays with Intent.putExtra

http://stackoverflow.com/questions/3848148/sending-arrays-with-intent-putextra

arrays with Intent.putExtra I have an array of integers in the activity A int array 1 2 3 And i want to send that variable to the activity B so i create..

Passing a Int value to another class

http://stackoverflow.com/questions/3937066/passing-a-int-value-to-another-class

If your question is how to share data between activities such as your webb value then you might want to look at the Intent.putExtra ... methods. More info http www.brighthub.com mobile google android articles 39467.aspx http developer.android.com guide..

Asynchronous programming best practices

http://stackoverflow.com/questions/5773853/asynchronous-programming-best-practices

asynchronous share improve this question Use global variables If you do not want to mess up your code with simple Intent.putExtra calls and manage this things for each unique Activity you'll have to use global variables within the application. Extend.. for your application during the application's life cycle this is an excellent tool for just that. No need for dirty Intent.putExtra calls. Use styles One common mistake when making the first Android application is that one usually just start writing the..

How to send hashmap value to another activity using an intent

http://stackoverflow.com/questions/7578236/how-to-send-hashmap-value-to-another-activity-using-an-intent

Java's HashMap class extends the Serializable interface which makes it easy to add it to an intent using the Intent.putExtra String Serializable method. In the activity service broadcast receiver that receives the intent you then call Intent.getSerializableExtra..