Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Android
Search Coderanch
Advance search
Google search
Register / Login
This week's book giveaway is in the
Spring
forum.
We're giving away four copies of
Java Persistence with Spring Data and Hibernate
and have Cătălin Tudose on-line!
See
this thread
for details.
Win a copy of
Java Persistence with Spring Data and Hibernate
this week in the
Spring
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Tim Cooke
Paul Clapham
Liutauras Vilda
Sheriffs:
Junilu Lacar
Rob Spoor
Jeanne Boyarsky
Saloon Keepers:
Stephan van Hulst
Carey Brown
Tim Holloway
Piet Souris
Bartenders:
Forum:
Android
Service public method is not firing my activity restarts
shadman kudchikar
Greenhorn
Posts: 13
posted 6 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
this is in my main activity
musicService.setOnCompletitionListener(new OnCompletionListener() { public void onCompletion(MediaPlayer theMediaPlayer) { musicService.getNextSong(); playSong(); Toast.makeText(getApplicationContext(), "Activity Song Cmp Listener", Toast.LENGTH_LONG).show(); }
this is in my service class
public void getNextSong() { Toast.makeText(getApplicationContext(), SongList.size(), Toast.LENGTH_LONG).show(); Toast.makeText(getApplicationContext(), CurrentSongID, Toast.LENGTH_LONG).show(); } public void setOnCompletitionListener(OnCompletionListener onCompletionListener) { mediaPlayer.setOnCompletionListener(onCompletionListener); }
Self destruct mode activated. Instructions for deactivation encoded in this tiny ad.
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Main is not binding with service
MainActivity is not binding with service
what is the best way to add a log out button in android
media player destroy song in playing
if i used intent to go another activity does first activity killed?
More...