Thank you both.

Now with the super.onResume(); it works but it does what Mark expected
only the last shows.

And since I want to make something like a Vumeter that the user don't
need to be pressing a button to be able to see the vumeter's level in
that specific moment I can't go for Option #1.

Since I'm new with Android I'll be find information about the rest of
the options and try them one by one.

Once again thank you!



On 5 ago, 01:04, Mark Murphy <[email protected]> wrote:
> Roman wrote:
> > You are missing in the onResume method
>
> > super.onResume();
>
> Not to mention the fact that, since the OP is doing all the TextView
> updates in a tight loop, only the last one will wind up having a visual
> impact.
>
> >>  What I really want to do is to get the sound level in the mic while
> >> the program is running, I have the code for that but I don't know how
> >> to make it check the sound level periodically.
>
> Option #1: Do it when the user tells you to do it, via a button push or
> something.
>
> Option #2: Think long and hard about going with option #1.
>
> Option #3: Use postDelayed() on some widget to set up a periodic task.
>
> Option #4: Honestly, particularly for tying up and listening on a
> microphone, I would think the users would want to control the timing of
> it, so option #1 really should be the answer.
>
> Option #5: Use TimerTask, as per regular Java.
>
> Option #6: Fork a thread that uses SystemClock.sleep() and a Handler.
>
> Option #7: Use AsyncTask, where you sleep() for a bit in
> doInBackground() and check the mic/schedule the next task in
> onPostExecute().
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android App Developer Training:http://commonsware.com/training.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to