UI in service module

melamoud

Active Member
Licensed User
Longtime User
HI,

I need to have UI component inside a service module , I'm using reflection to make it visible, but I can not keep UI objects in the service global process sub.

I need to make the UI visible without starting the activity (so it wont pause other activities right ?)

how can I do that ?

I cant call an activity sub without resuming it right ?

thanks
 

mc73

Well-Known Member
Licensed User
Longtime User
Why you want to avoid a paused activity? And if so, why not activating a sub in the running activity, containing a panel with the views you want to pop-up by your service?
 
Upvote 0

melamoud

Active Member
Licensed User
Longtime User
thanks for the quick reply,
I want to have a popup ontop of all other apps (using system dialog for that using reflection) I donot want the current app to be paused.

not sure I u nderdstand how to do what you suggected without activiating the activity , can you explain ?
thanks
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
My suggestion was about bringing up your very own activity, I hadn't realized that you wished to interfere with third-party apps in the foreground. I doubt you can have any view showing up without pausing the foreground app. Noticed that in newer os versions, there are multiple activities running at the same time, so in this case there is the possibility to do something like that. Now, quite honestly, I wouldn't like my app interrupted by modal dialogs of another apps, apart from 'normal' toastMessages. After all, isn't that why notifications are there at the top of our screen? Thought I'd let you know ;)
 
Upvote 0

melamoud

Active Member
Licensed User
Longtime User
the popup (my app) is triggered by the user so I think he will be ok for it to pop up on top of otehr apps, he asked for it (HW buttons)

what OS versions this is allowed, and how do I make this happen ?
thanks
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
If the end-user is happy with pop-ups, why not showing up your very own activity, perhaps with a transparent panel, so that the app behind continues to be shown? Of course this would still mean it would be paused, but its actually that app's developer's job to resume it properly when it gets focus again. I think you should search for transparent activities, I think i've seen some posts in this forum about how to create such. The OS versions I'm referring to, well, I think I've seen them in Samsung's new note, but I'm pretty sure all manufacturers will soon follow.
 
Upvote 0

melamoud

Active Member
Licensed User
Longtime User
thanks, up until now this is how I did this, but some apps (games for example) when get paused like this start from scratch - very bad programming behavior !!! but I have to respect that. trying to figure out a way around it.

nir
 
Upvote 0
Top