Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP cryptyk

3rd September 2014, 01:03 AM   |  #1  
OP Recognized Contributor
Thanks Meter: 2,334
 
547 posts
Join Date:Joined: Jul 2007
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
3rd September 2014, 06:50 AM   |  #2  
GermainZ's Avatar
Forum Moderator / Recognized Developer / XDA Portal Team
Thanks Meter: 7,171
 
5,856 posts
Join Date:Joined: Aug 2012
Donate to Me
More
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()).
3rd September 2014, 04:58 PM   |  #3  
OP Recognized Contributor
Thanks Meter: 2,334
 
547 posts
Join Date:Joined: Jul 2007
Quote:
Originally Posted by GermainZ

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
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes