Please don't send bitmaps like that.  When you start an intent, the bitmap
needs to be marshaled for delivery (one copy).  It is then delivered to the
system process which needs to hold the entire time for as long as the target
activity may be accessed by the user (another copy).  And then it needs to
be delivered back to the app as a another bundle (and another copy).

2010/8/23 Pedro Teixeira <[email protected]>

> Im not sure how to pass a drawable..
> so the issue was the bitmap i was trying to send      w.putParcelable(
> "bitmap", selectedDeviceImage);
> , now I have to find another way to send this lol
> it actually has a value so I'm not getting why the error.. but anyway..
> I'll try other ways to send a bitmap, or convert it to byte something like
> that.
>
> On Aug 23, 2010, at 4:45 PM, Filip Havlicek wrote:
>
> Hi Pedro,
>
> glad I could help. Dunno about the bitmap from imageview, Drawable isn't
> enough?
>
> Best regards,
> Filip Havlicek
>
> 2010/8/23 Pedro Teixeira <[email protected]>
>
>> I figured it was the bitmap that i was passing with parceable that was
>> giving this error.. now its going correctly to the activity I pretend
>> although I cant find a solution to send the bitmap. is there a way to
>> retrive a bitmap from an imageview?
>>
>> On Aug 23, 2010, at 2:32 PM, Kostya Vasilyev wrote:
>>
>> I noticed that your code for the upload case doesn't close the dialog,
>> like the code for the picking case does. Perhaps you could try that.
>>
>> Also, try getting the context using Java notation for the enclosing
>> activity class (blah.this), although I think it's the same as v.getContext.
>>
>> What might be happening is your code crashing and Android restarting
>> next-to-last known activity.
>>
>> You could also use an activity in place of a dialog, using
>> startActivityForResult.
>>
>> --
>> Kostya Vasilyev -- http://kmansoft.wordpress.com
>>
>> 23.08.2010 15:25 пользователь "Pedro Teixeira" <[email protected]>
>> написал:
>>
>> I'm sorry, I wasn't explicit, that's true. The intent is inside a dialog
>> box which has just a simple feedback message for the user. And it's supposed
>> to change activity when pressed ok, here is all the code to be more
>> specific:
>>
>>  add.setOnClickListener(new View.OnClickListener() {
>>  @Override
>>  public void onClick(final View v) {
>>  if (selectedDeviceImage!=null){
>>  doFileUpload();
>>  // Go to camera mode
>>          builder = new AlertDialog.Builder(addPic.this);
>>  builder.setCancelable(false)
>>        .setPositiveButton("Ok", new DialogInterface.OnClickListener() {
>>         public void onClick(DialogInterface dialog, int id) {
>>
>>
>>        Intent addIntent = new Intent(v.getContext(), thenNnowMode.class);
>>         Bundle w = new Bu...
>>
>>
>> addIntent.putExtras(w);     startActivity(addIntent);
>> finish();
>> }
>> });
>>  AlertDialog alert = builder.create();
>>  alert.setTitle("Picture added!");
>>  alert.setIcon(R.drawable.icon_yep);
>>  alert.show();
>> }else{
>>  builder = new AlertDialog.Builder(addPic.this);
>>  builder.setCancelable(false)
>>  .setPositiveButton("Ok", new DialogInterface.OnClickListener() {
>>  public void onClick(DialogInterface dialog, int id) {
>>  dialog.cancel();
>>  }
>> });
>>  AlertDialog alert = builder.create();
>>  alert.setTitle("Please, pick a picture!");
>>  alert.setIcon(R.drawable.icon_not);
>>  alert.show();
>> }}
>> });
>>
>>
>>
>> On Aug 23, 2010, at 11:57 AM, Filip Havlicek wrote:
>>
>> > Hi Pedro,
>> >
>> > although I don't know what v ...
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" g...
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>  Pedro Teixeira
>>
>> www.pedroteixeira.org
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]<android-developers%[email protected]>
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
>
> Pedro Teixeira
>
> www.pedroteixeira.org
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to