Bundle-Extra is always null??

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

Bundle-Extra is always null??

Postby nk » Tue Mar 25, 2008 9:11 pm

Hi :)

I have another problem which i cant solve since some hours.

I want to give some data to a new intent - but its always null and i cant figure
out why.

I put the Strings via:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. Intent i = new Intent(this, DetailImageView.class);
  2.  
  3.                          i.putExtra("ImageID", ImageID);
  4.  
  5.                          i.putExtra("iD", iD);
  6.  
  7.                          startActivity(i);
Parsed in 0.030 seconds, using GeSHi 1.0.8.4



and get the Strings by:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.         iD = extras.getString("iD");
  2.  
  3.                 ImageID = extras.getString("ImageID");
Parsed in 0.030 seconds, using GeSHi 1.0.8.4



Everything like i did it maybe ten times in my application - but this time the
strings are always null. Can anybody give me a hint where i can search
for the reason of this problem??

Im stuck.

Thanks a lot!
nk
Junior Developer
Junior Developer
 
Posts: 21
Joined: Tue Jan 29, 2008 3:23 pm

Top

Postby plusminus » Tue Mar 25, 2008 10:19 pm

Hello nk,

maybe your bug is related to the one I submitted once.

:arrow: http://code.google.com/p/android/issues/detail?id=252

It was fixed and the fix will ship with the next release of the SDK.

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby nk » Wed Mar 26, 2008 3:09 pm

Hey plusminus,

thanks! It seems like its the same error. What did you do for a workaround?
I just want to show a picture in fullscreen and the data in the bundle is
the id of the picture.

I wonder why it appears at this intent - ive done nothing special.

I have other, strange errors which i believe are also from the sdk because
they act different depending on what theme you apply. Like a list of checkboxes
where you have to press down as many times as there are checkboxes in the list
until the cursor starts moving etc.

Do you have similar errors? What do you do because of these errors?
Do you explain it in your documentation for the ADC?


Ps: Great Book! Im just printing it :)
nk
Junior Developer
Junior Developer
 
Posts: 21
Joined: Tue Jan 29, 2008 3:23 pm

Postby nk » Thu Mar 27, 2008 4:35 pm

Fuck - this problem really bugs me. It appears in more and more activities
and i dont have a clue why it appears in some and why it doesnt in others.



Another strange thing:

When i try to log the data in the extras-bundle there is NO output, not even
the description like log.e("Description",extras.getString("xy"));


Does anybody have a clue how to fix this problem?
nk
Junior Developer
Junior Developer
 
Posts: 21
Joined: Tue Jan 29, 2008 3:23 pm

Top

Return to General

Who is online

Users browsing this forum: No registered users and 2 guests