Show background applications dialog in front of current application

by denzel » Mon, 09 Mar 2009 23:32:14 GMT


Sponsored Links
 Hi,

I have an app that is running in the background doing some things.
Sometimes this apps needs  user input and therefore it shows a dialog.
While the app is running, I use some other app like the browser. Is it
possible to sort of interrupt the browser app (or another app that I'm
using at that moment) so that the dialog that my app wants show,
appears in front of the browser?

Here's the piece of code that I'm using right now to show the dialog:

Dialog userprompt = new Dialog(activity);
userprompt.setTitle("Prompt User");
userprompt.setContentView(R.layout.prompt);
userprompt.show();

Thanks in advance!

Kind regards,

Denzel
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Android SDK fails to run Android 2.0

I have downloaded the Android SDK and installed all the components.
However, for some reason I can only launch Virtual Devices targeting
Android 1.5. Any Virtual Device targeting Android 1.6/2.0 would only
cause the emulator to show up for a fraction of a second and then
terminated without any error messages.

This is a strange problem which I cannot find any reason why, doesn't
anyone know how to fix it? Thanks a lot in advance.

-- 

2. Android listview with pre selected checkboxes

You can create your own ListAdapter and then override the getViews
method to setup the checkboxes similar to this:

/* (non-Javadoc)
         * @see android.widget.Adapter#getView(int, android.view.View,
android.view.ViewGroup)
         */
        public View getView(int position, View convertView, ViewGroup parent)
{
                Setup setup = (Setup)this.getItem(position);
                if (convertView == null)
            convertView = inflater.inflate(R.layout.setup_mgt_row,
null);

                TextView textView = (TextView) convertView.findViewById
(R.id.setup_mgt_name);
                textView.setText(setup.getName());

                ImageView selectedView = (ImageView) convertView.findViewById
(R.id.setup_mgt_selected);
                selectedView.setTag(position);
                if(setup.isSelected())
                        selectedView.setImageState(new int[]
{ android.R.attr.state_checked }, true);
                else
                        selectedView.setImageState(new int[]
{ android.R.attr.state_empty }, true);
        selectedView.setOnClickListener(this);

                ImageView deleteView = (ImageView)convertView.findViewById
(R.id.setup_mgt_delete);
                deleteView.setTag(position);
                deleteView.setOnClickListener(this);

        return convertView;
        }

Jeff
http://www.trackaroo.com




-- 

3. setBuiltInZoomControls - android tutorial

4. Load Imageview from Internet in Background

5. FLV - VP6 integration

6. View objects lose onclick listeners when screen orientation changes

7. ada yg bisa bantu g ya??