[android-developers] Re: How to use built in email application to send email from my application?

2009-01-03 Thread Noam Wolf

Is there a way to actually send the email without having the user
choose an email client and hitting send? (without using a network
connection and having a server do it on the back end)

On Jan 3, 7:11 pm, Abraham Lincoln mehtabhave...@gmail.com wrote:
 This doesn't seem to work for regular text file. I have tried giving
 mime types of */*, text/plain etc.

 Anyone knows how to attach text files using Gmail? Doesn't even work
 from Gmail app.

 On Dec 12 2008, 12:08 pm, Peli peli0...@googlemail.com wrote:

   I'd love to see that one extra line in your example that shows how to
   add an image fileattachmentwith the image file stored on the SD
   card. :-)

  Oh, sorry, you said image.

  sendIntent.setType(image/png);
  sendIntent.putExtra(Intent.EXTRA_STREAM, file:///sdcard/
  mygirlfriend.png);

  I'm sure the next question is how to have both, subject andattachment, but 
  I'll leave this as an exercise to the reader :-)

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



[android-developers] Re: Strange behavior with AlarmManager.RTC_WAKEUP and PowerManager.WakeLock

2008-12-05 Thread Noam Wolf

I was setting my AlarmManager in the wrong place, namely an onXxx
event.  What i did was set the AlarmManager on a user action (like
save or whatever) and that solved my problem.

Check it out Applications  Tools  ClockApps



On Dec 5, 2:56 am, Jon Colverson [EMAIL PROTECTED] wrote:
 On Dec 5, 6:41 am, Jon Colverson [EMAIL PROTECTED] wrote:

  I'd been having some weird issues with AlarmManager seemingly not
  firing my alarms when the device is asleep. I'm using the alarm to
  start a service and I was acquiring my wake lock in onStart(). I tried
  acquiring the lock in onCreate() instead, and that seems to have
  solved the problem.

 Oops. I spoke too soon. After some more testing that doesn't seem to
 have helped.

 --
 Jon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---



[android-developers] Re: OutOfMemoryError when switching orientation

2008-12-02 Thread Noam Wolf

Ok I figured this out with the help of the great DS.

Basically the image was too large and the phone was chocking on it.
So instead i'm using the BitmapFactory to get a smaller size of the
image, no more outOfMemory errors!

On Dec 1, 8:50 pm, Noam  Wolf [EMAIL PROTECTED] wrote:
 Here is what I commented out and didn't see the OutOfMemory error
 again:

 Cursor cursor = getCursor();
 ImageView displayImage = (ImageView) findViewById(R.id.belongsImage);
     try {
       if (cursor.moveToFirst()) {
 Line 1: String imageUri = cursor.getString(0);
 Line 2: displayImage.setImageURI(Uri.parse(imageUri));
       }
    } catch 

 When I comment out Line 2 i don't get the error again.  Of course this
 is bad for my application but I just wanted to point out that it isn't
 a memory leak by something in the application other than the
 displayImage... or at least it seems that way... any ideas?

 On Dec 1, 11:29 am, Noam  Wolf [EMAIL PROTECTED] wrote:

  I'm not explicitly passing context around at all but I am using a
  ContentProvider which calls getContext()... is that something I should
  be handling too?

  On Dec 1, 1:23 am, Romain Guy [EMAIL PROTECTED] wrote:

Always delete references to Context or
anything that you passed the context to on clean-up.  It's a huge one.

   Just to emphasize this: leaking a Context means you will leak *all*
   the views and *all* the resources attached to these views (bitmaps,
   text, etc.)

   --
   Romain Guywww.curious-creature.org


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---



[android-developers] Re: Strange behavior with AlarmManager.RTC_WAKEUP and PowerManager.WakeLock

2008-12-02 Thread Noam Wolf

ping... anyone?

On Nov 29, 12:15 pm, Noam  Wolf [EMAIL PROTECTED] wrote:
 I have a BroadcastReceiver which acquires a lock onReceive.  I use an
 alarm manager with AlarmManager.RTC_WAKEUP set to broadcast my
 intent.  I have found that when the phone is locked (and asleep) it
 will not wake up sometimes, and when it does many times it will have a
 delay (up to 30 seconds from when the alarm manager was supposed to go
 off).

 I don't understand how/what I'm doing different than the AlarmClock
 application since I'm acquiring the lock in the receiver.  I've also
 seen the screen turn on but then immediately turn off

 Does anyone have any ideas as to why this is happening?  Or has anyone
 run into this?  Is RTC_WAKEUP stable and trustworthy?

 Any help would be greatly appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---



[android-developers] Re: OutOfMemoryError when switching orientation

2008-12-01 Thread Noam Wolf

I'm not explicitly passing context around at all but I am using a
ContentProvider which calls getContext()... is that something I should
be handling too?

On Dec 1, 1:23 am, Romain Guy [EMAIL PROTECTED] wrote:
  Always delete references to Context or
  anything that you passed the context to on clean-up.  It's a huge one.

 Just to emphasize this: leaking a Context means you will leak *all*
 the views and *all* the resources attached to these views (bitmaps,
 text, etc.)

 --
 Romain Guywww.curious-creature.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---



[android-developers] Re: OutOfMemoryError when switching orientation

2008-12-01 Thread Noam Wolf

Here is what I commented out and didn't see the OutOfMemory error
again:

Cursor cursor = getCursor();
ImageView displayImage = (ImageView) findViewById(R.id.belongsImage);
try {
  if (cursor.moveToFirst()) {
Line 1: String imageUri = cursor.getString(0);
Line 2: displayImage.setImageURI(Uri.parse(imageUri));
  }
   } catch 

When I comment out Line 2 i don't get the error again.  Of course this
is bad for my application but I just wanted to point out that it isn't
a memory leak by something in the application other than the
displayImage... or at least it seems that way... any ideas?

On Dec 1, 11:29 am, Noam  Wolf [EMAIL PROTECTED] wrote:
 I'm not explicitly passing context around at all but I am using a
 ContentProvider which calls getContext()... is that something I should
 be handling too?

 On Dec 1, 1:23 am, Romain Guy [EMAIL PROTECTED] wrote:

   Always delete references to Context or
   anything that you passed the context to on clean-up.  It's a huge one.

  Just to emphasize this: leaking a Context means you will leak *all*
  the views and *all* the resources attached to these views (bitmaps,
  text, etc.)

  --
  Romain Guywww.curious-creature.org


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---



[android-developers] Re: AlarmManager not always waking device (using RTC_WAKEUP)

2008-11-30 Thread Noam Wolf

Thanks for your response Dianne.

This is the code I use to setup the alarmManager (from MyActivity):

  Intent intent = new Intent(MyActivity.this,
MyBroadCastReceiver.class);
  PendingIntent sender = PendingIntent.getBroadcast
(MyActivity.this, 0,
  intent, 0);

  AlarmManager alarmManager = (AlarmManager) getSystemService
(ALARM_SERVICE);
  alarmManager.set(AlarmManager.RTC_WAKEUP,
System.currentTimeMillis(), sender);

Should I be releasing the lock after I setup the AlarmManager? The
reason I ask is because right after this block of code I have some
code that tries to open a dialog window and when the MyActivity is not
running it bombs so I was wondering if it makes sense to release the
lock here rather than in the receiver itself.

I hope my question is clear... thanks!



On Nov 30, 12:15 am, Dianne Hackborn [EMAIL PROTECTED] wrote:
 You need to hold a wake lock the entire time you want to be running, from
 when onReceiveIntent() is called until you have done all of your work.



 On Tue, Nov 18, 2008 at 9:56 PM, Adam K [EMAIL PROTECTED] wrote:
  Thanks Dianne.

  Should I be holding a wakelock in the pendingintent receiver of the
  alarm (basically acquiring at the start of the onReceive() and
  releasing at the end)?  All I am doing in the receiver is setting off
  a notification - I am not creating any other intents or accessing any
  other threads or services.

  Cheers,

  Adam

  On Tue, Nov 18, 2008 at 9:22 PM, Dianne Hackbod [EMAIL PROTECTED]wrote:

  Fwiw, I am not aware of any issues with the alarm itself not waking up the
  phone.  Typically bugs in this area are a result of applications not 
  holding
  wake locks the entire time needed.

  Note that the behavior when not holding a wake lock can change
  significantly between devices, depending on things like how often sync is
  running.

  On Tue, Nov 18, 2008 at 6:15 PM, Adam K [EMAIL PROTECTED]wrote:

  Ping.  Anyone?  It seems for certain people the alarm can never wake
  up the phone.  For others (like myself) it pretty much always wakes up
  the phone.

  Thanks,

  Adam

  On Nov 16, 8:15 pm, Adam K [EMAIL PROTECTED] wrote:
   Hi all,

   I noticed that AlarmManager does not always seem to wake the device
   correctly when using types RTC_WAKEUP or ELAPSED_REALTIME_WAKEUP.  It
   seems like whatever intent was pending is triggered later after the
   Menu key is hit.

   I realize you need to hold a wakelock for any activity fired after the
   initial pending intent event - but I thought at least the pending
   intent should execute without a wakelock being required?  All I want
   to do is set off a Notification when the alarm is complete - nothing
   else.

   It does seem to work 90% of the time without an issue, just not 100%
   of the time.  Has anyone else noticed this?

   Here is a summarized version of what I'm doing:

   //in main activity, set alarm for some time in future
   myPendingIntent = PendingIntent.getBroadcast(myContext, 0, new
   Intent(myContext, MyReceiver.class), 0);
   myAM = (AlarmManager) getSystemService(ALARM_SERVICE);
   myAM.set(AlarmManager.RTC_WAKEUP, getTriggerTime(), myPendingIntent);

   //in MyReceiver.class, onReceiver(), trigger notification
   NotificationManager myNM = (NotificationManager)
   context.getSystemService(Context.NOTIFICATION_SERVICE);
   Notification notif = new Notification();
   ..setup notification to play alarm, vibrate etc.
   myNM.notify(MYNOTIFICATION_ID, notif);

   Thanks,

   Adam

  --
  Dianne Hackborn
  [EMAIL PROTECTED]

 --
 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.  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 android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---



[android-developers] Re: AppMarket: does changing title/description of an app wipe out ratings and reviews?

2008-11-30 Thread Noam Wolf

I don't see this any longer even though I still see the alert when I
do update.

On Nov 4, 12:45 pm, atrus123 [EMAIL PROTECTED] wrote:
 IIRC, you can change the title/desc without it wiping out ratings,
 etc.

 I hope Google fixes this soon.  I try and do frequent updates for my
 users, and I hateseeingall their ratings/commentsgo away every time
 I add a feature.

 On Nov 3, 4:24 pm, zl25drexel [EMAIL PROTECTED] wrote:

  Hi all

  I know putting a new version upgrade will clear out ratings and
 reviews. Does anyone knows if changing title/description of an app
  will wipe out ratings andreviews?

  Thanks,


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---



[android-developers] Re: OutOfMemoryError when switching orientation

2008-11-30 Thread Noam Wolf

I'm seeing the exact same error only I'm not even storing an image.

I have an ImageView that loads an image from the users picture gallery
on the phone, once the image is loaded using setImageUri() when I
change orientation I get the exact same error songs described.

I don't understand what's hogging the memory since the image is
already on the device, it's not being copied...

Is there something I should do to the ImageView to clear out it's
bitmap or something?

confused

On Oct 13, 5:40 pm, songs [EMAIL PROTECTED] wrote:
 I think we might be talking about a couple of different things.  I've
 got a handle on the leak.  What I'm saying is that there seem to be
 side-effects that change the assumptions of how the think about the
 lifecycle.  From the perspective of the lifecycle and side-effects, I
 would have expected hitting the curved back arrow and then starting
 the app to have had the same effect as changing the orientation
 (except that the former would have had no saved state passed in and
 the latter would).  This isn't the case.  One has side-effects that
 the other doesn't so they behave differently.

 What about the lag?  Even with cleaning up the thread, since it takes
 a couple of seconds for the system to actually reclaim the memory, a
 zealous user can still cause an OutOfMemoryError.

 On Oct 13, 3:05 pm, hackbod [EMAIL PROTECTED] wrote:

  You need to make sure you have cleaned up everything by the time you
  return from onDestroy().  If you do that, there will not be a leak.

  On Oct 13, 1:46 pm, songs [EMAIL PROTECTED] wrote:

   This is a little confusing then, though.  The animation thread dies as
   expected when I stop the application using the back arrow, but does
   not die (without being explicitly killed) when I flip the
   orientation.  So some extra cleaning up must be happening for one that
   isn't happening for the other.

   Also, any ideas on the lag?

   On Oct 12, 11:00 am, hackbod [EMAIL PROTECTED] wrote:

onCreate -is- called when the activity is starting fresh.  When an
orientation switch happens, the old activity is removed through
onPause()-onStop()-onDestroy(), and a new instance created in the
new orientation.

On Oct 11, 10:15 pm, songs [EMAIL PROTECTED] wrote:

 Tracked the leak down to my animation thread which was getting
 recreated on every onCreate.  From the lifecycle docs, I had thought
 that onCreate only got called when the activity was starting fresh and
 any old instances had died (and killed everything associated with
 it).  Since this apparently isn't always the case, I'm now managing
 this thread more actively.

 This mostly solved the issue except for two things - I can still get
 the memory issue to happen (I just have to try harder), and after
 changing the orientation it takes about 2-3 seconds before the app
 will respond to touch events.  From watching the heap using DDMS,
 there's a good a couple of seconds between the thread dying and its
 resources getting cleaned up.  Because of this lag, if I quickly
 switch back and forth between orientations I can get the memory error
 to happen.

 These remaining issues are kind of on outside of expected behavior so
 I'm not too worried about things now, but there's gotta be something
 I'm missing that would help button this up a little tighter.

 - Steve

 On Oct 10, 1:53 am, songs [EMAIL PROTECTED] wrote:

  Interesting.  Thanks for the lead.  I'll look into this an report 
  back
  either way.

  On Oct 10, 1:48 am, Romain Guy [EMAIL PROTECTED] wrote:

   Then you should check carefully where exactly you pass your 
   Activity
   (or Context) to other classes/APIs, etc. The Context is used by 
   many
   different classes in the Android framework and if you somehow 
   leak
   the Context, you leak all the views, images, etc. Your issue is 
   very
   similar to several issues we fixed over the past few months: on 
   each
   rotation the Context leaks and everything leaks with it. You can 
   use
   DDMS to check how the heap is growing after each rotation, it 
   should
   tell you whether this is the problem or not.

   On Fri, Oct 10, 2008 at 1:44 AM, songs [EMAIL PROTECTED] wrote:

Nope, the only static variables I have are constants.  I do 
keep an
array of Drawable in the view, but that's an instance variable.

On Oct 10, 1:14 am, Romain Guy [EMAIL PROTECTED] wrote:
Looks like you're leaking memory somewhere. Do you keep a 
static cache
somewhere in your app?

On Thu, Oct 9, 2008 at 10:02 PM, songs [EMAIL PROTECTED] 
wrote:

 Hi,

 I think that either I've stumbled onto a bug or I'm missing 
 something
 on how to manage my resources.  I have an activity with a 
 Java based
 view that contains 

[android-developers] Strange behavior with AlarmManager.RTC_WAKEUP and PowerManager.WakeLock

2008-11-29 Thread Noam Wolf

I have a BroadcastReceiver which acquires a lock onReceive.  I use an
alarm manager with AlarmManager.RTC_WAKEUP set to broadcast my
intent.  I have found that when the phone is locked (and asleep) it
will not wake up sometimes, and when it does many times it will have a
delay (up to 30 seconds from when the alarm manager was supposed to go
off).

I don't understand how/what I'm doing different than the AlarmClock
application since I'm acquiring the lock in the receiver.  I've also
seen the screen turn on but then immediately turn off

Does anyone have any ideas as to why this is happening?  Or has anyone
run into this?  Is RTC_WAKEUP stable and trustworthy?

Any help would be greatly appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---



[android-developers] Re: AlarmManager not always waking device (using RTC_WAKEUP)

2008-11-29 Thread Noam Wolf

Hi Adam,

Have you figured this out?  I'm seeing something similar.  Basically I
acquired the lock at the start of the onReceive() in my receiver and
release it when it's done doing it's work.  I still dont' see the
phone waking up correctly...

On Nov 19, 12:56 am, Adam K [EMAIL PROTECTED] wrote:
 Thanks Dianne.

 Should I be holding a wakelock in the pendingintent receiver of the
 alarm (basically acquiring at the start of the onReceive() and
 releasing at the end)?  All I am doing in the receiver is setting off
 a notification - I am not creating any other intents or accessing any
 other threads or services.

 Cheers,

 Adam

 On Tue, Nov 18, 2008 at 9:22 PM, Dianne Hackbod [EMAIL PROTECTED] wrote:
  Fwiw, I am not aware of any issues with the alarm itself not waking up the
  phone.  Typically bugs in this area are a result of applications not holding
  wake locks the entire time needed.

  Note that the behavior when not holding a wake lock can change
  significantly between devices, depending on things like how often sync is
  running.

  On Tue, Nov 18, 2008 at 6:15 PM, Adam K [EMAIL PROTECTED]wrote:

  Ping.  Anyone?  It seems for certain people the alarm can never wake
  up the phone.  For others (like myself) it pretty much always wakes up
  the phone.

  Thanks,

  Adam

  On Nov 16, 8:15 pm, Adam K [EMAIL PROTECTED] wrote:
   Hi all,

   I noticed that AlarmManager does not always seem to wake the device
   correctly when using types RTC_WAKEUP or ELAPSED_REALTIME_WAKEUP.  It
   seems like whatever intent was pending is triggered later after the
   Menu key is hit.

   I realize you need to hold a wakelock for any activity fired after the
   initial pending intent event - but I thought at least the pending
   intent should execute without a wakelock being required?  All I want
   to do is set off a Notification when the alarm is complete - nothing
   else.

   It does seem to work 90% of the time without an issue, just not 100%
   of the time.  Has anyone else noticed this?

   Here is a summarized version of what I'm doing:

   //in main activity, set alarm for some time in future
   myPendingIntent = PendingIntent.getBroadcast(myContext, 0, new
   Intent(myContext, MyReceiver.class), 0);
   myAM = (AlarmManager) getSystemService(ALARM_SERVICE);
   myAM.set(AlarmManager.RTC_WAKEUP, getTriggerTime(), myPendingIntent);

   //in MyReceiver.class, onReceiver(), trigger notification
   NotificationManager myNM = (NotificationManager)
   context.getSystemService(Context.NOTIFICATION_SERVICE);
   Notification notif = new Notification();
   ..setup notification to play alarm, vibrate etc.
   myNM.notify(MYNOTIFICATION_ID, notif);

   Thanks,

   Adam

  --
  Dianne Hackborn
  [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---



[android-developers] Hiding view elements

2008-11-28 Thread Noam Wolf

I was wondering if there was an equivalent to css' display: none in
android.  My goal is to have a fluid UI that if certain elements are
hidden from it all other elements shift into the void.

Any way to achieve this?  view.setVisibility is holding the width and
height of the invisible element, which is exactly what I want to
avoid.

Thanks.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---



[android-developers] Re: WindowManager$BadTokenException: Unable to add window -- token null is not for an application

2008-11-28 Thread Noam Wolf

Is this something new?  I wasn't seeing this behavior before
yesterday's update.  Any idea on how to get around it?

On Nov 26, 12:33 pm, Ash [EMAIL PROTECTED] wrote:
 Hello super smart people, I've got a strangle little bug to test you.

 I have an application that tries to display an RTSP video in a view
 (Content View - ScrollView - AbsoluteLayout - VideoView). However,
 in the emulator the MediaPlayer throws dispatches an error message
 which tries to display an Alert which throws the WindowManager
 exception. On device I hear the sound but do not see the the video
 then I get the exception when the MediaController is shown. WTF is
 going on? If I create a tiny Activity this works fine but once I get
 into a real application it all goes to hell. Is this Dalvik and the
 Android SDK showing it's immaturity?

 Ash

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---



[android-developers] Re: Hiding view elements

2008-11-28 Thread Noam Wolf

PERFECTION.  Thank you!

On Nov 28, 11:41 am, Mark Murphy [EMAIL PROTECTED] wrote:
 Noam Wolfwrote:
  I was wondering if there was an equivalent to css' display: none in
  android.  My goal is to have a fluid UI that if certain elements are
  hidden from it all other elements shift into the void.

  Any way to achieve this?  view.setVisibility is holding the width and
  height of the invisible element, which is exactly what I want to
  avoid.

 Try setVisibility(View.GONE)

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.4 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---



[android-developers] Re: WindowManager$BadTokenException: Unable to add window -- token null is not for an application

2008-11-28 Thread Noam Wolf

I think it existed before the update too.  The way I get around it is
kind of stupid, right now i'm wrapping the call to show with a try/
catch.  That way when the activity is running/alive it will work,
otherwise it will die quietly.

On Nov 27, 3:09 pm, Noam  Wolf [EMAIL PROTECTED] wrote:
 Is this something new?  I wasn't seeing this behavior before
 yesterday's update.  Any idea on how to get around it?

 On Nov 26, 12:33 pm, Ash [EMAIL PROTECTED] wrote:

  Hello super smart people, I've got a strangle little bug to test you.

  I have an application that tries to display an RTSP video in a view
  (Content View - ScrollView - AbsoluteLayout - VideoView). However,
  in the emulator the MediaPlayer throws dispatches an error message
  which tries to display an Alert which throws the WindowManager
  exception. On device I hear the sound but do not see the the video
  then I get the exception when the MediaController is shown. WTF is
  going on? If I create a tiny Activity this works fine but once I get
  into a real application it all goes to hell. Is this Dalvik and the
  Android SDK showing it's immaturity?

  Ash
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---