Sorry all for bothering.
I didn't look well enough in this group, now I found the answer:
http://groups.google.com/group/android-developers/browse_thread/thread/8ac30e3b1870fb98/1cc71bab92a7ff97?lnk=gst&q=Starting+activity+without+layout#1cc71bab92a7ff97

:)

On 17 apr, 18:45, Dirk Vranckaert <dirkvrancka...@gmail.com> wrote:
> I recently (yesterday in fact :)) started creating widgets. So my
> first widget I want to create is something like:
> * A 2x2 widget
> * Containing 2 buttons
>     * Button 1: Register current time and location
>     * Button 2: Open up an activity where configuration can be
> modified, registered times and location can be viewed,...
>
> Now the problem for me is button 1. As I only try to do some
> registration data (so no further user input required after pressing
> the button) I would like to just show a loading bar and after wards
> Toast a message to screen, or a popup if anything goes wrong.
> This is what I do now:
> * In my widgetProvider
> Intent intent = new Intent(context, LogDataActivity.class);
> PendingIntent pintent = PendingIntent.getActivity(context, 0, intent,
> 0);
>
> RemoteViews views = new RemoteViews(context.getPackageName(),
> R.layout.my_widget_view);
> views.setOnClickPendingIntent(R.id.startButton, pintent);
>
> * In my LogDataActivity class
>     public void onCreate(Bundle savedInstanceState) {
>                 super.onCreate(savedInstanceState);
>
>                 //Do some of my stuff
>
>                 Toast.makeText(LogDataActivity.this, "Success",
> Toast.LENGTH_LONG).show();
>
>                 super.finish();
>         }
>
> So what happens: I click the button, a plain black screen pops up
> (Altough I did not specify a layout upon creating the activity), and
> after my work is done the Toast shows up and the activity gets
> 'killed'.
> Basically that is what I want to do except for the black screen to
> show up. Is it possible not to show a screen upon creating the
> activity?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to