Android :: Picking A Contact And Returning To The Parent Activity

Jan 28, 2010

I wish to re-use the Contacts application in a way to enable the user to pick a contact and return it to the parent activity (my application's activity).

For achieving this, I want to inquire about the kind of Intent that will be needed to launch the contacts application.

Intent i = new Intent(Intent.ACTION_GET_CONTENT, ?); startActivityForResult(.....);

What should be the second argument here ?

In the deprecated Contacts API, I could use the following snippet, but not sure about ContactsContract:

Intent i= new Intent(Intent.ACTION_GET_CONTENT,People.CONTENT_URI); startActivityForResult(i, reqCode);

Android :: Picking a contact and returning to the parent activity


Android :: Contact Picking On Motorola Cliq - 1.5?

Nov 24, 2009

I'm able to successfully use the contact picker on the Motorola Cliq using the intent:

new Intent(Intent.ACTION_PICK, People.CONTENT_URI)

It works as expected, and I'm able to get the contact data in onActivityResult()

However, every single time, I get an error dialog: "The application Contacts (process com.motorola.blur.contacts) has stopped unexpectedly. Please try again. (Force Close)"

The error in LogCat: android.app.SuperNotCalledException: Activity {com.motorola.blur.contacts/ com.motorola.blur.contacts.picker.PickPeopleActivity} did not call through to super.onDestroy()

So does this mean the contacts picker on the Cliq is just plain broken? Has anyone else seen this error, and/or been able to successfully use the contacts picker on the Cliq without getting error messages?

View 8 Replies View Related

Android :: How To End Child Activity And Return To Parent Activity?

Jul 25, 2010

I have a main screen with buttons to launch other subactivities. I have to press back button each time to go back to the main screen of my application. How do I finish a child activity and automatically return from the caller?

View 5 Replies View Related

Android :: Activity Parent - Created Activity Returns A Nul ?

Apr 7, 2010

Can someone tell if why when starting an activity with startActivity(intent) , calling getParent() in onCreate() of the new created activity returns a nul ?

Also how could I obtain the parent of an activity created in such a way ? Can a reference of the activity below the current activity in the activity stack be obtained ?

View 2 Replies View Related

Android :: DDMS Allocations Tracker Not Picking Up Activity When Using Real Phone

Aug 3, 2010

I'm trying to use DDMS to track my allocations, but it only finds my activity if I run it on the emulator. If I run my app on my phone it can't find it, even though it finds the phone. Is there anything specific that I need to do that I might have missed?

View 9 Replies View Related

Android :: BringtoFront The Parent Activity?

Sep 7, 2010

As we know, startActivityForResult() used to get a result for a task from parent activity. Here when we click the setResult(). It returns the result to the parent Activity.

Child Activity means it should maintain the persistent state. That is when the users clicks a button on the child activity. It do not finishes that activity and show the Parent Activity. And again i may go to the child activity from parent activity. If the child does not exists it starts a new child activity else it should show the existing child activity with persistent content.

Simply said, my parent Activity starts a new Child Activity. Now both Activities should be alive. How to call the Parent Activity without finishing the child Activity(in other words, How to BringtoFront the parent Activity)? For this scenario,

you can not use startActivity(). Because it creates a new Activity Instance. Not Existing Parent Activity
you can not use startActivityForResult(). Because it finishes the child Activity Instance.

View 2 Replies View Related

Android :: Finish Parent Activity From Child?

Mar 30, 2010

My child activity X is called from Parent activity P through startActivity(intent). I want to close P when X called its finish() method. I override a method finishFromChild(Activity child) in P and called finish() in it. But this functions (finishFromChild(Activity child)) is not being called after X finish() Is it a known bug or I am missing some thing? I googled and also searched the groups but no help.

An alternative could be... using StartActivityForResult() and a "fake" onActivityResult, where I can finish the parent activity, but this way is quite bad, i think...

I prefer the first one, if it would work....

View 3 Replies View Related

Android :: Activity That Does Not Fill The Parent Screen

Dec 14, 2009

Any idea why this doesn't create an activity that looks like a popup instead of an activity that completely fills the screen?

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

I assumed that I only needed to set the layout height and layout width to something other than "fill_parent", but it still shows up as a black screen that completely fills the screen.

Ultimately, I simply want to create a popup, but I do not want to use an AlertDialog. Is this possible?

View 2 Replies View Related

Android :: Parent And Child Activity OnCreate?

Jul 2, 2010

I have a parent activity, and a child activity that extends the parent activity. When the parent starts the child activity,

Which onCreate gets executed first? The child's or parent's?

There is a particular variable I am setting in the Child activity's onCreate method, and right now, it looks like it takes a while to get to the Child activity's onCreate, and so the methods in the Parent are reporting an empty variable. Whereas when I make the Parent sleep for a while, it reports the correct variable.

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

So, basically, even after the Parent starts the Child, it still returns "Parent Value", but when I have the thread sleep, it return "Child Value".

View 1 Replies View Related

Android : Use Data Passed From Parent Activity In A Sub?

Jun 28, 2010

When we want to pass data from an activity to a sub activity we use the is there any event handler that handles this?

View 1 Replies View Related

Android :: Want To Open New Child Activity In Parent LinearLayout

Nov 8, 2010

I want to open new child activity in the parent LinearLayout. Just similar like Tabs.

View 1 Replies View Related

Android :: Return Back To The Parent Activity From Subactivity

Jun 14, 2010

My application supports twitter and needs to open browser for OAuth. When the user clicks the Share on Twitter button, the main activity will create another subactivity (TwitterActivity) to handle twitter authentication issues. Here is a flow graph showing how activities are invoked currently. Main is short for MainActivity and Twit for Twitter Activity. startActivity() OAuth intent OAuth callback finish()Main ---------------> Twit ------------> Browser --------------> Twit --------> Browser As you may notice, after the TwitterActivity calls finish() to stop, it will now return back to MainActivity, but Browser instead. How can I make it return back to MainActivity?

View 2 Replies View Related

Android :: Detect If View's Parent Activity Is Being Destroyed?

Jun 30, 2010

I want to do some cleanup in a view when the activity is being destroyed. Is there any way to get a callback in the View when the activity is being destroyed? I tried using onDetachedFromWindow, but I'm not sure whether it is correct thing to do.

View 1 Replies View Related

Android :: Detect If A View's Parent Activity Is Paused

Jun 20, 2010

In one of my Activities I have a ListView that displays a list of locations. For each list item I want a little arrow icon that points in the direction of the corresponding location. I implemented this icon by extending ImageView. This custom View has a listener that reacts to changes of the device's orientation by rotating the icon image accordingly. I register the listener in the onAttachedToWindow() method and unregister it in onDetachedFromWindow(). This kind of works but the problem is that onDetachedFromWindow() sometimes gets called only a long time after the containing Activity has paused. Also, the whole layout overall seems a little hacky. So my question is: Is there a proper way to unregister the listeners or would you implement this in a completely different way to begin with?

View 1 Replies View Related

Android : Lifetime Of Background Parent Activity After StartActivityForResult()?

Jul 19, 2010

Is there an exception in the lifetime rules for a parent activity that's in the background after invoking startActivityForResult()? From my understanding, in low memory scenarios, the background activities are killed before the foreground. Does this rule still apply even if the background activity started the foreground one for the purpose of obtaining some result?

In this case, I think it would make sense for the foreground child activity to get killed first or to equalize the lifetime of the parent and child.

View 5 Replies View Related

Android :: SingleInstance Of The Activity And Relay Information Back To Parent?

May 8, 2009

I basically have three activities X, Y, Z and I want only one instance of each but I want control over the navigation and I can't do that by putting all three activities in one task because of the stack structure.

Here is a scenario, from X I launch Y given a certain "id" which correspondence to specific data in the DB, Y inflates and populates it's views, then I go back to X and launch Y again with a different "id" in the intent, I don't want the overhead of launching the activity and inflating the views again, anyone know how to do this?

I tried using singleInstance, but the problem is that I can't send the result code back to an activity in a different task.

View 4 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 :: Create A Single Class Which Can Be Parent For Every Type Of Activity?

Oct 7, 2010

I wish to have a single class which all of my Activity classes extend. I have ListActivities, Activities, MapActivities, TabActivities, etc in my App.

I have many of these different activities in my app, ~12 activities. I want each of them to have the methods which are in the parent class.

Right now, i have created 4 parent activity classes which are extended from a certain activity depending on their type(ListActivity, Activity, MapActivity, TabActivity)

I am creating a lot of redundant code - each of the 4 parent activities has almost identical code, in exception for what class activity it extends.

Here is an example that may clarify what my problem is:

I have an Activity: MenuScreen which extends BaseListActivity BaseListActivity extends ListActivity BaseListActivity contains methods and fields which i want all my activities to have access to I have another Activity: HomeScreen which extends BaseActivity BaseActivity extends Activity BaseActivity contains the same methods and fields which are in my other Base[<type>]Activity classes(such as BaseListActivity)

These methods/fields are copy-pasted to all my Base[<type>]Activity, and seems awfully redundant to me.

Can i create a master activity class which all types of Activity classes can use as its parent? if not, am i stuck with copy and pasting this code and feeling gross/dirty about it?

View 2 Replies View Related

Android :: Way To Skip Parts Of An Activity Stack When Returning Results In Droid?

Oct 16, 2009

I'm making an app which has a flow roughly as below: User starts on the main screen with an empty list, hits menu, and goes to "add item." (Activity A) User is given a new activity which allows them to specify search criteria, then hits "go" to do a search. (Activity B) User gets a list of results, and can click on one of them to view more details. (Activity C) User sees details of item, and can use a menu item to save it to their list in Activity A. (Activity D) Right now, I am having each Activity call each other Activity for results, and then it is passing the result all the way back up the stack as it returns to Activity A. Is there a way to jump this, since all I want is for a result in Activity D to get to Activity A directly? Note that a user should still be able to navigate backwards (using the back button) through each activity, but if they explicitly save the item in Activity D, I want it to jump straight to Activity A.

View 2 Replies View Related

Android : Forward Activity Result To Parent With SingleTop Launch Mode?

Jun 1, 2010

I have two activities: a MainListActivity, and a DetailViewActivity. DetailViewActivity is set with android:launchMode="singleTop".

When clicking an item in the "main list" activity, it launches the "detail view" activity via:

startActivityForResult(detailIntent, REQUEST_CODE_DETAIL);

If I then call setResult(RESULT_OK, resultData); and finish(); from within the Detail activity, that resultData is received by the "main list" activity's onActivityResult(..) method correctly.

However, if I implement a "see previous"/"see next" type of navigation within the Detail activity, and implement it using singleTop, that result no longer gets sent back to the initial activity:

Intent nextItemIntent = this.createIntent(nextId);
nextItemIntent.setFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
startActivity(nextItemIntent);
// at this point, my DetailActivity's onNewIntent() method is called, and the new data is loaded properly

But from here, when I call setResult(..) and finish(), my MainList activity never receives the new/updated result. Anyone know what I'm doing wrong?

View 1 Replies View Related

View Lifecycle And Refresh When Returning From Activity?

Oct 26, 2012

I'm writing an application for Android and have multiple Activities, there are three to be exact. When a user drills down to the record they would like to view, they can modify it.

The issues is that when I click the back button to move to the previous screen, i'd like to refresh it to reflect the update performed by the end user. I can't figure out how to hook onto the appropriate event and then refresh my data on that view.

View 3 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 :: How To Update My Activity Due To Contact Info Changes

Jan 6, 2010

I have an activity which queries and display some Contact Information. And it has a button which launches the intent for 'Edit Contact'(the default Android activity). What should I do to refresh my view in case user edits Contact Information? requery in the onResume() of my activity? add a content observer?

View 2 Replies View Related

Android :: Multiple Contact Selection Activity

Aug 30, 2010

Is it possible to get a multiple contact selection activity in Android?

View 1 Replies View Related

Android :: TabActivity How To Show Contact Activity In A Tab

Dec 29, 2009

I am developing an application and as part of it I would like to show a tabactivity and use the contact activity to let the user see,modify,or call a specified contact.

My code is this:

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

View 3 Replies View Related

Android : Way To Launch 'Add Contact' Activity In Droid?

Dec 13, 2009

how to launch the Add Contact' activity in android?

View 7 Replies View Related

Android :: Start View Contact Activity On Droid?

May 20, 2010

I want to create a tab which contains a tab for viewing contact detail. Here is what i did code...

It throw security exception.

View 1 Replies View Related

Android :: Picking An Image For Wallpaper

Sep 4, 2010

I'm writing a live wallpaper and need some help. My wallpaper will create an effect over top of another image or existing wallpaper (not another live wallpaper) that the user chooses in the "Settings".My problem is this: I can't find a way to list the static wallpapers or images on the phone. I've seen some examples of getting the camera images, but not the wallpapers.

View 1 Replies View Related

Android : Picking Up A PhoneBook Entry Under 2.0

Nov 1, 2009

The party is over and Google suddenly released the much anticipated Android 2.0 SDK.

Much improvement for sure !

That said, the party is over and I came to have to deal with the following Ghost;

I've released an app in the market (Ambu) - so far qualified under SDK 1.5 &1.6. Using the emulator for Android 2.0, things don't work anymore.

This is what I'd like to share;

- my app invokes an ACTION.PICK intent as way to extract phone contact from the phone book and populate a database.

When compiling my app using the SDK version 1.6 and a target emulator configured at 1.6 level, the following code WORKS:

CODE:.........

When running the same code (compiled with SDK 1.6) and a target emulator at 2.0 level, the above code never return the entries I have populated in my the phone book. It's as if the phonebook was always empty.

A couple of additional observations;

- When running the emulator in 2.0 mode, the default local input type is Japaneese. Any way to change this ?

- Under the 2.0 emulator, and setting a "clean" AVD image, if you launch the dial button, press menu and select account, you'll probably immediatly get a "android.process.acore" error ...

- In the most recent SDK document, I can read that "People.CONTENT_URI" was deprecated after SDK 1.6. Therefore, I've changed the above code to:

CODE:.........

Unfortunatly, with the above, I get a crash right away when invoking ACTION_PICK.

Question to the Google Folks (dear dianne and others, please !);

How to we properly pick a phonebook contact under the 2.0 OS using 1.6 or 2.0 compiled apps ?

View 16 Replies View Related

Android :: Bind Activity When Contact Entry Data Such As Birthday Is Clicked

Mar 7, 2010

How can I bind my application so, when the Birthday entry is clicked on a Contact Entry, it will open up my activity?

View 1 Replies View Related







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