What's best way to resume activity and play audio file after spawned thread completes download?

by Philip » Fri, 15 Jan 2010 07:10:48 GMT


Sponsored Links
 Why don't you simply use thread join wait and notify? Curious...




> solve this would be very much appreciated.



Other Threads

1. Doubt

how do i show a blueprint of a parking lot which has got empty as well as
occupied places.How do we show whther tht parking spot is occupied or no?And
when the driver gets the info abt a vacant parking spot he selects and when
he selects the route from the driver to tht location has to get highlighted
.how do we do tht?
-- 
Kruti Kumar Shah
Graduate Student
MS CS
Georgia Institute of Technology
+1-(201)-668-0249

--~--~---------~--~----~------------~-------~--~----~

2. OOM error caught bei DefaultException handler ... but there is plenty of memory

Hi,

  I very often get bug reports about out-of-memory errors.

  Those errors are caught bei the default exception handler where I then ask
how much memory is left (see below). Very often, like in the case from
below, there is plenty of memory left though.

  I am wondering why this is?
Of course, it might be that the bitmap (bitmap size exceeds VM budget) is
actually megabytes and megabytes, but as these are resources that are small
(and used by all the other users that don't get ooms) I would say that's not
the case.
Maybe the memory has been freed between the error and the measurement. That
would be unfortunate. Any better wetter to measure the current memory
consumption?

  Or am I missing something and there is a completely different explanation?
That would be wonderful and maybe give me a completely new attack vector
against those bugs.

  FWIW. I embed WebView and it is one of my top candidates for huge memory
consumption. Maybe there is something I can measure?

Cheers,
Mariano

-- Time: Sat Oct 03 11:19:00 GMT+01:00 2009
-- Android Version: sdk=3, release=1.5, inc=150879
-- Memory free: 12.27MB total: 15.44MB max: 16.00MB
-- NewsRob Version: 3.1.0/310
-- Stacktrace:(3390)
android.view.InflateException: Binary XML file line #29: Error inflating
class java.lang.reflect.Constructor
at android.view.LayoutInflater.

createView(LayoutInflater.java:512)
at
com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at
android.widget.ResourceCursorAdapter.newView(ResourceCursorAdapter.java:79)
at android.widget.SimpleCursorAdapter.newView(SimpleCursorAdapter.java:93)
at android.widget.CursorAdapter.getView(CursorAdapter.java:182)
at android.widget.AbsListView.obtainView(AbsListView.java:1269)
at android.widget.ListView.makeAndAddView(ListView.java:1623)
at android.widget.ListView.fillDown(ListView.java:607)
at android.widget.ListView.fillSpecific(ListView.java:1194)
at android.widget.ListView.layoutChildren(ListView.java:1459)
at android.widget.AbsListView.onLayout(AbsListView.java:1113)
at android.view.View.layout(View.java:6133)
at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
at android.view.View.layout(View.java:6133)
at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
at android.view.View.layout(View.java:6133)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:998)
at android.widget.LinearLayout.onLayout(LinearLayout.java:918)
at android.view.View.layout(View.java:6133)
at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
at android.view.View.layout(View.java:6133)
at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
at android.view.View.layout(View.java:6133)
at android.view.ViewRoot.performTraversals(ViewRoot.java:929)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1482)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3948)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at android.widget.TextView.<init>(TextView.java:308)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:499)
... 37 more
Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:363)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:212)
at
android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:663)
at android.content.res.Resources.loadDrawable(Resources.java:1637)
at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
at android.view.View.<init>(View.java:1725)
at android.widget.TextView.<init>(TextView.java:314)
... 41 more

--~--~---------~--~----~------------~-------~--~----~

3. Android and ARM926EJ-S

4. Keeping MediaController from timing out after a certain amount of time

5. i want to trace android kernel

6. Keeping MediaController from timing out after a certain amount of time

7. Should we still force our apps to API level 2?