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..

Android :: Get tow intent result in onActivityResult?


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.

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 And URI Conversion Result

Feb 14, 2009

We can convert from Intent to URI and from URI to Intent. From Intent to URI string Intent intent1 = new Intent ();
String uriString = intent1.toURI ();
From URI string to Intent Uri uri = Uri.parse (uriString);
Intent intent2 = new Intent ();
intent2.setData (uri)

After conversion, intent1 and inten2 should be same. for example:
Intent intent1 = new Intent ();
intent1.addCategory (Intent.CATEGORY_HOME);
intent1.addCategory (Intent.CATEGORY_LAUNCHER);
Log.v ("", "Intent1 = " + intent1);
if (intent1.hasCategory (Intent.CATEGORY_HOME))
Log.v ("Intent1", "#1 hasCategory TRUE");
else Log.v ("Intent1", "#1 hasCategory FALSE");
String str = intent1.toURI ();
Uri uri = Uri.parse (str);
Intent intent2 = new Intent ();
intent2.setData (uri);
Log.v ("", "Intent2 = " + intent2);
if (intent2.hasCategory (Intent.CATEGORY_HOME))
Log.v ("Intent2", "#2 hasCategory TRUE");
else Log.v ("Intent2", "#2 hasCategory FALSE");
result Intent1 = { categories=android.intent.category.HOME,android.intent.category.LAUNCHER} } #1 hasCategory TRUE

Intent2 {data=#Intent;
category=android.intent.category.HOME;
category=android.intent.category.LAUNCHER;
end } #2 hasCategory FALSE

In this sample code, Intent2 is a conversion result from Intent1. If you run this sample code, Intent1 result and Intent2 result are different. Because Intent1 and Intent2 have a same Intent.CATEGORY_HOEM, the result should be Intent1 and Intent2 is TRUE (intent.hasCategory). I think this is bug. And the hint is Intent1 and Intent2 's toString result is different.
Intent1 = {categories=android.intent.category.HOME,android.intent.category.LAUNCHER}
Intent2 = { data=#Intent;category=android.intent.category.HOME
category= android.intent.category.LAUNCHER;end }

I don't know how to convert Intent to URI(String) and convert URI (String) to Intent. I want to save Intent to DB and read Intent from DB.

View 3 Replies View Related

Android :: Open Gallery Via Intent Without Result

Oct 5, 2010

I have a kind of an ApplicationLauncher that has to start the build-in gallery. But I dont want to get any result from that gallery... I just want to start it and want my "Launcher" to close after that.

What ive tried:

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

But it doestn even work with this flag... as soon as I click on a pic in the gallery, it closes and returns to my "Launcher". Is there any way to achieve what i want to do?

View 3 Replies View Related

Android : Way To Get Result From Settings Activity Intent?

May 4, 2009

I am currently trying to launch a GPS settings activity using startActivityForResult....however it never seems to be calling my onActivityResult function after it exits. I noticed the docs mentioned that some Intent protocols are not defined to return a result, is this one such example? are there any flags that I could set to either make the settings activity call onActivityResult, or even better make my activity block until the launched activity returns?

View 5 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

Android :: OnActivityResult Is Not Working When Used In ActivityGroup

Feb 22, 2010

I have a Activitygroup and some activities are part of it.

lets say Activitygroup is DetailsGroup which has a activity by name DetailsActivity.

On certail events DetailsActivity launches another activity ExtraActivity by calling startActivityForResult(intent, 2);

The extraActivity is launched it does its work and before calling finish() of it I am calling setResult(RESULT_OK,mintent);

By doing this I was expecting that the DetailsActivity's onActivityResult() would be called, but instead DetailsGroup activities' onActivityResult() is getting called.

Any idea what changes are required to get DetailsActivity's onActivityResult() called in above scenario?

View 2 Replies View Related

Android :: OnActivityResult Never Called On ActivityGroup

Jul 21, 2010

I'll be brief. I have an application with the following Activities Schema:

A (ActivityGroup) | |__

B (Activity Group) | | | |__

C (Activity) | |__ ... (Other Activities) | |__

D (ListActivity) | | | |__

ListView with a custom adapter with two buttons per row

All the Activities shown on the "diagram" are displayed and visible in real time while the application is being executed.

I'm pushing new list elements from C to the ListView in D. And by clicking each row's buttons I'm trying to edit the data of the row by means of a dialog. The problem is when, in the dialog activity, I perform the setResult() and finish(); the D's onActivityResult() is never called, and I do not know why.

View 3 Replies View Related

Android :: OnActivityResult Called Before OnRestart()

May 4, 2009

I am updating some code from 1.1 to run with the new SDK 1.5. I noticed that onActivityResult is being called before OnRestart.

If Activity A calls activity B. Activity A goes to onPause(), then onStop(). Activity B goes on... finishes and returns.

Activity A starts at onActivityResultf(). So if you try to make a clean exit with onStop(), it will cause nullPointers when it comes back.

View 2 Replies View Related

Android :: Does OnActivityResult Get Called When An Activity Is Recreated

Sep 30, 2009

I have a flow A->B->C->D where A desires some information that is obtained by D. B, C, and D propagate the data back through the flow using setResult(RESULT_OK, data) and finish(). All intents in A, B, and C are started with startActivityForResult. However, if B is reclaimed by Android and forced to call onCreate again after C finishes onActivityResult in B is never called and the data never makes it back to A. Is there a way I can be sure that onActivityResult will be called?

View 5 Replies View Related

Android :: OnActivityResult No Longer Being Called After OnDestroy

Jul 3, 2010

OnActivityResult is giving me major headaches. My little game has a title / menu screen. Upon clicking "new game" an Activity is launched which creates a SurfaceView for my game world.

When playing, the player can enter buildings in the game world. Upon entering a building I launch the activity for that particular building from my SurfaveView.

Here is an example:

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

mMap is the SurfaceView. I'm passing a bundle containing the state of the player. In onActivityResult I grab the bundle returned by the store activity and update the player state.

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

mSavedPlayer is later used to set the new player state.

All the above works generally

I can enter stores, buy stuff, leave and the player is updated correctly.

The problem manifests when I press the Home button (or someyimes back button) and onDestroy gets called. My onDestroy method does nothing besides call super.onDestroy();

After onDestroy() gets called onActivityResult no longer gets called.

So:

1) I play the game, everthing works great.

2) I press home and ondestroy is called

3) relaunch my game via launcher icon

4) Resume game. I can still enter and leave stores but onActivityResult is no longer called.

Here is some logcat output. I'm logging each time I enter a relevant method.

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

View 1 Replies View Related

Android :: Parent Activity Runs OnCreate Before OnActivityResult Is Called - Sometimes

Aug 5, 2010

The order is:

A: startActivityForResult( B ) B: <dostuff>, call finish() A: onCreate <---- what's this all about A: onActivityResult

This happens for a tiny minority of users. I havn't been able to reproduce or find any common elements. A is the launch activity.

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

View 7 Replies View Related

Android :: Get Dorid Unit Test Instrementation To Call Activity's OnActivityResult()?

Feb 3, 2009

Can you please tell me if you know how to get the Andorid unit test instrementation to call my activity's onActivityResult()?

I can't find anything here: http://code.google.com/android/reference/android/app/Instrumentation.

View 4 Replies View Related

Android : Child Activity Exit By Unexpected Exception - OnActivityResult - Is Not Called

Jun 23, 2010

I have faced with issue about startActivityForResult() and onActivityResult(). If child activity started by the startActivityForResult() exit by unexpected exception the onActivityResult() is not called and I have no any ideas how can I handle this to get application working in a fail-safe manner ?

When my code runs child activity with startActivityForResult() it awaits until onActivityResult() will be invoked to get working further, but onActivityResult() is not calling and my code is "hang- up" (logically).

So the question is how can I handle all possible ways the child activity is finished (normally and by unexpected exception) to get fail-safe code ?

I have check the documentation for this issue but have found nothing relating issue.

View 4 Replies View Related

Android :: FinishFromChild And OnActivityResult Not Firing When Child Starts Activity Of Same Type As Parent

Jun 8, 2010

I have an application, which (for the sake of simplicity) has two types of activities - Overview and DetailView. The Overview activity shows a list of steps and allows the user to start a DetailView activity corresponding to the step chosen.

In the DetailView activity, the user can start another Overview, which shows different steps than the ones in the parent of the current DetailView.

In the Overview, DetailView is started by using startActivityForResult (). In the DetailView, when the user decides to start a second Overview, I call setResult () and finish () and then start the new Overview. In this scenario, onActivityResult () and finishFromChild () do not fire. Instead, they fire when the parent finishes (?).

Code from Overview:

CODE:....

Code from DetailView:

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

View 1 Replies View Related

Android : Can I Get Result From A Sub Activity?

Aug 5, 2010

When user presses a button from a webview, I open a scrollview activity with some buttons and edittext fields.

Once the user enters the fields and presses the 'create' button, from scrollview activity, I want the results from the called activity to be accessible. How can I do thi?

View 1 Replies View Related

Android :: Geocoder Not Returning Result

May 8, 2009

My application that uses geocoding was working fine till last week and now all of a sudden am not getting proper data from the same.

I used getLocality() , which was returning CITY name previously. But now it is returning NULL.

Is something changed? or Has someone faced the same issue?

My application is on SDK 1.0

View 12 Replies View Related

Android :: Way To Return Result Of AsyncTask

Jan 21, 2010

According to my research, which includes reputable sources (Mark Murphy et al), the most preferred way of polling a remote source and presenting said data to the user is by creating a service and using AsyncTask within that service to do the polling. I have done that.But, when I read the docs there seem to be several "Threading Rules" that conflict with this way of doing things: "The task instance must be created on the UI thread." and "execute(Params...) must be invoked on the UI thread." As stated, I have created the task instance on the Service thread (not the UI thread). Am I missing something? Also, when the AsyncTask finished, I sent out a Broadcast on onPostExecute, which is then picked up by the Activity, telling it to retrieve the final value again from the service (since I couldn't obviously update the UI from the service). I couldn't figure out any other way to return the result of the AsyncTask. Is this the correct practice?

View 8 Replies View Related

Android :: Opencore Test Result

Mar 22, 2010

Here is what I got while running a test case of open core . *************** # pvplayer_ engine _test -test 1 1 SDK Labeled: PVDEV_ CORE_RELEASE_6.506.4.1 built on 20090312 Test Program for pvPlayer engine class. Input file name 'test.mp4' Test case range 1 to 1 Compressed output Video(No) Audio(No)Log level 8; Log node 0 Log Text 0 Log Mem 0 Starting Test 1: Open-Play-Stop-Reset Results for Test Case 1: Successes 1, Failures 1 Total Execution time for file test.mp4 is : 2.712000 seconds# *************** I want to ask why it shows 1 success and 1 failure . there should be only 1 pass or 1 fail only . Do each test case have multiple sub-tests within them ? which class in source code finally decide whether it is pass or faiL?

View 2 Replies View Related

Android :: No Result On Sqlite Query

Sep 24, 2010

I create a table like that

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

I update it this way

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

I do see the change in eclipse with DDMS questoid

But when i try to retrieve the value I get nothing ....

CODE:.........

I've tried some variant like

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

With no success

Is this problem come from the type (integer) of my column ?

View 1 Replies View Related

Android :: Add A Distance To GeoPoint And Get It As Result?

Jan 27, 2010

I need to draw a circle on my map. I have the GeoPoint and I have the radius of the circle in meters. How do I add a distance to a GeoPoint and get a GeoPoint as a result?

View 3 Replies View Related

Android : TabHost And StartActivity For Result?

Sep 2, 2009

I meet an issue: my activity cannot return result.

I created an activity which has one TabHost. I added three tabs using mTabHost.addTab. Every tab will launch an activity(activity A, activity B, activity C). In activity A, it will call startActivityForResult to start activity A1. The issue is activity A cannot get any result after A1 finish.

What is the reason? How should I do if I want to get return value?

View 3 Replies View Related

Android : Need To Get Result Back From Activity?

Mar 10, 2010

I'm doing some network job in AsyncTask. Sometimes it requires communication with user. (connection is dropped, session is expired and so on). I want to pop up a dialog or launch an Activity, and then, depending on user's input, stop the job or redo it. I can launch any Activity from AsyncTask, but how to get result back? It seems to be possible only if I launch new Activity from another Activity. What are possible solutions?

View 5 Replies View Related

Android :: Start Activity From Service - And Getting Result From It

Feb 11, 2010

I have a Service which needs to receive data from external packages. So, to locate the data providing external packages, I use activity- filter and PackageManager.queryIntentActivities function to locate the interesting packages. Now, from each such package, I need to get a ContentProvider URI. So I want to start the external Activity and the external activity will return a result to my service - something like "startActivityForResult". The problem is that there is no way to call "startActivityForResult" from a Service, only Activity can do that, and my project does not have any Activity, and probably can't show UI for the user.

The bottom line: Can anyone suggest a way to get ContentProvider URI from an external package, while my package has only a Service?

View 22 Replies View Related







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