6

I am new to android development. I want add click listener on button in widget. I am updating widget in service. Thanks in advance.

1 Answer 1

5

Maybe you should look into making a clickable widget.

This involves using:

remoteView.setOnClickPendingIntent(R.id.widgetFrameLayout, pendingIntent);

Sign up to request clarification or add additional context in comments.

3 Comments

I am using service to update the widget So what should be the pending intent
Not too familiar with the widget callback system. I'd look into the link though. Sorry if it didn't help much.
Please upvote the answer as well if you can! thanks and I'm glad I helped. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.