[android-developers] Re: Null Pointer Exception In Method Boolean.Org.Json.Jsonobject Do in background async task

2016-06-25 Thread Abeer Shlby
> > I get this error End of input at character 0 of > after i run code below as you mention before > try { jObj = new JSONObject(json); } catch (JSONException e) { Log.e("JSON Parser", "Error parsing data " + e.toString()); } -- You received this message because you are subscribed to the Googl

Re: [android-developers] Re: Null pointer exception in sending SMS..

2011-11-29 Thread Gergely Juhász
0. Read the docs: http://developer.android.com/reference/android/telephony/gsm/SmsManager.html 1. Check the official example: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/os/index.html 2.Set the second argument to null in   sms.sendTextMessage(phoneNumber, "

Re: [android-developers] Re: Null pointer exception in sending SMS..

2011-11-29 Thread Rocky
Provide the logcat/error. On Tue, Nov 29, 2011 at 3:18 PM, Ali Chousein wrote: > Check your logcat. It'll give you very good log information where > exactly (e.g. on which exact line) you are getting the null pointer > exception. > > - > Ali Chousei

[android-developers] Re: Null pointer exception in sending SMS..

2011-11-29 Thread Ali Chousein
Check your logcat. It'll give you very good log information where exactly (e.g. on which exact line) you are getting the null pointer exception. - Ali Chousein Weather-Buddy http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy Geo-Filt

Re: [android-developers] Re: null pointer exception

2011-07-12 Thread Justin Anderson
*> connectivity.getActiveNetworkInfo() returns null if there is no connection. Hence when you call .isConnected() on that, it throws null pointer exception.* No, that is not it... He checks to make sure that connectivity.getActiveNetworkInfo() is not null before he calls the other methods... What

[android-developers] Re: null pointer exception

2011-07-05 Thread Sourav Howlader
Hi vani, connectivity.getActiveNetworkInfo() returns null if there is no connection. Hence when you call .isConnected() on that, it throws null pointer exception. Regards, Sourav -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to

[android-developers] Re: Null Pointer Exception on accessing value of EditText

2011-05-21 Thread Ankur Kumar
Thanks for the help TreKing and Gaurav! On May 21, 12:14 am, gaurav gupta wrote: > First set any value in edittext then u can get value . > >    1.  EditText IPInput = (EditText) > findViewById(R.id.ip); > iPinput.setText("Value inserted successfully"); >                        2.  IPInput.getTe

[android-developers] Re: Null Pointer exception in Location Manager

2010-09-29 Thread Gold
Hi,, Finally i got the solution..! The mistakes are 1) I am not assign port to telnet 2) Add uses permission for mock location..now i got latitude.. Thanks & Warm Regards, Gold On Sep 29, 2:11 am, TreKing wrote: > On

[android-developers] Re: Null Pointer exception in Location Manager

2010-09-28 Thread TreKing
On Tue, Sep 28, 2010 at 4:09 PM, Gold wrote: > hi.. > > No , still i am checking, Now while loading home > screen itself thorw the error > "The application stopped unexpectly" in log also i get same error null > pointer exception > > > thanks & warm regards, > gold > A) Please respond to the g

Re: [android-developers] Re: Null Pointer exception in Location Manager

2010-09-28 Thread TreKing
On Tue, Sep 28, 2010 at 4:00 PM, Gold wrote: > If i click redbutton I need to display latitude > if i click greenbutton i need to display longitude > OK. Does this mean you fixed your null pointer problem? > How can i did that..! please give any solution..! > Do what? Solution to what? Clic

[android-developers] Re: Null Pointer exception in Location Manager

2010-09-28 Thread Gold
Hi,, If i click redbutton I need to display latitude if i click greenbutton i need to display longitude How can i did that..! please give any solution..! On Sep 29, 1:44 am, Kostya Vasilyev wrote: > Your code doesn't seem to assign any values to redbtn and gr

Re: [android-developers] Re: Null Pointer exception in Location Manager

2010-09-28 Thread TreKing
On Tue, Sep 28, 2010 at 3:49 PM, Gold wrote: > While clicking the button1 that is Step through the debugger through this point and inspect the values of your variables in the click listener. This will tell you exactly what's null in there. --

[android-developers] Re: Null Pointer exception in Location Manager

2010-09-28 Thread Gold
Hi.. While clicking the button1 that is redbtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) {

Re: [android-developers] Re: Null Pointer exception in Location Manager

2010-09-28 Thread TreKing
On Tue, Sep 28, 2010 at 3:41 PM, Gold wrote: > 09-29 02:09:46.636: ERROR/AndroidRuntime(2995): Caused by: > java.lang.NullPointerException > 09-29 02:09:46.636: ERROR/AndroidRuntime(2995): at > com.sample.test.Home.onCreate(Home.java:38) > Now which part of your code is at line 38?

[android-developers] Re: Null Pointer exception in Location Manager

2010-09-28 Thread Gold
Hi..Sorry, Herewith I attached Logcat trace..! 09-29 02:09:42.266: DEBUG/AndroidRuntime(2979): >> AndroidRuntime START << 09-29 02:09:42.276: DEBUG/AndroidRuntime(2979): CheckJNI is ON 09-29 02:09:42.536: DEBUG/AndroidRuntime(2979): --- registering native

[android-developers] Re: Null Pointer Exception with getIntent().Extras....

2010-01-09 Thread Albert
thanks is working now, it was exactly what you said, I was looking into Intent and put/get Extras... I had no clue of this PendingIntent behavior. On Jan 9, 10:06 pm, Mark Murphy wrote: > Albert wrote: > > Hi, > > > Can someone see what I am doing wrong here, when I try to get the > > extras I se

[android-developers] Re: Null pointer exception

2010-01-06 Thread Martin
Hey, with eclipse, you can simply put a null-pointer-exception- breakpoint, then debug your program and eclipse will stop there, where the nullpointer creates this exception. Greetings, Martin -- You received this message because you are subscribed to the Google Groups "Android Developers" group.

[android-developers] Re: Null pointer exception

2010-01-06 Thread Matt Kanninen
I do the management in onStop, for my cursor which supplies the data needed by a ListView (which means the cursor has to be open whenever the activity is displayed). @Override protected void onStop() { super.onStop(); if(db!=null){

[android-developers] Re: Null pointer exception

2010-01-06 Thread JasonMP
That was it! I took out the startManagingCursor() and it worked fine. My next question is what should I do to handle the life cycle of my cursor? Should I close it outside the switch statement? On Jan 5, 5:41 pm, Vladimir wrote: > What do you think about this: > 1. Cursor created in onContextI

[android-developers] Re: Null pointer exception

2010-01-05 Thread Vladimir
What do you think about this: 1. Cursor created in onContextItemSelected() is null (for some reason) 2. Since its lifecycle is managed by the activity (startManagingCursor (c)), it tries to release it when the activity is stopped (when the new intent is launched) 3. It doesn't expect managed cursor

[android-developers] Re: Null pointer exception

2010-01-05 Thread JasonMP
Ok, I tried gino's idea with initializing my arrays differently. I also changed there names so that they did not share a name with any other arrays in my app: Did not work. I also tried calling to static variables instead of passing variables between classes with intents: This also did not work

[android-developers] Re: Null pointer exception

2009-12-31 Thread Wiebbe
Shouldnt you check if the bundle is null or not? Try to loop through it when you get there from a onContextItemSelected event. I'm guessing some value somewhere is null when it should be instantiated. Perhaps the intent is started quicker or without the bundle somehow so you get a nullpointer excep

[android-developers] Re: Null pointer exception

2009-12-31 Thread g...@devicedriven
Hi Jason I too was irked with the same exception which got called in some of my applications and i couldn't find the source for the exception.However i think i found the reason for it..Here is what i found: 1>This exception was called in all the programs in which i used arrays 2>Just try this://Y

[android-developers] Re: Null pointer exception

2009-12-31 Thread JasonMP
This is bizarre. It works fine from the OnItemClick() of my OnItemClickListener attached to my ListView. Just not inside the onContextItemSelected. *scratches head* On Dec 31, 9:57 am, JasonMP wrote: > yes, Select.class is another one of my files.  throughout my app there > are a few different

[android-developers] Re: Null pointer exception

2009-12-31 Thread JasonMP
yes, Select.class is another one of my files. throughout my app there are a few different calls to it, all done the same way i.e. "Intent i = new Intent(this, Select.class); startActivity(i);" No where in Select.class do I make a call to start Select.class or Sheet.class. When its done it calls

Re: [android-developers] Re: Null pointer exception

2009-12-30 Thread Stephen @ gmail.com
Now that I understand your intent creation a little better, and I see that the intent you are creating is unique from the class in which the code exists, I am not quite sure how it could be an infinite loop in the (immediate) way I was thinking. Reading this code Intent i = new Intent(this, Selec

[android-developers] Re: Null pointer exception

2009-12-30 Thread JasonMP
Ok, I'm suddenly very curious by your previous statement stephen about the possibility of creating an infinite loop. Upon a little more investigation I'm now getting errors all over the place...same errorjust at different points in the app where I try to startActivity(intent); As soon as the

[android-developers] Re: Null pointer exception

2009-12-30 Thread JasonMP
package com.mallet.dtool; import android.app.AlertDialog; import android.app.TabActivity; import android.app.AlertDialog.Builder; import android.content.DialogInterface; import android.content.Intent; import android.content.DialogInterface.OnClickListener; import android.content.res.Configuration;

[android-developers] Re: Null pointer exception

2009-12-30 Thread JasonMP
Hmm, Ok, I've placed the breakpoint in and everything appears to be fine, but it still doesn't work. This code is essentially a copy/ paste from another area of my app. In that instance its being called from a ListView contextmenu as well and works fine. What do you mean exactly by catching ALL

Re: [android-developers] Re: Null pointer exception

2009-12-30 Thread Stephen @ gmail.com
Sorry if this sounds silly: you might want to set a breakpoint on line: startActivity(i); when you hit that point, examine "i" carefully. From your log, I wonder if the act of starting the activity invokes your current code, inducing an infinite loop. Also, if it were my code, I would want to e

[android-developers] Re: Null pointer exception

2009-12-30 Thread JasonMP
Yes I'm using eclipse. I use the debugger and when I hit that point in my app i get the above error in my logcat window. Is there another way to debug in eclipse? On Dec 30, 1:01 pm, Matt wrote: > I would just step through it with the debugger (assuming you are using > Eclipse) > > On Dec 30, 8

[android-developers] Re: Null pointer exception

2009-12-30 Thread Matt
I would just step through it with the debugger (assuming you are using Eclipse) On Dec 30, 8:39 am, JasonMP wrote: > Anyone know what would cause this error? > > 12-30 10:26:50.858: ERROR/AndroidRuntime(921): Uncaught handler: > thread main exiting due to uncaught exception > > 12-30 10:26:50.92

[android-developers] Re: Null pointer exception while receiving at Broadcast receiver

2009-09-06 Thread Randy McEoin
It would be best to check for null before attempting to use. Perhaps whatever is issuing the broadcast is not adding the string extra. String msg_receive = intent.getStringExtra("message1"); if (msg_receive != null) { AssetTest.hh_text.append("\n\n"+msg_receive); } Randy On Sep 3, 10:49 pm

[android-developers] Re: Null Pointer Exception

2009-08-30 Thread Roman ( T-Mobile USA)
My first guess is that your variable is not instantiated that's why you cannot call the method. but let's look at your code first -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in

[android-developers] Re: Null Pointer Exception

2009-08-30 Thread Dexter's Brain
Without looking at your code, it si practically impossible to suggest something to you... Dexter. On Aug 31, 9:51 am, Sasi Kumar wrote: > when i'm trying to call another class method. > It is showing null pointer exception. > > Plz give some suggestion to get back from this --~--~--

[android-developers] Re: Null pointer exception while using setOnClickListener

2009-04-21 Thread e-satis
I solved the problem building a custom view list adapter. I post the code here with some comments so it can help any body else : import android.content.Context; import android.database.Cursor; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import and

[android-developers] Re: Null pointer exception while using setOnClickListener

2009-04-07 Thread e-satis
Update : setContentView first and before all, checked :-) On 7 avr, 20:09, e-satis wrote: > Update : Reading other posts, I tried to trash the R.java file but it > was not the cause. > > On 7 avr, 19:48, e-satis wrote: > > > Hi, > > > My java code look like this : > > >         // right_arrow b

[android-developers] Re: Null pointer exception while using setOnClickListener

2009-04-07 Thread e-satis
Update : Reading other posts, I tried to trash the R.java file but it was not the cause. On 7 avr, 19:48, e-satis wrote: > Hi, > > My java code look like this : > >         // right_arrow button >         ImageButton arrow_button = (ImageButton)findViewById > (R.id.arrow); >         arrow_button

[android-developers] Re: Null pointer exception in MapActivity

2009-03-13 Thread Eric Chan
check the Manifest file Best Regards Eric Chan On Fri, Mar 13, 2009 at 3:48 PM, olko wrote: > > I am using a procedure described here: > > http://developer.android.com/guide/tutorials/views/hello-mapview.html > http://androidguys.com/?p=1413 > > http://groups.google.com/group/android-developer

[android-developers] Re: Null Pointer Exception

2008-06-23 Thread dolan kundu
Hi kenishant, When a java file will create , in that case, only one (1) time setContentView (R.layout.abcd) you can create. And another case is, there must be some what mismatch with the java file and the xml file. so in these cases, NullPointerException can come. Thanks, Dolan. On Sat, Jun 21,

[android-developers] Re: Null Pointer Exception

2008-06-21 Thread Nishant Suresh
Hey Mark, I'm posting the log here... DEBUG/ActivityThread(1228): Performing launch of ActivityRecord{400bb518 [EMAIL PROTECTED]/com.android.hello.HelloAndroid}} INFO/jdwp(1244): prepping for JDWP over ADB INFO/jdwp(1244): PID sent as '04dc' to ADB INFO/jdwp(1244): trying to receive file descript

[android-developers] Re: Null Pointer Exception

2008-06-21 Thread Zach Hobbs
Just a tip on NullPointerExceptions: if you are using eclipse in debug mode there is a pane for your Breakpoints. In this pane there is a button that looks like "J!" and it will let you add an exception to your breakpoint list. This will cause your app to pause whenever this exception is thr

[android-developers] Re: Null Pointer Exception

2008-06-21 Thread Mark Murphy
redhatab wrote: > Hi, > > Am a total beginner and I was trying out to extrapolate on the Hello > Android code, but I've sort of hit a road block with a null pointer > exception. The code is as below: > > public class HelloAndroid extends Activity > { > @Override > public void o

[android-developers] Re: Null pointer Exception while accessing Textfile

2008-05-19 Thread dolan kundu
Hi Analdin Judy, Check the java class file and xml file. some mis-match is there between these two. Cheers! Dolan. On Sat, May 10, 2008 at 3:21 PM, Analdin Judy <[EMAIL PROTECTED]> wrote: > > Hi, > > > >Can anybody please tell me the reason for "null pointer exception" while > reading a tex

[android-developers] Re: Null pointer Exception while accessing Textfile

2008-05-10 Thread Dan U.
Without knowing more about your code, I'd say activity is null. On May 10, 2:51 am, "Analdin Judy" <[EMAIL PROTECTED]> wrote: > Hi, > >Can anybody please tell me the reason for "null pointer exception" while > reading a textfile > I use the below code to read the textfile in raw. > >a

[android-developers] Re: Null Pointer Exception on simple People query

2008-05-07 Thread kingkung
I'm sorry, it's not that it returs a null pointer exception, it's that when I query the People database on my second activity, cursor.first() returns false!!! All of the people are still in the database (nothing's changed)... why would the query from my first activity return the list of People, a

[android-developers] Re: Null Pointer Exception on simple People query

2008-05-06 Thread Ahmet A. Akin
maybe you should write the stack trace. On Tue, May 6, 2008 at 9:29 PM, kingkung <[EMAIL PROTECTED]> wrote: > > Hey all, > > Not sure what I"m doing wrong... > > I have a dbHelper which makes a query for all of the rows in People. > > When I do this query in my first activity, initializing db

[android-developers] Re: Null pointer exception when finding views by Id

2008-03-31 Thread kaiping
Thanks for the help. I finally just trashed both the xml and class files and rewrote then. It works now, I think it had to do with the DatePicker. Thanks for the help. KaiPing On Mar 28, 8:07 pm, Peli <[EMAIL PROTECTED]> wrote: > Which is the line that causes the null-pointer exception? The c

[android-developers] Re: Null pointer exception when finding views by Id

2008-03-28 Thread Peli
Which is the line that causes the null-pointer exception? The code lines you posted surely don't as they just assign the values. How do you know that the values are 'null' in onCreate()? What is in EditTransaction.java:47 ? Peli On Mar 28, 12:38 pm, kaiping <[EMAIL PROTECTED]> wrote: > OK, Did t

[android-developers] Re: Null pointer exception when finding views by Id

2008-03-28 Thread kaiping
OK, Did that and it still has the same error On Mar 27, 11:43 pm, Peli <[EMAIL PROTECTED]> wrote: > Sometimes R.java is corrupted. It helps to clean everything either > from within Eclipse or manually (delete bin/ and R.java) and rebuild > from scratch. > > Peli > > On Mar 27, 2:44 pm,kaiping<[EM

[android-developers] Re: Null pointer exception when finding views by Id

2008-03-27 Thread Peli
Sometimes R.java is corrupted. It helps to clean everything either from within Eclipse or manually (delete bin/ and R.java) and rebuild from scratch. Peli On Mar 27, 2:44 pm, kaiping <[EMAIL PROTECTED]> wrote: > I am sure, Actually the R.id.account_name was a type I forgot to fix. > But, even th

[android-developers] Re: Null pointer exception when finding views by Id

2008-03-27 Thread kaiping
I am sure, Actually the R.id.account_name was a type I forgot to fix. But, even the once that are in there return null. On Mar 27, 12:16 am, "Dan U." <[EMAIL PROTECTED]> wrote: > Are you sure ALL the findViewById return null? This one does for sure: > mDescription = (EditText) findViewById(R.id.a

[android-developers] Re: Null pointer exception when finding views by Id

2008-03-26 Thread Dan U.
Are you sure ALL the findViewById return null? This one does for sure: mDescription = (EditText) findViewById(R.id.account_name); since there is no account_name id in your layout. On Mar 26, 6:19 am, kaiping <[EMAIL PROTECTED]> wrote: > Thanks for the idea. I have confirmed that the file is name

[android-developers] Re: Null pointer exception when finding views by Id

2008-03-26 Thread kaiping
Thanks for the idea. I have confirmed that the file is named transaction_edit.xml. On Mar 26, 3:54 am, "Dan U." <[EMAIL PROTECTED]> wrote: > Well, he needs to have the filename be transaction_edit.xml. Not sure > if it is. > > On Mar 25, 5:29 am, Rick Genter <[EMAIL PROTECTED]> wrote: > > > Don'

[android-developers] Re: Null pointer exception when finding views by Id

2008-03-25 Thread Dan U.
Well, he needs to have the filename be transaction_edit.xml. Not sure if it is. On Mar 25, 5:29 am, Rick Genter <[EMAIL PROTECTED]> wrote: > Don't you need to name your layout "transaction_edit" in the XML file? > > On Mar 25, 2008, at 5:26 AM, kaiping wrote: > > > > > > > Hi, For one of my Activ

[android-developers] Re: Null pointer exception when finding views by Id

2008-03-25 Thread Rick Genter
Don't you need to name your layout "transaction_edit" in the XML file? On Mar 25, 2008, at 5:26 AM, kaiping wrote: > > Hi, For one of my Activities All the findViewById() function returns > is null. I am really astonished by this behaviour because this same > function works fine in other parts o