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

How To depend a value to an external application

OP poria1999

7th April 2014, 08:51 PM   |  #1  
poria1999's Avatar
OP Senior Member
Flag Tehran
Thanks Meter: 465
 
342 posts
Join Date:Joined: Feb 2013
More
Hi
If you take look at Themes fourm you Can see a lot of sttings applications that sets values(colors,sizes and etc) to Some apps(like status bar)...
I want know how To get values from on app and set them to other app.
I tried decompiling apps and look trough them but i couldn't get any thing Cuz Im not good in smali at all
If anyone Can help me with java code i will be Thankful to.
And of course I would give him Credit In my mods. @serajr
Sorry for this but your SystemUI (thats really Awesome ) is just what i mean.
Can you help me?
Sent from my LT18i using Tapatalk 2
The Following User Says Thank You to poria1999 For This Useful Post: [ View ]
7th April 2014, 10:06 PM   |  #2  
serajr's Avatar
Recognized Developer / Recognized Themer
Flag Rafard - SP
Thanks Meter: 10,642
 
2,841 posts
Join Date:Joined: Apr 2011
Donate to Me
More
Quote:
Originally Posted by poria1999

Hi
If you take look at Themes fourm you Can see a lot of sttings applications that sets values(colors,sizes and etc) to Some apps(like status bar)...
I want know how To get values from on app and set them to other app.
I tried decompiling apps and look trough them but i couldn't get any thing Cuz Im not good in smali at all
If anyone Can help me with java code i will be Thankful to.
And of course I would give him Credit In my mods. @serajr
Sorry for this but your SystemUI (thats really Awesome ) is just what i mean.
Can you help me?
Sent from my LT18i using Tapatalk 2

Hi buddy!!
The answer is: BroadcastReceiver

With Xposed Framework life became easier, and to implement it inside apps is a piece of cake!! But if you want to do the same without Xposed, you need to go into "smali bowels"!

You mentioned my SystemUI mods with external settings app. How did I managed to make this scenario work? BroadcastReceiver once again!
1th - I've registered a custom BroadcastReceiver inside PhoneStatusBar.smali in which receives known intents from my external settings app!
2th - After intent received and filtered, the right job is done!

I donīt know if this short explanation will help you as you want, but thatīs the concept!! I can provide you java and smali examples (for both, java and eclipse skills are necessary)!!
Last edited by serajr; 7th April 2014 at 10:09 PM.
The Following User Says Thank You to serajr For This Useful Post: [ View ]
7th April 2014, 10:14 PM   |  #3  
poria1999's Avatar
OP Senior Member
Flag Tehran
Thanks Meter: 465
 
342 posts
Join Date:Joined: Feb 2013
More
Quote:
Originally Posted by serajr

Hi buddy!!
The answer is: BroadcastReceiver

With Xposed Framework life became easier, and to implement it inside apps is a piece of cake!! But if you want to do the same without Xposed, you need to go into "smali bowels"!

You mentioned my SystemUI mods with external settings app. How did I managed to make this scenario work? BroadcastReceiver once again!
1th - I've registered a custom BroadcastReceiver inside PhoneStatusBar.smali in which receives known intents from my external settings app!
2th - After intent received and filtered, the right job is done!

I donīt know if this short explanation will help you as you want, but thatīs the concept!! I can provide you java and smali examples (for both, java and eclipse skills are necessary)!!

Thank you
It seems i should try harder
I think i know java as well.
But i usually work with Android Studio.
And If its ok I really want to check and see your examples!
Thank you agian.

Sent from my LT18i using Tapatalk 2
7th April 2014, 10:41 PM   |  #4  
serajr's Avatar
Recognized Developer / Recognized Themer
Flag Rafard - SP
Thanks Meter: 10,642
 
2,841 posts
Join Date:Joined: Apr 2011
Donate to Me
More
Quote:
Originally Posted by poria1999

Thank you
It seems i should try harder
I think i know java as well.
But i usually work with Android Studio.
And If its ok I really want to check and see your examples!
Thank you agian.

Sent from my LT18i using Tapatalk 2

Let's focus on a SystemUI mod as example like change some text color... whatever, and I'm gonna put related code over here!!
I just need to prepare something ok!!
The Following User Says Thank You to serajr For This Useful Post: [ View ]
8th April 2014, 12:33 PM   |  #5  
poria1999's Avatar
OP Senior Member
Flag Tehran
Thanks Meter: 465
 
342 posts
Join Date:Joined: Feb 2013
More
@serajr
Did you prepare it?


Sent from my LT18i using Tapatalk 2
8th April 2014, 01:37 PM   |  #6  
serajr's Avatar
Recognized Developer / Recognized Themer
Flag Rafard - SP
Thanks Meter: 10,642
 
2,841 posts
Join Date:Joined: Apr 2011
Donate to Me
More
Quote:
Originally Posted by poria1999

@serajr
Did you prepare it?


Sent from my LT18i using Tapatalk 2

In progress... itīs not so easy to do it during week due my job, but I hope to start post something today yet!!
The Following User Says Thank You to serajr For This Useful Post: [ View ]
9th April 2014, 03:02 PM   |  #7  
serajr's Avatar
Recognized Developer / Recognized Themer
Flag Rafard - SP
Thanks Meter: 10,642
 
2,841 posts
Join Date:Joined: Apr 2011
Donate to Me
More
Quote:
Originally Posted by poria1999

@serajr
Did you prepare it?


Sent from my LT18i using Tapatalk 2

@poria1999

Guide done!! Iīm gonna start writing a new thread for that, so today yet I think it will be released!!
But I've used ContentObserver instead of BroadcastReceiver (got better results)!!
When done, Iīll edit here with the new thread link!!

( @sandy7, @niaboc79 take a look at whole discussion and tell me what about!! Thanks!!! )
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2014-04-09-10-02-52.jpg
Views:	26
Size:	62.0 KB
ID:	2676707   Click image for larger version

Name:	Screenshot_2014-04-09-10-49-18.jpg
Views:	22
Size:	62.4 KB
ID:	2676756  
Attached Files
File Type: zip red_clock_720p.zip - [Click for QR Code] (481.1 KB, 1 views)
Last edited by serajr; 9th April 2014 at 08:56 PM.
The Following 2 Users Say Thank You to serajr For This Useful Post: [ View ]
9th April 2014, 04:46 PM   |  #8  
poria1999's Avatar
OP Senior Member
Flag Tehran
Thanks Meter: 465
 
342 posts
Join Date:Joined: Feb 2013
More
Quote:
Originally Posted by serajr

@poria1999

Guide done!! Iīm gonna start writing a new thread for that, so today yet I think it will be released!!
But I've used ContentObserver instead of BroadcastReceiver (got better results)!!
When done, Iīll edit here with the new thread link!!

( @sandy7, @niaboc79 take a look at whole discussion and tell me what about!! Thanks!!! )

Thank you bro!
Waiting for!
I think this thread can change the whole story about Theming and moding in xda!

Sent from my LT18i using Tapatalk 2
The Following User Says Thank You to poria1999 For This Useful Post: [ View ]
9th April 2014, 06:56 PM   |  #9  
serajr's Avatar
Recognized Developer / Recognized Themer
Flag Rafard - SP
Thanks Meter: 10,642
 
2,841 posts
Join Date:Joined: Apr 2011
Donate to Me
More
Quote:
Originally Posted by poria1999

Thank you bro!
Waiting for!
I think this thread can change the whole story about Theming and moding in xda!

Sent from my LT18i using Tapatalk 2

I really hope so!!! Credits go to you too!
I think in a hour it will be ready...
Last edited by serajr; 9th April 2014 at 06:58 PM.
The Following User Says Thank You to serajr For This Useful Post: [ View ]
9th April 2014, 07:07 PM   |  #10  
poria1999's Avatar
OP Senior Member
Flag Tehran
Thanks Meter: 465
 
342 posts
Join Date:Joined: Feb 2013
More
Quote:
Originally Posted by serajr

I really hope so!!! Credits go to you too!
I think in a hour it will be ready...

Thank you!

Sent from my LT18i using Tapatalk 2

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes