Android :: OnActivityResult Intent Data Not Correct

Jul 29, 2010

I'm venturing into startActivityForResult for the first time and I'm running into a problem.When a user clicks on a list item of Activity B, it returns "ql_id" to Activity A:Unfortunately, extras.getInt("ql_id") evaluates to "0". Why is this? It should be "1". I am clearly doing something incorrectly.

Android :: onActivityResult Intent data not correct


Android :: Get Tow Intent Result In OnActivityResult?

Sep 17, 2010

I am using two intent for various action in my activity and i also used onActivityResult for get result,i want to answer for how to get tow intent result in onActivityResult?anybody knows please give sample code for me..

View 1 Replies View Related

Android :: Recognizer Intent - OnActivityResult() Not Called When No Match

Nov 28, 2010

I have the following issue. I am starting a recognizer intent activity in order to detect speech using the "startActivityForResult" method. I have also an "onActivityResult" method listening for results from the recognizer activity. It works and it detects my speech. The problem is that it is only called when everything is ok or when i cancel the operation, but it is not called if it doesn't find a matching text "RecognizerIntent.RESULT_NO_MATCH" or in the rest of wrong cases "RecognizerIntent.RESULT_........" What is happening? Application is Android 2.1 and I have tested on a Android 2.2 device.

View 1 Replies View Related

Android :: Intent Not Opening Correct Activity

Aug 22, 2010

I'm having a struggle understanding why my intent is not working. I basically just copied paste from other examples in my code that work perfectly like this. Here it is:

Intent addIntent = new Intent(v.getContext(), thenNnowMode.class);
Bundle w = new Bundle(); String activityName = "addPic";
w.putString("activity", activityName);
w.putParcelable("bitmap", selectedDeviceImage);
//a.putString("id", picId); addIntent.putExtras(w);
startActivity(addIntent); finish();

The intent is opening a different class called thenNnow.class instead of thenNnowMode.class and I have no idea why this is happening. I've tried sending the intent to open other activities other than thenNnowMode but it always opens thenNnow. Am I missing some silly syntax mistake? It's so strange, its the same code. I am not sure if it's relevant but the thenNnowMode class uses the device camera

View 23 Replies View Related

Android :: Taking Picture By Camera Correct Intent Action

Mar 3, 2009

I am trying to take picture by G1 camera.

I have tried almost everything i was able to find on the net about this topic. It seams there should be intent with action "android.media.action.IMAGE_CAPTURE" which really starts camera application and returns captured image. But captured image is scaled to 0.25 of original size. Another possibility I have found is to pass uri where to save captured image. I went through all available sources of camera application and it should work but does not.

For illustration, I am doing following in my example activity which creates new image, but after returning from camera, image is still empty:

CODE:..................

I am ready to write my own capturing application, but it is quite hard and I would like to reuse.

Do you know correct intent action name and extra name to pass to capture image?

View 4 Replies View Related

Android :: Correct Intent To Launch Gallery / Video Camera

Jul 28, 2009

My application has buttons to launch gallery and video camera apps but the below code only seems to work on phones with the standard Cupcake build:
// For Gallery Intent intent = new Intent(); intent.setClassName("com.android.camera", "com.android.camera.GalleryPicker");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); mContext.startActivity(intent);
// For Video Camera Intent intent = new Intent(); intent.setClassName("com.android.camera", "com.android.camera.VideoCamera"); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); mContext.startActivity(intent);

On rooted / non-cupcake phones, I get this error:
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.camera/com.android.camera.VideoCamera};
have you declared this activity in your AndroidManifest.xml? at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:1480) at android.app.Instrumentation.execStartActivity(Instrumentation.java: 1454) at android.app.Activity.startActivityForResult(Activity.java:2656) at android.app.Activity.startActivity(Activity.java:2700)

View 3 Replies View Related

Android :: Intent Action - Correct Way To Get Back To Application After Call?

Aug 27, 2010

I got one question regarding the intent action "ACTION_CALL". What is the correct way of getting back to the own application/activity after the user ends the call? The only way that came to my mind uses a PhoneStateListener in a background services that waits for the CALL_STATE_IDLE event starting up the application again. But I am not quite sure if that is the correct/intended way of using the intent.

View 1 Replies View Related

Android :: Correct Intent Filter Configuration To Associate File Type?

Nov 10, 2010

This question has been asked [numerous times] before, but I have not seen any definitive answers, or examples of code that actually works. I would like to associate an Activity with a particular file type. For discussion, assume that I want my Activity to be associated with PDFs. Here is what I currently have. I have experimented with many different values and combinations of values in the intent-filter, but I have yet to get my Activity to start when a PDF is selected.

<activity name="com.mycompany.MyActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="file" />
<data android:mimeType="application/pdf" />
<data android:pathPattern="*.pdf" />
<data android:host="*" />
</intent-filter> </activity>

View 1 Replies View Related

HTC Incredible :: Correct Way To Transfer Data From Old SD Card To New?

Jun 24, 2010

Is there anything special I need to do to transfer data from an old SD card (the stock 2GB) to a new one (8GB)? Can I just copy the entire old card using a card reader to my PC, then copy all of that back to the new card? Or do I need to do anything special on the Incredible itself?

View 4 Replies View Related

HTC Incredible :: Correct Way To Backup Data And Apps?

May 1, 2010

I do not see any provided way to do Data and Application and UI backups.

Is there something I missed?

I am use to the blackberry which allows for backup of everything in case you lose or kill your phone.

I see you can buy RerWare MyBackup and MyBackup Pro. Does it do the job?

Any other better free tools?

View 12 Replies View Related

Jelly Bean :: Correct APN Settings But Data Will Not Work

Dec 26, 2013

I seem to have a problem I have rooted and unlocked my bootloader and flased with rom Carbon 4.3.1on my HTC HD Desire Phone. Everything runs fine except the data don't seem to work even though the correct settings has been applied. Whats so weird it comes on for like an hour then don't come back on again. I have had the rom installed for like 3 days now and it has come 4 times. I have tried switching off the phone, trying different settings also my mum and bro have the same network and same apn settings in my phone is in theres. The apn settings work fine in the stock rom.

Edit - Also I will like to add that the data flickers on and off. The H sign next to the bars

View 2 Replies View Related

Android :: What Would An Intent URI Look Like For Numeric Data?

Mar 5, 2009

Suppose I want to include data right in an intent, e.g. pass a number or string in the intent data field.What should the uri look like? Something like "data:3.14159"?Or just don't include the scheme at all, "3.14159"? In fact, is there a list of standard schemes anywhere?

View 4 Replies View Related

Android :: Multiple Data For An Intent

Sep 10, 2009

I was just wondering if it is possible to give the intent a set of data, instead of just one. A particular scenario where this could be applicable would be a music application.You select a list of songs, and pass all these data (file path) to the Music Player's application.Another scenario: You need to plot more than one address on the Google Maps. You launch the application with a set of data for the intent.

View 5 Replies View Related

Android :: Putting Data In SMS Sent Intent?

Dec 30, 2009

I'd like to send an sms message. If the text is too long, I split it into multiple messages. I'm trying to put some extra info into the "sent" intent to know which part has been sent, and when all the parts are complete: The message is sent, and I catch the intent when each part is sent - but the intent always has the same data in it. For example, "partIndex" is always zero, even though for the second message, it should be one. Seems like the same intent just keeps getting thrown to my broadcast receiver. What's the right way to do this?

View 1 Replies View Related

Android :: Passing Data With Pending Intent

Jun 28, 2010

I would like to create some home screen app widgets that are entry points into an application. I can put a button in the app widget that uses setOnClickPendingIntent to start the activity. The problem occurs when I want to have two of these app widgets that are entry points to different parts of the activity. I need to be able to pass data into the activity that will distinguish these. Since both app widgets use a Pending Intent that starts the same activity, the two Pending Intents are shared and I can't reliably set extras for the corresponding intents.

View 2 Replies View Related

Android :: How To Read Data From Server Using Intent?

Aug 26, 2010

i am new in android how read the data from server using intent.

View 4 Replies View Related

Android :: Use An Intent To Send Data To My Activity

Nov 6, 2010

I have a server running that notifies the user with a statusbar notification that opens my main activity, how can I pass data to my activity trough that intent?

View 1 Replies View Related

Android :: Receiving Passed Data Using Intent

Jun 28, 2010

I want to receive a data which is passed using intent from another page.

View 1 Replies View Related

Android :: Pass Data From Activity To Service Using An Intent

Jul 20, 2010

How do I get data within an Android Service that was passed from an invoking Activity?

View 1 Replies View Related

Android :: Specify Scheme Specific Part In Data Tag For An Intent-filter?

Feb 3, 2010

I want to set up a BroadcastReceiver to handle PACKAGE_REPLACED, but I only want to be notified when my package is replaced. It works fine if I specify a data tag with scheme="package" but then I get notified when any application is reinstalled or upgraded. I can't figure out how I'm supposed to specify the package name which is in the scheme specific part -- that is, when my BroadcastReceiver gets the intent in onRecieve(), if I do intent.getData().getSchemeSpecificPart(), that's the package name, but is there any way I can filter for only that in my intent-filter?

View 1 Replies View Related

Android :: Adding Data To Intent Fails To Load Activity

Apr 11, 2010

I have a widget that supposed to call an Activity of the main app when the user clicks on widget body. My setup works for a single widget instance but for a second instance of the same widget the PendingIntent gets reused and as result the vital information that I'm sending as extra gets overwritten for the 1st instance. So I figured that I should pass widget ID as Intent data however as soon as I add Intent#setData I would see in the log that 2 separate Intents are appropriately fired but the Activity fails to pick it up so basically Activity will not come up and nothing happens (no error or warning ether)

View 1 Replies View Related

Android :: Read Mail Intent With Access To Email Data?

Nov 17, 2010

Android documents starting the email intent for sending emails with Intent.ACTION_SEND. Is there an intent which directs the user to reading his email, or which launches the default email application? The application that launches the "read mail" intent would get no access to the email data.

View 1 Replies View Related

Android :: Intent - Receive Myval Data In Screen2 Class?

Feb 24, 2009

I have two classes Screen1 and Screen2 both extends activity i have to pass data from the Screen1 to Screen 2

I wrote in onCreate method of Screen1 class

CODE:............

My doubt is ,how to receive myval data in Screen2 class ,what is the code i have to add in AndroidManifest.xml file

View 6 Replies View Related

How To Get Table Of Action And Data Of Intent

Nov 18, 2013

I have got a problem with Intent in Android..I coded an example about Intent

Ex :Intent.ACTION_DIAL,URI.parse(phonenumber.getText( ).toString())
phonenumber is a String from EditText

But when the Emulator runned .Then, a dialog occur with message : "TestCall has stopped".TestCall is my project..I also want to get a table of ACTION and DATA of Intent.

View 2 Replies View Related

Android :: 1.6 - OnActivityResult Is Not Called

Jul 6, 2010

I have a problem with the method "onActivityResult".

I create a new Activity from my main activity:

CODE:.........

The new Activity is ended like this:

CODE:.............

But the Method onActivityResult seem to be not called

CODE:................

View 1 Replies View Related

Android :: OnActivityResult Fc When Using SurfaceView?

Sep 4, 2010

My app fc when activity that's using SurfaceView as content view calls startActivityForResult(...) and activity that has been started calls finish()

This does not happen if I change content view to something else than SurfaceView.

This would be the requested logcat:

CODE:..................

View 1 Replies View Related

Android :: How To Show Alert In OnActivityResult?

Jan 26, 2010

I am trying to show custom alert from onActivityResult. I need to inflate it, so am getting context with getApplicationContext() and everything is fine until I execute alertDialog.show() - then it fails with: Unable to add window -- token null is not for an application Do you know why I cannot do it?

View 1 Replies View Related

Android :: OnActivityResult Doesn't Work ?

Dec 31, 2009

I am facing with a problem related startActivityForResult()

To start SecondActivity from FirstActivity :

CODE:.............

And handles result :

CODE:..........

To send the message to FirstActivity from SecondActivity :

in SecondActivity :

CODE:............

I can't handle the result on onActivityResult in FirstActivity. It never works for my application.

My OS is : 1.5

View 2 Replies View Related

Android :: OnActivityResult And The Settings Menu

Aug 13, 2010

My app requires a network connection so if they don't have one enabled I prompt them to start it. I do this by calling the Wireless & Network settings Activity as such:

CODE:...............

However, when I run my app in the debugger, onActivityResult is called immediately as my calling activity is exited when it should be called once the settings menu if exited. This premature call also sends a resultCode of Activity.RESULT_CANCEL.

Here is the code from onActivityResult:

CODE:.....................

View 3 Replies View Related

Android :: Can Pass Uri Value From OnActivityResult() To OnClick() ?

Jul 27, 2010

CODE:...................

The circle not show.....but when i put the DrawO() next to mSurfaceHolder01.addCallback(EX10_04.this);

It draw a circle!

If i want to draw a circle in the onActivityResult event

What shuld i do?

Or if i can pass uri to onClick function ?

CODE:..................................

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved