activity

Android back button does not restart activity?

My app intiates an activity. On the click of a button, the app opens up the browser with a webpage. When I hit the back button, it comes back to my initial activity screen, but does not resume or restart the activity. When I put all the layout code and activity code in onResume instead of onCreate, the activity gets restarted. My que...

Call other activities in an activity?

Say I have 2 activities (ActivityOne and ActivityTwo). How would I call ActivityTwo from ActivityOne? Then how would I return to ActivityOne from ActivityTwo? For example, I have a listview with all the contacts on the host phone. When I tap on a contact, another activity shows information and allows editing of that contact. Then I could...

I need to recover an instance of an activity

Well.. the title is pretty descriptive, I have a bunch of tab activities (which I implemented myself, didn't want to use the tabviews with activities inside them), so It's basically 5 activities calling each other every time the user clicks on the tabs displayed as a row of LinearLayouts at the bottom of the screen. The thing is that th...

Does pressing Back always cause Activity to finish()?

I've heard that pressing the back button will essentially cause the current Activity to finish(). Is this always the case? Seems like it would be with the way it pops the Activity off the stack. The one situation I'm not so sure about is when the root Activity in a Task has back pressed. I'm currently experiencing a very weird effect, d...

how to pick email address from android phonebook?

friends, i am using folloing code to get addressbook name phone android phone. btnContacts = (Button) findViewById(R.id.btn_contacts); txtContacts = (TextView) findViewById(R.id.txt_contacts); btnContacts.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { Intent intent ...

How to pass Remote Interface (aidl) throughout Activities ?

Hi All, I am developing an application using services and Remote interface. I have a question about passing the reference of my Remote interface throughout Activities. In my first Activity, I bind my service with my activity, in order to get a reference to my interface I use private ServiceConnection mConnection = new ServiceConnec...

android startactivity

Hello, I have an application that contains 3 activities A, B and C. The activity A is the one that gets started when I start my app. From A I start B using mIntent.setClass(A.this, B.class);, then startActivity(mIntent); this goes well. What goes wrong is when I want to start the activity C from B. this how the manifestfile looks like:...

how to access layout-large layout in the activity?

Hi, I am having layout which I want to render on to different sizes of mobile (like WVGA854). Resource structure is like res\layout\main.xml res\layout-large\main.xml By default it is taking layout main.xml file itself of layout. Its not pointing to layout-large\main.xml its throwing exception:Activity can not start resource not fou...

Android Multiple Handlers Design Question

This question is related to an existing question I asked. I though I'll ask a new question instead of replying back to the other question. Cannot "comment" on my previous question because of a word limit. Marc wrote - I've more than one Handlers in an Activity." Why? If you do not want a complicated handleMessage() method, then use pos...

how to add button or Menu in Contacts list?

dear friends, i am using following code to open Android Contacts @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); btnContacts = (Button) findViewById(R.id.btn_contacts); txtContacts = (TextView) findViewById(R.id.txt_...

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

Hi folks, I have an Activity (A) and a Service (S) which gets started by A like this: Intent i = new Intent(); i.putExtra("updateInterval", 10); i.setClassName("com.blah", "com.blah.S"); startService(i); A have a function like this one in A: public void someInfoArrived(Info i){...} Now I want to call A.someInfoArrived(i) from with...

How to positioning the controls in android through code?

Hi, I am developing an application, and I want to make it work on different resolutions and different densities. My question is how to position the controls through code such a way that it works on all resolutions. Regards: Jayanth ...

Android application not working on 1.5 firmware?

dear friends, i have created a single page application of showing phonebook data in a list. i am using 2.1 sdk in emulator and application works fine. but in my HTC hero firmware is 1.5 when i try to intall same application on HTC hero application is installed successfully but when i click on app icon it gives me force close error even...

How can data not stored in a DB be accessed from any activity in Android?

hi, I'm passing data to a ListView to display some restaurant names. Now when clicking on an item I'd like to start another activity to display more restaurant data. I'm not sure about how to do it. Shall I pass all the restaurant data in a bundle through the intent object? Or shall I just pass the restaurant id and get the data in the ...

How to restore content in the same Activity based on the calling Intent?

Hi everyone, here's my scenario: I start an Activity A via an AppWidget. The AppWidget displays (inter alia) 3 buttons. Each of them has its own intent. They are designed to provide information to the Activity via a class called AppWidgetReceiver. In latter I create an intent like this: Intent i = new Intent(context, CreateNoteActivity...

Android service- how to communicate with activities

Hi I'm wondering which is the best way to communicate between a Service and an activity.. Broadcast intent Callback others?... Bye ...

iPhone real memory climbs when interacting with UI

I've been using the Activity Monitor to check the memory usage of my iPhone apps. I've noticed that the Real Memory climbs whenever I interact with the UI in any way, even if there's no code being called. For example, I can create a brand new View-Based application and run it, and as I click or drag in the empty window the Real Memor...

Windows Workflows - While Activity for creating multiple tasks not working

I am using a while activity for creating multiple tasks for a workflow. The code is executed fine and the task is created when the loop runs only once. But when the loop runs twice or more, only one task is getting created. Also the WF status shows as Error Occured. All I want to do here is create multiple tasks (no of tasks depends on ...

SecurityException: Permission Denial requires null

Hi all, I would like to launch the market from a preference screen but when I try to do this I obain a java.lang.SecurityException: Permission Denial: starting Intent { cmp=com.action.test/.ui.activities.Test } from ProcessRecord{44db1300 3697:com.pippo.pluto/10067} (pid=3697, uid=10067) requires null. This is my code: startActivity(n...

Determining if an Activity exists on the current device?

Is there a way to check and see if an Activity exists on your device? If I have a youtube video link I want to specify it open in the YouTube PlayerActivity. However, I don't want to crash if for some reason they don't have it. Is there a way to check and see if the activity exists? I don't think I can catch the runtime exception since ...