Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,810,466 Members 49,947 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Sending information from hooks TO the settings screen?

Tip us?
 
cryptyk
Old
#1  
Senior Member - OP
Thanks Meter 1,083
Posts: 257
Join Date: Jul 2007
Default [Q] Sending information from hooks TO the settings screen?

I've read a couple of threads on the "context" that my module runs in, but I'm not clear on how I send data from my module (running in the hooked application context) back to my settings screen (running in the Xposed context?)

XSharedPreferences is obviously read only, so that doesn't work. I'm guessing I need to write to a file and parse it back from settings, but I'm hoping someone can set me in the right direction. Is there a module that already does this so I can look at the source? Or can someone give me a high level of the file permissions/location/settings to use so that it's readable/writable from both contexts?

Thanks!
Ryan
 
GermainZ
Old
#2  
GermainZ's Avatar
Forum Moderator / Recognized Developer
Thanks Meter 6,401
Posts: 5,478
Join Date: Aug 2012
I'd say your best option is to register a broadcast receiver in your app, and send a broadcast from the hooked app (you just need a Context to do that.
If you can't get one from the app, you could use AndroidAppHelper.currentApplication()).
 
cryptyk
Old
#3  
Senior Member - OP
Thanks Meter 1,083
Posts: 257
Join Date: Jul 2007
Quote:
Originally Posted by GermainZ View Post
I'd say your best option is to register a broadcast receiver in your app, and send a broadcast from the hooked app (you just need a Context to do that.
If you can't get one from the app, you could use AndroidAppHelper.currentApplication()).
Thank you! I got it. I guess that was obvious, but it seemed like there might be a "tighter" way to do the cross-process communication using Xposed as a bridge.

Thanks for all of your help in this forum,
Ryan
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes