Android :: Calling Intent.getStringExtra() Throws StackOverflowError Periodically

Jan 25, 2010

I have an android application that I am supporting and after calling one of the activities numerous time, it throws a stackoverflowerror when trying to get the extras from the intent. Here is the the stack trace from when it crashes. Any ideas as to why after calling the activity at least 4 times the next time throws StackOverflowError when getting the extras from the intent?

The code used to build the intent is and contains String, String, boolean, Object:

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

And the code that is throwing the StackOverflowError is:
CODE:.........................

Android :: Calling Intent.getStringExtra() throws StackOverflowError periodically


Android : How To Use Intent.getStringExtra From Within An Activity?

May 27, 2010

I am relatively new to android. I have two applications A and B. I have an activity in A, lets name it x, that would launch the application B. Now the intent sent by x contains StringExtra that I want the Starting activity in B to use. Is there a way for the activity in B to do that?

View 2 Replies View Related

Android :: Calling NotifyDataSetChanged() Throws Exception

Oct 7, 2010

I have a ListView that I'm binding to an adapter. The adapter is a protected member of my main class. I have a listener thread that receives data and updates the source list for my adapter. When I call the adapter's notifyDataSetChanged() method, an exception is thrown:

Runtime Exception: PhoneLayoutInflater(LayoutInflater).inflate(int, ViewGroup, boolean) line: 322

I've read that the notifyDataSetChanged() method has to be called on the UI thread, and I'm doing that. In fact, just to be sure, I even update the ListView's data source on the UI thread. All I do in my listener thread is update a protected member that houses the data. Here's an example of what I'm doing (note that I don't have the part of the code that calls the AsyncTask, but it's fired from a listener):

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

Does anyone have any pointers or ideas as to why I'm getting this exception? Any help is much appreciated.

Here are the layout files, as requested:

main.xml:

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

row.xml:

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

View 1 Replies View Related

Android :: ADT Calling Code That Doc Specifies Throws An UnsupportedOperationException?

Jul 1, 2010

My XML layout in res/layout/edit.xml: Code...
When I try to switch from "edit.xml" to "Layout", I see this error: java.lang.UnsupportedOperationException: addView(View, LayoutParams) is notsupported in AdapterView I checked the documentation for AdapterView, and this is expected behavior. Why, then, does ADT expect it to work?

View 1 Replies View Related

Android :: Calling TextView.setText() Periodically Causes UI To Jerk

Sep 28, 2010

I'm coding an audio player where a thread updates the TextView representing the track's elapsed time, every 250 milliseconds. The display looks like this:

1:30/2:30<-----Progress Bar----->
TextView 1 is 1:30/ and TextView 2 is 2:30.
Both are set to wrap_content for width.

What happens is that on every 250 millisecond cycle, the thread checks the current time and updates TextView 1. For this brief moment, TextView 2 and the progress bar get pushed momentarily to the right by about 2-4 pixels. Then they come back to place until the same thing happens during the next cycle. I don't know what's happening. There are no trailing space characters, etc and everything should, theoretically, be working smoothly but it's not.

View 1 Replies View Related

Android :: PreferenceScreen - Intent - Element Throws Exception

Sep 17, 2010

I've got a probleme with an exception, but I don't know why I get this exception.

The project is about implementing an AbstractAccountAuthenticator with an AbstractThreadedSyncAdapter to sync certain data on a server with a content provider.

I made everything and both adding accounts and syncing is running without any problems.

Now I've tried to add a Preference-Screen just like suggested in the android reference (search for AbstractAccountAuthenticator, it is explained there) via xml like this:

autenticator.xml:

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

The Preference-Screen-xml looks like this:

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

The screen is promted how it should be, but and that is the problem: When I click on the PreferenceScreen with the intent it leads to a crash of the system (both in the emulator and my HTC-Desire).

Logcat says:

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

Here the part of the manifest, where the activity is defined:

CODE:.......

The whole test-code (it is my project on the essentials to find the problem) is to find at googlecode (http://code.google.com/p/ cleanproject/source/browse/) (Eclipse-Project)

View 2 Replies View Related

Android :: Calling An Intent The Implicit Way

May 21, 2009

I`m trying to develop an application, just to test the ability of android to call an activity with an intent based not in the specific class name but specifying the action, category and data information. Acording to this link

http://developer.android.com/guide/topics/intents/intents-filters.html

only three aspects are consulted when comparing an intent object to select the future activity to run. I created two android projects (and two activities), the first is the main project who sends the request and the second can be called directly or through the filter. This is the call of the activity in the main project:

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

This is the part of the manifest that specifies (or at least I try to specify) in the secondary activity that it`s available to be selected to run with that information:

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

I installed both separatelly and I was expecteing to see the second activity after the called but instead I got an ActivityNotFoundException. By the way if I comment the t3.addCategory (Intent.CATEGORY_HOME); line and change the t3.setAction (Intent.ACTION_EDIT); to t3.setAction(Intent.ACTION_VIEW); the browser is executed so I think the problem is in the manifest of the second activity.

View 4 Replies View Related

Android :: URL Commands When Calling Youtube Through Intent?

Jul 12, 2009

The standard Youtube URL commands (&loop, &rel, etc) do not seem to work when calling Youtube via an INTENT from inside the android application. The videos play fine, Youtube app comes up fine, but the additional URL commands don't appear to work. Is there another set of commands I should be using or are commands simply ignored using Youtube in this manner. Also, is there any documentation on the interface from android to the Youtube app available on the net?

View 3 Replies View Related

Android : How To Use Variable While Calling New Activity In Intent?

Feb 2, 2010

Can any one guide me how to achieve this?

View 4 Replies View Related

Android : Droid Calling Intent From Another Class?

Jun 29, 2010

I am calling intents alot in my program and I thought that I could write a public class that would have all of my intents so I can just call something like intents.testIntent(params) and then have it fire off the intent.

I tried it out but am getting a force close with a null pointer exception. This is my whole class. I know it is probably sloppy but I have just been learning java for 2 months so I still am an amateur. Any way, my code...

View 1 Replies View Related

Android :: Update Intent Of An Existing Activity While Calling StartActivity

Sep 13, 2010

I am having two activities, say activity A and B. Activity A is an ListActivity, and when the items in the list is selected, it will call startActivity() to bring up B. The problem here is that when I am in B and click the home key, and then go to the application launcher to resume my application, A will be brought up again. This time when I click a different item in A, it will bring up B with the old data of the previously selected item before the home key was clicked.

After examinzing the code, I found that the startActivity does not update the intent of B. I found a post here about the similar question, and the answer was to overwrite the onNewIntent. However, I found that it doesn't work, because this method never get called when the second time I call startActivity. I am sure that this is the same instance, because I've printed out the instance number. Is there any other ways to update the intent of the activity? Or I need some other settings to make the onNewIntent get called? I didn't set any flags or launch modes, so everything is default.

View 1 Replies View Related

Android :: Java.lang.StackOverflowError When Deserializing

Apr 21, 2009

I've got a strange problem here doing object de/serialization. In Java (JDK 1.6) I serialize some objects. In Android (SDK 1.1) I deserialize them. This work quite nice in general. In order to work with a server object (that uses Castor un/ marshalling) I do it like I always do. Same routines. Well, this time the file is only 172kb (my routines works pretty well with 2,4mb files) but the interlacing is quite deep. So it all starts with a class containing 2 ArrayLists. I tried de/serializing just ArrayList<String> and this works very well. But the XML file (which is unmarshalled with Castor and serialized in JDK) has 7000 lines. So I get this StackOverflowError....................

View 3 Replies View Related

Android :: Java.lang.StackOverflowError When Run Code On Sdk1_1r1

Sep 17, 2009

I am using custom listadapter for ListActivity, but half adapter is getting built and then throws "java.lang.StackOverflowError". When I ran the same code on sdk1_1r1 it works perfect. When do i try to run on sdk1_5r3, gives this error. Generally java.lang.StackOverflowError when happens if the some function caught in infinite recursion, but if this is case then why does it working on sdk1.1r1 perfectly. I tested the appl on sdk1_5r3 both emulators default AVD(96 RAM) and custom AVD(523 RAM). For all try it gives the same error.

Log Cat:..........................

View 6 Replies View Related

Android :: DatePicker Throw Java.lang.StackOverflowError When Embbeded With TableRow

Sep 1, 2009

A strange error: when DatePicker is used as child item of <TableRow>, it throws out StackOverflowError and then the application crashes. It would work fine if it is defined outside of <TableRow>.

Do not know why ....... Is it related to my UTF-8 strings defined in strings.xml?

CODE:.........

The exception:

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

View 6 Replies View Related

Android :: Android - Unhandled Event Loop Exception - Java.lang.StackOverflowError

Feb 23, 2010

This work flow is causing Eclipse to give me:

Unhandled event loop exception java.lang.StackOverflowError

Looking at the eclipse log it gives just a bit more information:

Unhandled event loop exception java.lang.StackOverflowError org.eclipse.ui

I am running: ....

View 3 Replies View Related

Android :: IsUserAMonkey Throws Exception

Oct 17, 2010

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

I get the following exception when trying to use the isUserAMonkey API on a keydown. mAM = (android.app.ActivityManager)getSystemService(Context.ACTIVITY_SERVICE); if (mAM.isUserAMonkey()) {return true;} Any reason why this may be happening?

View 9 Replies View Related

Android :: Why Keep Throws Rescources.NotFoundException

Nov 18, 2009

In the following code, these lines:

CODE:.........

The app keep throws the Rescources.NotFoundException. I checked the xml file, all the ids are defined and they are all in the R.java. So I really don't know why the app throw this exception.

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

View 2 Replies View Related

Android :: SlidingDrawer Throws RuntimeException In OnMeasure / Set It Up?

Apr 30, 2009

I would like to do some tests on SlidingDrawer however i always found RuntimeException when SlidingDrawer.onMeasure is called i check the code and think the exception is caused by unspecified MeasureSpec

so i would like to ask how to setup the MeasureSpec in SlidingDrawer?

View 2 Replies View Related

Android :: ProgressDialog In AsyncTask Throws An Exception

Jun 25, 2010

I'm trying to make a simple ProgressDialog appear while my AsyncTask is fetching data. In my onPreExecute() method I have this: pd = ProgressDialog.show(c, "Loading...", "Please wait");

c is the context passed into the constructor of my AsyncTask from this.getApplicationContext(). Unfortunately, I keep getting an exception with this message: Unable to add window -- Token null is not for an application

What am I doing wrong?

Using this instead of this.getApplicationContext() has revealed another problem. When I call ProgressDialog.show(..., a ProgressDialog is displayed, but not until after the AsyncTask has completed. In other words, the data loads and then the dialog is displayed. If I include pd.dismiss() in my onPostExecute() then I never even see the dialog (presumable because it is closed before it ever gets opened).

It turns out that fetch.get() was hogging the UI thread and not letting the ProgressDialog display.

View 2 Replies View Related

Android :: GeoCoder.getFromLocationName Throws IO Exeption In Froyo

Aug 26, 2010

I have recently noticed that when Running the function geoCoder.getFromLocationName() on android 2.2 (Froyo) then i Receive a IOExeption (Which does not occur on other SDK versions).

After some reserch i have found suggentions to add the following Permisions:

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

However this does not solve the problem, and this appears to be a Android SDK Bug.
Is there a knows solution to this problem?

Here is the stack trace though it is not particularly helpful the inner stack trace is null so not great.

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

View 3 Replies View Related

Android :: Application Throws Exception When Rotate Device

Jul 11, 2010

I have developed simple application of progress bar in that when I hit the button then it will do some work in background and one progress bar is visible on foreground. afte completing back ground work it display the same screen. It works fine if I don't rotate mobile but when I rotate mobile then it throws java.lang.IllegalArgumentException: View not attached to window manager

I know when we rotate the device or open keypad it starts activity restarted. But How to avoid this error. My code is.

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

View 3 Replies View Related

Android :: Starting Service From Other Apk - Throws NoClassDefFoundError Exception

Jul 31, 2010

I have two projects in Eclipse: service and UI client.

In onCreate in UI client I have:startService(new Intent(this, ExampleService.class));

But this fragment: ExampleService.class throws NoClassDefFoundError exception at runtime. I have installed ExampleService.apk, and ExampleUiClient.apk. Project compiles, and everything looks fine. What I am doing wrong?

Is it possible to start service from other apk?

View 2 Replies View Related

Android :: Database Reading Problem Throws Exception

Mar 30, 2010

I am having this problem with the android database. I adopted the DBAdapter file the NotepadAdv3 example from the google android page.

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

The error that i am receiving is from Log.e(TAG, e.toString()) in the methods retrieveKey() and storeKey() "no such table: myuserkey: , while compiling: SELECT userkey FROM myuserkey"

View 2 Replies View Related

Android :: Periodically Check If GPS Get New Data

Jul 25, 2010

I have successfully been getting GPS data through the registerLocationListener() and onLocationChanged() methods. The only problem with this is that the speed reading of my app freezes if there is no more GPS data (e.g. when I go indoors, enter a tunnel, etc). The behavior I want for my app is that the user is somehow notified that the speed reading is probably not accurate due to a lack of fresh data (set speed to zero, blink the speed reading, etc). How can I do that? I though of checking periodically whether the GPS unit was detecting any satellites, but I'm not sure how to force periodic checks.

View 1 Replies View Related

Android :: Periodically Executing AsyncTasks?

Sep 1, 2010

I am getting data from the server using AsyncTask. I need to update the data periodically.

View 3 Replies View Related

Android :: How To Handle Throws Clause In Java Exception Handling

Sep 4, 2010

I have class A in which I have a method openfileConnec().

It was written like the below:

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

Now I come to class B where I will call this method like the below:

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

I was asked a question in an interview as follows:

Why does the method have a throws Exception in its declaration? Is it that on of the methods called in the implementation throws the base class exception? Also If we get a exception during calling the method (fileConnect( )) control goes to catch block. After executing catch where should the control go, what should be sent to base case?

View 2 Replies View Related

Android :: Why Httpclient.execute - Httppost - A­lways Throws IOException

Dec 10, 2009

Is there someone troubled the same issue.

The code in run.

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

View 8 Replies View Related

Android :: Handler From A Runnable Throws Null Pointer Exception

Sep 20, 2010

I have a Thread that downloads data from internet

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

There is an activity that needs to be updated according to downloaded data.

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

Whenever I run above code I get NullPointer Exception .Please help me to update the view.

View 1 Replies View Related

Android : Starting A New Activity Throws Me Into Debug Mode - Stops App

Jul 22, 2010

I have a listview. Whenever I strike an item of listview the debugger gets opened instead of starting a new activity (i.e. what I want). Code...

P.S. all the xml files are correct.

View 3 Replies View Related

Android :: Scanner For Wireless Networks Periodically

May 26, 2010

I'm developing sort of a wireless scanner, so I need to scan every X seconds. I know I should use WifiManager and startScan() to get the networks and then register a receiver to receive the event once the scan has finished. However I'm having problems when trying to figure out how to scan periodically. It's more like a design problem. My solution so far has been to create a Service which takes care of the scanning, besides the main Activity.

I think this is correct. So, how could I tell this Service to scan every X seconds? I've thought it may have a Thread object, call its Scan method during tart_services() and then take it to sleep. Also I thought I could just get rid of the Service and run the Thread from the main Activity, but then I guess it would die whenever the Activity is not visible. None of then seem like a really good solution to me, and I think there must be an easier way to do this.

View 6 Replies View Related







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