hi Flying Coder Thanks for the suggestion. In my case i don't want to make change to actual Service class because in normal application run the Toast message is being displayed properly.
But when i start the service from my test class, it give me such problem. On Fri, Aug 6, 2010 at 5:37 AM, Flying Coder <[email protected]> wrote: > Hi Nikki, > Toast's need to happen on the main UI thread. Slightly different > situation, but you may find this thread useful: > > http://groups.google.com/group/android-developers/browse_thread/thread/8fe7d6a776f5f2fb/a9ecf18a32891cab#a9ecf18a32891cab > > Cheers, > Steve > > > On Aug 5, 8:48 am, nikki <[email protected]> wrote: >> hi group >> >> i have a service class written which gives notification(Toast dialog) >> on every life cycle method call back. when i run my application all >> works well. >> >> but when run this service class from my test project the toast message >> are not displayed. >> >> it give the following log for the toast message >> >> 08-05 18:05:42.097: INFO/TestRunner(1763): started: >> testService(com.android.example.testing.dummyapp.test.ServiceTest) >> 08-05 18:05:42.317: INFO/NotificationService(581): enqueueToast >> pkg=com.android.example.testing.dummyapp >> callback=android.app.itransientnotification$stub$pr...@43703378 >> duration=0 >> 08-05 18:05:47.366: INFO/NotificationService(581): enqueueToast >> pkg=com.android.example.testing.dummyapp >> callback=android.app.itransientnotification$stub$pr...@436faa18 >> duration=1 >> 08-05 18:05:52.407: INFO/NotificationService(581): enqueueToast >> pkg=com.android.example.testing.dummyapp >> callback=android.app.itransientnotification$stub$pr...@43720e40 >> duration=1 >> 08-05 18:05:57.443: INFO/TestRunner(1763): finished: >> testService(com.android.example.testing.dummyapp.test.ServiceTest) >> 08-05 18:05:57.447: INFO/TestRunner(1763): passed: >> testService(com.android.example.testing.dummyapp.test.ServiceTest) >> >> i want that the toast message should also be displayed on subsequent >> calls to life cycle methods > > -- > 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 -- 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

