Hi--
I'm trying to write a simple podcast application that allows a
show to have a branded application that people can use to listen to
the show, read show notes and even call a phone number if the show has
a voice mail box.
Most everything is going great, I made some mistakes (like
implementing everything as asynctasks) and learned from them. I
re-implemented a majority of the background processing as a couple of
services.
The problem I am currently faced with is that I have a
DownloadShowsService that downloads the MP3 and a PDF file and inserts
the MP3 into the contentstore. I want the Activity that starts the
service to update when the service is finished downloading the file.
Currently I have this code:
Intent i = new Intent();
i.setAction(Intent.ACTION_RUN);
i.setClass(ShowDetail.this, DownloadShowsService.class);
i.putExtra(Constants.TITLE_FIELD, mShow.getTitle());
i.putExtra(Constants.ENCLOSURE_FIELD, mShow.getMp3Path());
i.putExtra(Constants.NOTES_URL, mShow.getPdfPath());
i.putExtra(BaseColumns._ID, mShow.getId());
bindService(i, mConnection, Context.BIND_AUTO_CREATE);
startService(i);
/* Make sure dssShow has been assigned to when we bind to it */
if(dssShow != null)
{
dssShow.addListener(new PropertyChangeListener(){
public void propertyChange(PropertyChangeEvent event) {
if(event.getPropertyName() == "finished" &&
(Boolean)event.getOldValue() == true)
{
ShowDetail.this.readShowData();
}
}
});
}
The dssShow is always null immediately after the service starts.
So I am running against the limits of my knowledge of Android and
decided to ask for some help.
Does anyone have any suggestions?
Would seeing more code help?
I have to admit to being a bit confused by the whole SOA thing.
--Sean
Calendar: http://www.google.com/calendar/embed?src=darkmane%40gmail.com
Livejournal: http://darkmane.livejournal.com
Every 5 minutes you spend writing code in a new language is more
useful than 5 hours reading blog posts about how great the language
is.
--
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