0
我已經在通知欄上成功創建了一個項目,其中DownloadService擴展了IntentService類。如何點擊通知欄返回到應用程序?
public class MyService extends Activity
{
...
void startService()
{
...
Intent myIntent = new Intent(StoryGallery.this,DownloadService.class);
myIntent.putExtra("story name", story.title);
startService(myIntent);
}
}
問題是如何點擊通知項目以返回到我的應用程序?
似乎有很多這樣的問題,但我找不到一個簡單的答案,通過單擊通知項目來啓動應用程序。我試圖讓「DownloadService實現OnClickListener」,但點擊後沒有任何迴應。
所以,在此先感謝您的答覆。
什麼是從通知欄到我的應用程序的關鍵一步? – user2718067
檢查更新的答案。我標出了重要的部分。 –
非常感謝您的評論。那麼試試吧。 – user2718067