Can I start both an activity and a Service through a PendingIntent in the notification area
I cannot see how to start bot开发者_如何学编程h when user click a Notification.
I think the answer is yes, but not directly.
You can specify an extra to the intent whether to start the service and parse this extra in when your activity gets launched. The activity can start the service accordingly if needed.
If you don't want to mess with your current activity you can create another activity "A" that starts your activity "B" and your service and start the activity A from the pending intent
精彩评论