5,605,835 Members 47,689 Now Online
XDA Developers Android and Mobile Development Forum

Script Writing

Tip us?
 
mrminor13
Old
#1  
mrminor13's Avatar
Member - OP
Thanks Meter 14
Posts: 56
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  
Hammer_Of_The_Gods's Avatar
Recognized Contributor
Thanks Meter 4503
Posts: 4,424
Join Date: Sep 2010
Location: TOURS
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...


 
Quote:
Originally Posted by Red5 View Post
The OP is the best place to keep a secret because nobody reads it.
 
mrminor13
Old
#3  
mrminor13's Avatar
Member - OP
Thanks Meter 14
Posts: 56
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 3348
Posts: 2,062
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 14
Posts: 56
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 3348
Posts: 2,062
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 14
Posts: 56
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


XDA PORTAL POSTS

Android 4.4.2 OTA Now Available for the Verizon Droid DNA

A couple of days ago, we talked about how the Android 4.4.2 upgrade for the HTC … more

UnbelovedHosts Uses Xposed to Block Unwanted Connections

First popularized by mvps, hosts-based ad blocking has become the de facto standard … more

March of the Droids 2014 Just Two Weeks Away; It’s Not Too Late to Register

If you want to attend an Android developers’ … more

Android App Review: Auto Config Free – XDA Developer TV

In this weeks episode of XDA Xposed Tuesday, we talked about customization of … more