Problem with Intent ExtraInfo

NeoTechni

Well-Known Member
Licensed User
Longtime User
I'm using it to send commands between 2 apps, but I've found if I return to the android homescreen, and click an app, the extrainfo still has data in it that I sent. I only want this to execute when it's sent from the other program. How can I clear the data after I get it?

I've already made a workaround where I also include the datetime.now and check that to be sure it's not the same as last time, I just want to know for the future
 
Last edited:

warwound

Expert
Licensed User
Longtime User
You'll get the same result if you change the device orientation - the Activity will be recreated and the StartingIntent will contain the 'extrainfo'.
Looks like you ideally need to use the native android Intent removeExtra or removeExtras methods: Intent | Android Developers

BUT a search shows that this will not do as you want:android - Can't remove intent extra! - Stack Overflow
Your date/time flag seems the best solution.

Martin.
 
Upvote 0
Top