udacity / AdvancedAndroid_MyGarden

102 stars 303 forks source link

Widget Pending Intent does not deliver extra #1

Open ValentunSergeev opened 7 years ago

ValentunSergeev commented 7 years ago

Hi, i had a trouble with Pending Intent Extra. Pending intent to PlantDetailActivity in getSinglePlantRemoteView() wasnt deliver extra data. I had a UnsupportedOperationException in PlantContentProvider(uri single path was -1) But linejava intent.setAction("ThisFixDataLost") fixed it. (https://stackoverflow.com/a/3128418/7996129)

aadilmehrajbhat commented 6 years ago

@ValentunSergeev I added action to intent bt I still doesn't work, please can you elaborate little more how you actually fixed it please

ValentunSergeev commented 6 years ago

@AadilMehrajBhat oh, it was a 8 months ago, but as I remember I just added the line I shown above.. nothing more

aadilmehrajbhat commented 6 years ago

@ValentunSergeev When I Add it in solution code it works but within exercise nothing :(

ValentunSergeev commented 6 years ago

@AadilMehrajBhat may be you do something wrong in exercise? You can use git diff/ Android Studio file compare to find out differences between solution and your code

intkhabahmed commented 6 years ago

How adding intent.setAction("ThisFixDataLost") in the code fixed the problem. It is working, but what is the logic?

ValentunSergeev commented 6 years ago

@intkhabahmed you can find explanations here: https://stackoverflow.com/a/3128271/7996129