I am using an Activity called "FirstStart" in my Android Application. After the user press a "register" Button, I start a registration intent service to register the user on my server and on GCM.
In my onClik(View v)
I start the Intent:
Intent intent = new Intent(this, RegistrationIntentService.class);
intent.putExtra("user", givenUsername);
startService(intent);
After this, the public void onHandleIntent(Intent intent)
starts and get a token from GCM and put this to my server.
This process needs a few seconds. I dont want the user to wait on the normal screen, so I put a progress bar in the FirstStart Activity. It is called and started before the RegistrationIntentService starts.
After the registration intent service finished, I want to stop the progress bar in FirstStart and finish the registration intent service and also the FirstStart Activity.
So how can I finish the FirstStart Activity at the end of my RegistrationIntentService? Or is there a way to go back into the FirstStart Activity, when the RegistrationIntentService is finished?