Show info in front of system activity. Toast or ...?

Put your problem here if it does not fit any of the other categories.

Show info in front of system activity. Toast or ...?

Postby Dave09 » Tue Dec 15, 2009 8:32 pm


* Update further down.

I have a problem... I am trying to show extra information on the screen during phone conversations, which can be updated in (close to) real-time.

Currently, this information is shown with a Toast showing every 2 seconds with LENGTH_SHORT duration.
This keeps the information on the screen and updated (every 2 seconds), and it does not block user input to the call/conversation screen.

However... The toast duration is user-definable. I think this means that I can't just assume 2 seconds delay will be optimal. If that is true, I don't know what the user could have set this duration to. It may be too long, and the information on the screen would get outdated. :(

If I can specify a custom duration for the toast myself in my app (without changing any of the user's settings), I would love to learn how!

I don't want to block user input to the screen where you can answer/reject the call (but it would be nice if the user could interact with this extra information as well (for example have a button they can click on).

If a new activity is started (delayed, so that it appears at the top of the activity stack), this will not allow user input at all to the activity behind the currently active one (as far as I know).
Not what I want, and it is not very elegant either, as it is probably possible for the call/conversation screen to be delayed (making my activity appear first and then the call/conversation screen at the top of the activity stack).

I am really hoping for a good way to solve this problem, since I would never be satisfied with situation where things will hopefully or most likely work.

I hope I explained it well enough. Please let me know if I didn't, or if you need to know more! :)

Thanks so much in advance! :D

By the way, I am sorry if I don't use the right technical terms for things. I am pretty new to Android. :roll:
Also, I am sorry for asking a question very similar to one I asked before, but I am hoping to learn a better, more elegant way than the ones I have tried.

Thanks again!

I would also love to know who called (before and after picking up the call, instead of after the call ended) when I have more than one incoming call. I tried to read the call log but nothing is added to the log until after the call has ended.

I feel like I can't even make my first real Android application without feeling restricted. Android is not completely new as it has been around for some years. I'm waiting for the right phone with Android to be released, but if this is really a limitation, I am kind of losing a bit of motivation. Hehe. :)

What I think I have learned so far (but I hope I am wrong):

Can you know who's calling if you receive 3 calls at the same time? No.
How about check in the call log? No.
Can you allow user input to the activity behind the currently active one where the background is transparent? No?
Okay, then can you at least reliably show a toast, with an interval specified by the application, to keep it on the screen without blocking input? No.
Oh my. How about just replacing the whole in-call screen? :lol: ... Sorry, no. :D

Sorry for letting out some of my frustration but I have had quite a few "this is stupid"-moments lately. :roll:

Maybe a good idea to ask on the Android Developers group.
Posts: 4
Joined: Wed Aug 19, 2009 10:08 pm


Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 8 guests