>
> 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
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
Provide the logcat/error.
On Tue, Nov 29, 2011 at 3:18 PM, Ali Chousein ali.chous...@gmail.comwrote:
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.
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,
* 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
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
Thanks for the help TreKing and Gaurav!
On May 21, 12:14 am, gaurav gupta gaurav.gupta...@gmail.com 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);
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
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
functions ---
09-29
On Tue, Sep 28, 2010 at 3:41 PM, Gold thangadura...@gmail.com 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
Hi..
While clicking the button1 that is
redbtn.setOnClickListener(new
OnClickListener()
{
@Override
public void onClick(View v)
{
On Tue, Sep 28, 2010 at 3:49 PM, Gold thangadura...@gmail.com 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.
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 kmans...@gmail.com wrote:
Your code doesn't seem to assign any
On Tue, Sep 28, 2010 at 4:00 PM, Gold thangadura...@gmail.com 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?
On Tue, Sep 28, 2010 at 4:09 PM, Gold thangadura...@gmail.com 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
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 mmur...@commonsware.com wrote:
Albert wrote:
Hi,
Can someone see what I am doing wrong here, when I try to get
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 vladimir.funti...@gmail.com wrote:
What do you think about this:
1.
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){
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.
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
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
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
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 hyperje...@gmail.com wrote:
yes, Select.class is another one of my files. throughout my app there
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:
1This exception was called in all the programs in which i used arrays
2Just try
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
I would just step through it with the debugger (assuming you are using
Eclipse)
On Dec 30, 8:39 am, JasonMP hyperje...@gmail.com 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
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 hansen.matt...@gmail.com wrote:
I would just step through it with the debugger (assuming you are using
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
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
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
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
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,
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,
Without looking at your code, it si practically impossible to suggest
something to you...
Dexter.
On Aug 31, 9:51 am, Sasi Kumar sasikumar.it1...@gmail.com wrote:
when i'm trying to call another class method.
It is showing null pointer exception.
Plz give some suggestion to get back from
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
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
Update : setContentView first and before all, checked :-)
On 7 avr, 20:09, e-satis info.ksam...@googlemail.com 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 info.ksam...@googlemail.com wrote:
Hi,
My java code
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 info.ksam...@googlemail.com wrote:
Hi,
My java code look like this :
// right_arrow button
ImageButton arrow_button = (ImageButton)findViewById
(R.id.arrow);
check the Manifest file
Best Regards
Eric Chan
On Fri, Mar 13, 2009 at 3:48 PM, olko y.olkho...@gmail.com wrote:
I am using a procedure described here:
http://developer.android.com/guide/tutorials/views/hello-mapview.html
http://androidguys.com/?p=1413
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,
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
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
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.
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,
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 Im 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 dbHelper
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
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)
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 the
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't you need
49 matches
Mail list logo