Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,771,243 Members 51,543 Now Online
XDA Developers Android and Mobile Development Forum

How To depend a value to an external application

Tip us?
 
poria1999
Old
#1  
poria1999's Avatar
Senior Member - OP
Thanks Meter 450
Posts: 341
Join Date: Feb 2013
Location: Tehran
Default How To depend a value to an external application

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
Experience The Awesomeness


The Following User Says Thank You to poria1999 For This Useful Post: [ Click to Expand ]
 
serajr
Old
(Last edited by serajr; 7th April 2014 at 09:09 PM.)
#2  
serajr's Avatar
Recognized Developer / Recognized Themer
Thanks Meter 9363
Posts: 2,454
Join Date: Apr 2011
Location: Rafard - SP

 
DONATE TO ME
Quote:
Originally Posted by poria1999 View Post
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)!!
I have paced these forests for so long
I don`t know, if I am a man or I am beast
I though hold deep within me, a quest for revenge
Then I must be a man as much as I can be
I have learned to speak the tongue of animal
I have learned to read the signs in bark and snow
I have taken within myself the spirits of my fathers long time gone
In this short time, far from home
A man of iron I`ve grown...
...A man of iron I have grown

(Hail Quorthon... RIP)

If you like my work and consider me worthy, consider DONATE me too. Thanks in advance!
The Following User Says Thank You to serajr For This Useful Post: [ Click to Expand ]
 
poria1999
Old
#3  
poria1999's Avatar
Senior Member - OP
Thanks Meter 450
Posts: 341
Join Date: Feb 2013
Location: Tehran
Quote:
Originally Posted by serajr View Post
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
Experience The Awesomeness


 
serajr
Old
#4  
serajr's Avatar
Recognized Developer / Recognized Themer
Thanks Meter 9363
Posts: 2,454
Join Date: Apr 2011
Location: Rafard - SP

 
DONATE TO ME
Quote:
Originally Posted by poria1999 View Post
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!!
I have paced these forests for so long
I don`t know, if I am a man or I am beast
I though hold deep within me, a quest for revenge
Then I must be a man as much as I can be
I have learned to speak the tongue of animal
I have learned to read the signs in bark and snow
I have taken within myself the spirits of my fathers long time gone
In this short time, far from home
A man of iron I`ve grown...
...A man of iron I have grown

(Hail Quorthon... RIP)

If you like my work and consider me worthy, consider DONATE me too. Thanks in advance!
The Following User Says Thank You to serajr For This Useful Post: [ Click to Expand ]
 
poria1999
Old
#5  
poria1999's Avatar
Senior Member - OP
Thanks Meter 450
Posts: 341
Join Date: Feb 2013
Location: Tehran
@serajr
Did you prepare it?


Sent from my LT18i using Tapatalk 2
Experience The Awesomeness


 
serajr
Old
#6  
serajr's Avatar
Recognized Developer / Recognized Themer
Thanks Meter 9363
Posts: 2,454
Join Date: Apr 2011
Location: Rafard - SP

 
DONATE TO ME
Quote:
Originally Posted by poria1999 View Post
@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!!
I have paced these forests for so long
I don`t know, if I am a man or I am beast
I though hold deep within me, a quest for revenge
Then I must be a man as much as I can be
I have learned to speak the tongue of animal
I have learned to read the signs in bark and snow
I have taken within myself the spirits of my fathers long time gone
In this short time, far from home
A man of iron I`ve grown...
...A man of iron I have grown

(Hail Quorthon... RIP)

If you like my work and consider me worthy, consider DONATE me too. Thanks in advance!
The Following User Says Thank You to serajr For This Useful Post: [ Click to Expand ]
 
serajr
Old
(Last edited by serajr; 9th April 2014 at 07:56 PM.)
#7  
serajr's Avatar
Recognized Developer / Recognized Themer
Thanks Meter 9363
Posts: 2,454
Join Date: Apr 2011
Location: Rafard - SP

 
DONATE TO ME
Quote:
Originally Posted by poria1999 View Post
@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:	23
Size:	62.0 KB
ID:	2676707   Click image for larger version

Name:	Screenshot_2014-04-09-10-49-18.jpg
Views:	19
Size:	62.4 KB
ID:	2676756  
Attached Files
File Type: zip red_clock_720p.zip - [Click for QR Code] (481.1 KB, 1 views)
I have paced these forests for so long
I don`t know, if I am a man or I am beast
I though hold deep within me, a quest for revenge
Then I must be a man as much as I can be
I have learned to speak the tongue of animal
I have learned to read the signs in bark and snow
I have taken within myself the spirits of my fathers long time gone
In this short time, far from home
A man of iron I`ve grown...
...A man of iron I have grown

(Hail Quorthon... RIP)

If you like my work and consider me worthy, consider DONATE me too. Thanks in advance!
The Following 2 Users Say Thank You to serajr For This Useful Post: [ Click to Expand ]
 
poria1999
Old
#8  
poria1999's Avatar
Senior Member - OP
Thanks Meter 450
Posts: 341
Join Date: Feb 2013
Location: Tehran
Quote:
Originally Posted by serajr View Post
@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
Experience The Awesomeness


The Following User Says Thank You to poria1999 For This Useful Post: [ Click to Expand ]
 
serajr
Old
(Last edited by serajr; 9th April 2014 at 05:58 PM.)
#9  
serajr's Avatar
Recognized Developer / Recognized Themer
Thanks Meter 9363
Posts: 2,454
Join Date: Apr 2011
Location: Rafard - SP

 
DONATE TO ME
Quote:
Originally Posted by poria1999 View Post
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...
I have paced these forests for so long
I don`t know, if I am a man or I am beast
I though hold deep within me, a quest for revenge
Then I must be a man as much as I can be
I have learned to speak the tongue of animal
I have learned to read the signs in bark and snow
I have taken within myself the spirits of my fathers long time gone
In this short time, far from home
A man of iron I`ve grown...
...A man of iron I have grown

(Hail Quorthon... RIP)

If you like my work and consider me worthy, consider DONATE me too. Thanks in advance!
The Following User Says Thank You to serajr For This Useful Post: [ Click to Expand ]
 
poria1999
Old
#10  
poria1999's Avatar
Senior Member - OP
Thanks Meter 450
Posts: 341
Join Date: Feb 2013
Location: Tehran
Quote:
Originally Posted by serajr View Post
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
Experience The Awesomeness



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes