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

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

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

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. --

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?

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

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