Android :: Call ListActivity From An Activity / App Crashes

Mar 23, 2010

My app crashes when i call a ListActivity from an Activity. I have searched on Internet and many people ask the same but i have not found any response. The only person i have found that solves the problems says that he solved changing manifest but he does not say nothing else. I i put the ListAvtivity as main activity in manifest app works ok buet if a set an Activity as main activity an then call ListActivity like:
Intent searchAct = new Intent(this, SearchResult.class); startActivity(searchAct);
then my app crashes. Des anybody know what happens?

Android :: Call ListActivity from an Activity / App crashes


Android :: ListActivity In Tab Crashes

Oct 26, 2009

I'm trying to create an application that has 3 tabs. Under the middle tab should be a ListView. It starts up fine (on the left tab) but when I click the middle tab it crashes.

The other two tabs are static data specified in the main.xml file. But the middle tab, I try to create dynamically. Here's the code from the main onCreate function:

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

Instead I appear to get an exception:

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

ContactListActivity is defined this way:

public class ContactListActivity extends ListActivity { ...

I get the feeling that I'm supposed to create the Intent with something like Intent.ACTION_VIEW but this is where I get lost. If this is the problem, I could try stuff until it works, but I'd prefer to understand why.

Or is ContactListActivity supposed to override something ?

View 2 Replies View Related

Android :: Activity Crashes When Remote Service Crashes

Jul 16, 2010

I'm trying to understand remote services at the moment and everything works fine, i can start the service and know how to communicate with it through the AIDL-interface. My problem is that the service seems to still run in the same process like the activity it was started from, because the activity crashes too, if there is an error thrown in the Service.

I set the service process to remote ( android:process=":remote" ) so what am i doing wrong? Or what do i have to do to unbind the service-process completely from the activity-process?

View 1 Replies View Related

Android :: ListActivity Vs Activity What Are Advantages?

Aug 14, 2009

I was reading on ListActivity and Activity and wanted to know which is better? I only need to display one listview. Would I see great improvements? Does ListActivity handle screen rotation better or it's the same?

View 2 Replies View Related

Android :: How To Switch From Activity To ListActivity?

Jul 24, 2010

This post probably shows my ignorance of Android coding, but here goes. I have a sample app I am developing which starts by extending Activity. I have a main.XML layout which works great. On a button click from the main layout I'd like to load a ListView. I think I understand how to use ListView and seed data into it. I have created a new layout which contains this ListView. I am confused, however, how I switch from a regular Activity to a ListActivity so I get the convenience methods like setListAdapter()? Should I be starting with a ListView, and then drawing the other view on top once the app starts by inflating the layout and using it? If not, how do I create a ListActivity object inside my app, and where should I create that? If you have a sample application or tutorial that shows how to do this, I would appreciate it.

View 2 Replies View Related

Android :: Can ListActivity / Tab Widget Be Use In One Activity?

Aug 9, 2009

My activity have to use List and Tab widget, one is left side,the other is right side, I means layout, but use List must to extends ListActivity, and use Tab widget must to extends TabActivity?

View 7 Replies View Related

Android :: Way To Switch From Activity To ListActivity?

Jan 22, 2009

I have a main class derived from Activity, I need a ListActivity (displayed when the "menu" button is clicked). How can I proceed. I don't understand how I can switch from one to the other?

View 3 Replies View Related

Android :: Can't Change Activity To ListActivity

Oct 5, 2010

I need to change Activity to ListActivity. But I can't start my project... do ı need change manifest.XML for it? Or how can I change screen from Activity to ListActivity? Is there any difference to startActivity(new Intent(this, list.class))? Code...

View 2 Replies View Related

Android :: Activity Should Be Restarted After Activity Crashes?

Oct 14, 2009

we are developing an application where we are depending on a native, custom-written library which sometimes crashes. When the Activity crashes (it's the Activity's SurfaceView that crashes, either while resuming or pausing Activity) we would like to automatically restart the Activity that was just running, preferably without seeing the idle screen in between. What we find strange is that sometimes, our Activity is restarted by Android automatically after the crash, and sometimes not. How does Android decide this? Is it somehow dependant on exactly what the Activity was doing at the time of the crash and if that was considered important enough to restart? How can we force a restart to make sure the Activity doesn't quit after a crash? Running on device flashed with Android 1.5. The Activity is running as singleInstance. Doesn't seem to make much difference which mode it is though. Other methods we have tried are:

1) Since we can predict when crash is going to happen(but not stop it), use AlamrManager to start the Activity again via an Intent, 3 seconds later. Has the disadvantages that 1) need to be able to predict crash 2) if crash takes longer than 3 seconds (normally about 2s) it won't work 3) Idle screen is seen for about ~1 s, since some slack is needed.

2) Start a Service, then let the Service (which always seems to be restarted by Android after crashing) start the Activity in its onStart method. Has the disadvantage that Android doesn't restart the service until 5 seconds after the crash, so the idle screen is seen quite along time before Activity restarts. Is it possible to modify how long it takes before the Service is restarted by the Android system?

View 4 Replies View Related

Android :: How To Get Method Of Listactivity From Activity Class?

Apr 19, 2009

Can i call method of Listactivity from Activity class? I have creates Intent object of myListActivity class and called startIntent() from myActivity class.

View 3 Replies View Related

Android :: What ListActivity / ListView Provide Beyond A Regular Activity / View?

Aug 7, 2010

In Android, what functionality do ListActivity and ListView provide beyond a regular Activity and View?

View 2 Replies View Related

Android :: How To Clear Notification If Activity Crashes?

Oct 26, 2010

In my app, I'm creating a notification with the FLAG_ONGOING_EVENT flag set.I'm cancelling the notification in onDestroy, but if my app crashes before calling onDestroy, is there any way to have my notification go away?

View 2 Replies View Related

Android :: Contacts App Crashes When Switching Between Dialer To Call Log

Dec 17, 2009

I've altered the contact app so that in Dialer the soft keypad always stays and it hides when other tab activity resumes, We've given different look for the contacts app, but when using the same, a crash occurs when we rapidly change from dialer to call log. And the App crashes without the standard crash dialog.

View 1 Replies View Related

Android : Program Crashes When I Call A Class From Another Java File

Oct 26, 2010

I am new at android development and java programming, but I have decided to program a drinking game app in android. This app basically simulates a deck a cards, a player clicks a button to draw a card then based on the card thats drawn the player plays a drinking game (ie takes 1 drink, takes 2 drinks ect).

I have the main program in one java file, and the code that shuffles the card deck and puts the card sequence in an array in other java file. My problem is that whenever a class from the other java file (classicMode.java) is called from the main program (fubar.java), my android program crashes and gives the error : "The application Drinking Game - FUBAR (process com.games.dg) has stopped unexpectedly. Please try again". Code...

View 1 Replies View Related

General :: Viber 4.2 Crashes While Trying Making Call

Jan 25, 2014

I have a problem with Viber 4.2 on Android 4.4.2 Samsung / Galaxy S4 Google Play Edition.

Viber 4.2 crashes while trying making the call (crash happens when other party answers) or while receiving the call (in the moment of answer). Also, Viber crashes while changing some options in Settings. For example, changing Settings->Privacy->Collect analytics crashes Viber. Uninstall/Reinstall/reboot device does not work. Downgrade to Viber 4.1 (still available on Viber web site) solved the problem but Viber 4.2 has new interesting options (block list, ring tone selection), so, I would like to use Viber 4.2 (but without these critical bugs).

Same problem was listed on other board (Moto G phone / Android 4.4.2).

View 18 Replies View Related

Sony Ericsson Xperia X10 :: Call Waiting - Screen Just Crashes

Aug 31, 2010

I activated call waiting, and i will be talking to a friend when i'll get another call, he options are answer,replace or busy. i'll touch the screen and press answer or any other option and none of the options work. the screen just crashes.

View 2 Replies View Related

Samsung Galaxy S :: Incoming Call Crashes Video Recording

Oct 25, 2010

Last night i was recording a video and got a call, i did not take but the video stopped, is ther a way not to take it and keep recording? thanks 4 ur time.

View 6 Replies View Related

Android :: How To Call Activity Wait For Sub-activity To Return & Proceed?

Apr 15, 2010

Experts: My MainActivity launches a SubActivity by calling: startActivityForResult(intent, REQ_CODE); The SubActivity shows a dialog that has two buttons: Yes, No For the dialog, I've the following code: public void onClick(DialogInterface dialog, int whichButton) {/* User clicked OK */setResult(DialogInterface. BUTTON_POSITIVE) ;finish();

View 2 Replies View Related

Android :: How Can Call One Activity To Other Activity Without Using Intents And Services

Mar 12, 2010

How can i call one activity to other activity without using intents and services?

View 3 Replies View Related

Android :: Android Activity Call Another Activity Method

Jun 7, 2010

A TabActivity start other activity when i click on a tab,

How to send information to parent (tabActivity) and don't finish current activity?

My tabactivity start another activity like this :

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

Inside my new Activity Option, i would like to Call method of Tabactivity, is it possible ?

View 1 Replies View Related

Android :: How To Call An Activity Of Other App From Another?

Jun 25, 2009

How can I call an activity of app A from app B.

View 6 Replies View Related

Android :: Way To Call An Activity?

Jun 23, 2009

I am developing a android application with more than four activities. i am starting a activity using startActrivity() method wherever i need to go for other activity. i feel this degrade my application performance.

View 2 Replies View Related

Android :: Way To Call Map Activity From Another?

Jul 26, 2010

When I try the above, I get a class not found exception. I have included the required entry in manifest file. The code in current activity is as follows: Intent i = new Intent(MainListingA.this, DrawTheatreMap.class); try{startActivity(i); The error I get is as follows: 07-26 23:03:20.259: WARN/dalvikvm(307): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 07-26 23:03:20.397: ERROR/AndroidRuntime(307): FATAL EXCEPTION: main 07-26 23:03:20.397: ERROR/AndroidRuntime(307): java.lang.NoClassDefFoundError: com.mobilo.movie.DrawTheatreMap 07-26 23:03:20.397: ERROR/AndroidRuntime(307): at com.mobilo.movie.MainListingA$1.onItemClick(MainListingA.java:101) 07-26 23:03:20.397: ERROR/AndroidRuntime(307): at android.widget.AdapterView.performItemClick(AdapterView.java:284) 07-26 23:03:20.397: ERROR/AndroidRuntime(307): at android.widget.ListView.performItemClick(ListView.java:3382) 07-26 23:03:20.397: ERROR/AndroidRuntime(307): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1696) 07-26 23:03:20.397: ERROR/AndroidRuntime(307): at android.os.Handler.handleCallback(Handler.java:587) 07-26 23:03:20.397: ERROR/AndroidRuntime(307): at android.os.Handler.dispatchMessage(Handler.java:92) 07-26 23:03:20.397: ERROR/AndroidRuntime(307): at android.os.Looper.loop(Looper.java:123) 07-26 23:03:20.397: ERROR/AndroidRuntime(307): at android.app.ActivityThread.main(ActivityThread.java:4627) 07-26 23:03:20.397: ERROR/AndroidRuntime(307): at java.lang.reflect.Method.invokeNative(Native Method) 07-26 23:03:20.397: ERROR/AndroidRuntime(307): at java.lang.reflect.Method.invoke(Method.java:521) 07-26 23:03:20.397: ERROR/AndroidRuntime(307): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:868) 07-26 23:03:20.397: ERROR/AndroidRuntime(307): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 07-26 23:03:20.397: ERROR/AndroidRuntime(307): at dalvik.system.NativeStart.main(Native Method) On a standalone basis, the same map activity works fine.

View 14 Replies View Related

Android :: How To Call Map Activity From Another?

Jul 26, 2010

I get a class not found exception. I have included the required entry in manifest file.The code...

View 2 Replies View Related

Android :: Back To Activity When Call Is Done

Nov 24, 2010

I am launching an activity to make a phone call, but when I pressed the 'End Call' button, it does not go back to my activity. Can you please tell me how can I launch a call activity which comes back to me when 'End Call' button is pressed?

View 5 Replies View Related

Android :: How To Call A Method From Outside An Activity?

Apr 21, 2009

I have a java class Poker.java and an Activity .GameWindow in GameWindow.Java. In the GameWindow activity i have a method...

View 2 Replies View Related

Android :: Way To Call Other Activities In An Activity?

May 8, 2010

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 hit the back button, and I would go back to the exact state that ActivityOne was in before I called ActivityTwo. I was thinking an Intent object, but I am not sure. Could someone post some code?

View 2 Replies View Related

Android :: Call Activity From Widget?

May 30, 2009

I've read through the Application Fundamentals three times today (and I had done so before), but I still can't quite wrap my ahead around the task concept. Or I guess I thought I understood it, but usually, the results I am seeing don't match up to what I would expect to happen (maybe a tool to see the current tasks/activities etc. for debugging purposes would be a nice addition).

I have multiple widgets from my provider in the Launcher desktop, and each is using a PendingIntent with a different URI as data (so they should be separate intents) to open an Activity.

I want there to be only once concurrent instance of this Activity that the user can access. So clicking the widget (1) , pressing HOME (2), clicking a different widget (3), pressing BACK (4) should bring the user back to the Desktop.

Now I did manage to do this using launchMode="singleTask" - the existing instance is brought to the top, onNewIntent() is called and I am pretty satisfied with it.

However, supposedly there are other ways to achieve an equivalent effect (say with having the activity restarted), and I'd like to understand why I don't seem to be able to get them to work: In every case, instead of seeing the home screen after step (4) (after pressing BACK), I see the *previous* instance of the Activity.

For example, if I read this correctly:

"There's another way to force activities to be removed from the stack. If an Intent object includes the FLAG_ACTIVITY_CLEAR_TOP flag, and the target task already has an instance of the type of activity that should handle the intent in its stack, all activities above that instance are cleared away so that it stands at the top of the stack and can respond to the intent. If the launch mode of the designated activity is "standard", it too will be removed from the stack, and a new instance will be launched to handle the incoming intent." http://developer.android.com/guide/topics/fundamentals.html

Then simply using using the following code to start my Activity from my widget should do what I want, no?

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

So in (3) My activity should be launched using FLAG_ACTIVITY_NEW_TASK by the launcher, which due to process affinity would find the existing task (which would consist of a single instance of my Activity), and launch the new instance on top of it. This explains what I am seeing. Why doesn't FLAG_ACTIVITY_CLEAR_TOP cause the existing instance in the task to be replaced?

Even setting android:launchMode explicitely to "standard", as mentioned in the doc quote above, this doesn't seem to change things.

I also tried android:finishOnTaskLaunch="true", but the behaviour is the exact same was just described with FLAG_ACTIVITY_CLEAR_TOP (which seems to be the exact same as when doing neither and really starting an activity without any special attributes).

I should mention that If I click the same widget in (3) as I clicked in (1), i.e. using the same PendingIntent twice, I do get the previous instance brought to the front (not restarted), but again, regardless of whether FLAG_ACTIVITY_CLEAR_TOP or finishOnTaskLaunch are being used.

I find this especially strange since the docs about tasks don't seem to mention the intent itself being relevant at all. Application Fundamentals does at one point say "For the default "standard" mode, a new instance is created to respond to every new intent", but it's not clear what "new intent" means then. Is triggering a PendingIntent multiple times through a widget not multiple "new" intents then?

I also tried various combinations of the other related options, but pretty much got nowhere.

View 2 Replies View Related

Android :: Force Activity To Call Finalize

May 20, 2010

My application contains 2 activities A and B. B is opened with startActivity(intent) in A, when B is closed with finish(), I found the method finalize() of B is not called.

My question is: How to force Activity to call finalize() when it is closed with finish()?

View 5 Replies View Related

Android :: Call TextToSpeech In Your Class - Not In Activity

Aug 16, 2010

I wrote successfully TTS with some references in Activity.

However, I want to call this TTS in my own class as below.

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

View 3 Replies View Related







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