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

Script Writing

Tip us?
 
mrminor13
Old
#1  
mrminor13's Avatar
Member - OP
Thanks Meter 47
Posts: 92
Join Date: Mar 2013
Default Script Writing

I would like to write a script to make a custom toggle in quick settings open up the power widget. Anyone willing to either help me learn about writing script or to tell me the script to enter to make this magick happen?

Thank you in advance...:beer:

Sent from my Nexus 7 using xda app-developers app
Hammer_Of_The_Gods Old
(Last edited by Hammer_Of_The_Gods; 16th January 2014 at 09:22 AM.)
#2  
Guest
Thanks Meter
Posts: n/a
Hi,

It's not with a script that you can do that, but you have multiple solutions:

- Decompile/modifie/recompile the SystemUI.apk and Framework (at least), there is some guides but it's the harder thing (like this for example then edit the quick settings).

The easy way is to use:

- A custom rom that allows quick settings management (see dev section).

- Use an app like Power Toggles or Notification Toggle.

- Use Xposed framework with Xposed modules like Gravity Box.

It depends if you are rooted or not, if you want to flash a custom rom, etc...

 
mrminor13
Old
#3  
mrminor13's Avatar
Member - OP
Thanks Meter 47
Posts: 92
Join Date: Mar 2013
I'm sorry, I probably should've mentioned this before hand. I'm currently running slimkat 2.3, which, I don't know if your familiar with. But it has "The Chamber of Secrets", which allows you to basically write a custom shortcut to edit any setting within the build prop. ( Now you should know I'm guessing at its full capabilities because I don't know how to use it and I'm asking for help)

I'm not new to flashing ROMs, kernels or apks, but I've never compiled my own ROM. And I don't really have the capability or need to do so. From what I understand, the chamber of secrets is pretty amazimg , I just want to know how to use it.

Sent from my Nexus 7 using xda app-developers app
 
Jubakuba
Old
#4  
Jubakuba's Avatar
Senior Member
Thanks Meter 5032
Posts: 2,317
Join Date: Oct 2010
Location: Pueblo, Colorado

 
DONATE TO ME
Quote:
Originally Posted by mrminor13 View Post
I'm sorry, I probably should've mentioned this before hand. I'm currently running slimkat 2.3, which, I don't know if your familiar with. But it has "The Chamber of Secrets", which allows you to basically write a custom shortcut to edit any setting within the build prop. ( Now you should know I'm guessing at its full capabilities because I don't know how to use it and I'm asking for help)

I'm not new to flashing ROMs, kernels or apks, but I've never compiled my own ROM. And I don't really have the capability or need to do so. From what I understand, the chamber of secrets is pretty amazimg , I just want to know how to use it.

Sent from my Nexus 7 using xda app-developers app
Hai. Author here.
I routinely search xda for the chamber to make sure nobody has done anything TOO stupid with it lol.
Anyway.
Power menu isn't in it's capabilities.
However...wrote up a powemenu shortcut for slim shortcuts.
Merged...so will be in the next build.
The Following 2 Users Say Thank You to Jubakuba For This Useful Post: [ Click to Expand ]
 
mrminor13
Old
#5  
mrminor13's Avatar
Member - OP
Thanks Meter 47
Posts: 92
Join Date: Mar 2013
Quote:
Originally Posted by Jubakuba View Post
Hai. Author here.
I routinely search xda for the chamber to make sure nobody has done anything TOO stupid with it lol.
Anyway.
Power menu isn't in it's capabilities.
However...wrote up a powemenu shortcut for slim shortcuts.
Merged...so will be in the next build.
Thanks juba. I didn't want to clog up the thread with my ignorance. I would really like to learn though. I tried doing some research on my own last night on the Settings.java file. But not sure what in looking at.

If you could please point me in the right direction to start learning it would be much appreciated. I understand that I could really needs things up if I do the wrong thing. And don't want to do that. However, I'm a pretty competent person and want to learn.

Thank you for all the work you have done for our perfect ROM!

Sent from my Nexus 5 using xda app-developers app
 
Jubakuba
Old
#6  
Jubakuba's Avatar
Senior Member
Thanks Meter 5032
Posts: 2,317
Join Date: Oct 2010
Location: Pueblo, Colorado

 
DONATE TO ME
Quote:
Originally Posted by mrminor13 View Post
Thanks juba. I didn't want to clog up the thread with my ignorance. I would really like to learn though. I tried doing some research on my own last night on the Settings.java file. But not sure what in looking at.

If you could please point me in the right direction to start learning it would be much appreciated. I understand that I could really needs things up if I do the wrong thing. And don't want to do that. However, I'm a pretty competent person and want to learn.

Thank you for all the work you have done for our perfect ROM!

Sent from my Nexus 5 using xda app-developers app
Well.
The settings.java file lists all possible system settings.

For example...
Say I wanted to make a shortcut to turn my status bar clock a different color.
I'd search the file for something that looks like a match...
Like Ctrl+f > "clock"

Next...next...next...etc.
Oh, look. "statusbar_clock_color"
That sounds right.

Add to chamber.
Checkbox? No...that isn't a checkbox setting.
Values?
Here's where it gets tricky.
Check boxes and colors...simple.
Colors: input like it tells you to in the dialog.
-2 means default for us...so you could do red,#ff00aacc,-2
For example...to switch between those three values.

List preferences...
https://github.com/SlimRoms/packages...lim_arrays.xml

As you can see...the top bunch is for what looks like led timeout settings...
So if I wanted to change those...
I'd find the setting in settings.java...
Input desired values. Such as 0,2500
Which matches to always on and long.
 
mrminor13
Old
#7  
mrminor13's Avatar
Member - OP
Thanks Meter 47
Posts: 92
Join Date: Mar 2013
Thank you. I'm going to be delving into this this weekend.

Sent from my Nexus 5 using xda app-developers app

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


MacroDroid Update Brings Android Wear Automation

A few months ago, we talked about MacroDroid. For those who don’t remember, MacroDroid … more

Droid X Receives KitKat Port, Upcoming Google Glass Firmware Improvements – XDA Developer TV

Android 4.4.3 lands on the European HTC … more

Calc+ is a Smart and Beautiful Android Calculator

As we’ve said inthe past, there are quite a few calculators available on Android. … more

Get Better Debug Data with Crash Report SDK

Developing an application is a hard and often times ungratifying task. It also requires quite a … more