hey..
thanks for ur replies..
Yes, I had to add finish() at the onCreate() method as well. I had only put
it in the onActivityResult method() due to which the application was not
getting destroyed.

I had another doubt regarding bindService() actaully.
Can we call this bindService() in any user defined method other than the
onCreate() method.

calling it in onCreate() and it works completely fine.
Now I need this servivebind method to extend Application, due to which I
cannot extend Activity, thus not able to override onCreate()

Can anyone help me here

Thanks a lot for ur replies..

Priyank

On Fri, Jul 30, 2010 at 9:45 AM, Jenus Dong <[email protected]> wrote:

> yeah,the welcome activity has the reference of the application activity,
> you can call activity.finish() of the application, and there you can overide
> the finish function of the application, make destory the servicebind.
> Hope it could be helpful.
>
>
> On Fri, Jul 30, 2010 at 3:33 PM, StillALearner <[email protected]> wrote:
>
>> Used finish(); to end an activity ????
>>
>>
>> On Jul 30, 10:32 am, Priyank <[email protected]> wrote:
>> > Hi,
>> > In my current application design, I have an activity class
>> > application.java (which starts on launching the application), and it
>> > does not have a layout(UI screen). I call another class called
>> > servicebind.java from the onCreate method of my 1st class. here I bind
>> > to the local server (bindServer()). i call back the application class
>> > through an intent.
>> >  Once I am back to my application class, I call my activity class
>> > called welcome.java which has a layout/UI.
>> >
>> > When I run this application, I am able to see the welcome screen. But
>> > the problem is, when I click on the back button, I get a black screen
>> > with just the title on top. I have to hit back button 3 times to exit
>> > the application.
>> >
>> > The reason I see from the logs is that, the 1st 2 activity classes
>> > (application.java and services.java) does not get destroyed unless I
>> > hit the back button. So the 1st time I hit back button, the welcome
>> > activity gets destroyed. the next back button destroys the servicebind
>> > class and final back destroys the application class.
>> > Is the reason because these classes dont have a UI to display in the
>> > onCreate method.
>> >
>> > I do not want to change my design where I bind the service in the
>> > servicebind class and call the welcome activity in the application
>> > class.
>> >
>> > can anyone please help me find a way to avoid pressing the back button
>> > multiple times to exit.
>> > Please let me know if you dont understand my question.
>> >
>> > Thanks,
>> > Priyank
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]<android-developers%[email protected]>
>> For more options, visit this group at
>> http://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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to