Jump to content


Photo

[MOD] [LibraGinger] Better screen brightness, Wifi, Bluetooth toggles for Konstat's notification power widget

- - - - -

  • Please log in to reply
16 replies to this topic

#1
flshg

flshg

    Addict

  • Members
  • PipPipPipPipPip
  • 552 posts
  • Gender:Male
  • Location:HK
  • Devices:Nexus 4
Made a modification to Konstat's awesome notification power widget to include a better screen brightness toggle. Works in a similar way to the standard power widget cycles : Auto brightness -> min -> 30% -> Max.

Also removed a few icons (sound and vibrate toggles) that I didn't use and rearranged the others to my liking.

Since I'm currently using Libraginger, this mod is for that rom, but might work with MMHMP, maybe others. (Might be best to get KonstaT to resign first).

Please report bugs and compatibility.

As with all mods, make a backup of important data first.

Flash in clockworkmod, then clear dalvik cache under 'advanced' option before rebooting.



*Update* version 5 now has long press on wifi and bluetooth to bring up the relevant settings pages. The page appears 'underneath' the pulldown page (since the status bar goes topmost over activities). Future work might enable auto exit from pulldown page to display the settings pages immediately.

Version 6 has long press options on wifi, data and bluetooth (the other toggles have less useful settings pages). Status bar collapses after a long press (credit to KonstaT).


Attached Files


Edited by flshg, 12 November 2011 - 05:14 PM.

  • 1
flsh grdn


...................................................................................................................................................................................

ZTE Blade / Orange San Francisco Grey

Running Eco CM9

#2
Colossae3.23

Colossae3.23

    Addict

  • Members
  • PipPipPipPipPip
  • 606 posts
  • Gender:Male
  • Location:South Wales
  • Devices:Nokia Lumia 720
Good work, that will be a nice feature. Think I'll wait until some one tries on Mountain Pie first.

  • 0

#3
KonstaT

KonstaT

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 2,662 posts
  • Gender:Male
  • Location:Finland
  • Devices:Moto G, ZTE Open C
  • Twitter:@konstatuomio
Exellent job. Thank you very much. :)

Didn't try the actual file (went straight for the smali) and it works as it should. Also this SystemUI.apk should work with M-MHMP if it is signed with test key. Which key did you use?

You know that I'm going to totally nick this for my next release. :P Are you working on something else? I'm thinking of outsourcing this to you. ;) No but seriously, I have some ideas but not so much time to play with this. It would great to have sound/vibrate options under one button and also wlan tethering button should be quite easy to make...

  • 0

#4
flshg

flshg

    Addict

  • Members
  • PipPipPipPipPip
  • 552 posts
  • Gender:Male
  • Location:HK
  • Devices:Nexus 4

Exellent job. Thank you very much. :)

Didn't try the actual file (went straight for the smali) and it works as it should. Also this SystemUI.apk should work with M-MHMP if it is signed with test key. Which key did you use?

You know that I'm going to totally nick this for my next release. :P Are you working on something else? I'm thinking of outsourcing this to you. ;) No but seriously, I have some ideas but not so much time to play with this. It would great to have sound/vibrate options under one button and also wlan tethering button should be quite easy to make...


Konstat, I used the CM7 platform key, but feel free to resign it and use the code. I think elitemovils original power widget had the sound and vibrate under one button so it should be a straight copy+paste. I dont have access to wlan tethering so am not likely to attempt work on it. By all means throw some ideas at me and I'll see if I have the patience to tackle more smali hacking.

  • 0
flsh grdn


...................................................................................................................................................................................

ZTE Blade / Orange San Francisco Grey

Running Eco CM9

#5
flshg

flshg

    Addict

  • Members
  • PipPipPipPipPip
  • 552 posts
  • Gender:Male
  • Location:HK
  • Devices:Nexus 4
Made a quick addition - long press on wifi or bluetooth button to access the relevant settings pages.

  • 0
flsh grdn


...................................................................................................................................................................................

ZTE Blade / Orange San Francisco Grey

Running Eco CM9

#6
KonstaT

KonstaT

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 2,662 posts
  • Gender:Male
  • Location:Finland
  • Devices:Moto G, ZTE Open C
  • Twitter:@konstatuomio

Made a quick addition - long press on wifi or bluetooth button to access the relevant settings pages.

Thanks again. :)

I added this feature to all buttons in my version. Only problem I have is with mobile data switch. Can't find anywhere how to link it to correct settings menu. According to this is should be android.settings.DATA_ROAMING_SETTINGS, but that only causes force close. It now points to android.settings.WIRELESS_SETTINGS instead, which isn't exactly right.

I also quickly tried to add method that would automatically collapse (close) statusbar after long press, but couldn't get it to work. :P Will have try that again with better time. Any ideas on this?

Edit. Got the status bar collapse part working. :) Still that one thing with the mobile data switch. I think the right place for that settings would be android.phone.SETTINGS, but I still get a force close...

Edited by KonstaT, 12 November 2011 - 02:40 PM.

  • 0

#7
flshg

flshg

    Addict

  • Members
  • PipPipPipPipPip
  • 552 posts
  • Gender:Male
  • Location:HK
  • Devices:Nexus 4

Thanks again. :)

I added this feature to all buttons in my version. Only problem I have is with mobile data switch. Can't find anywhere how to link it to correct settings menu. According to this is should be android.settings.DATA_ROAMING_SETTINGS, but that only causes force close. It now points to android.settings.WIRELESS_SETTINGS instead, which isn't exactly right.

I also quickly tried to add method that would automatically collapse (close) statusbar after long press, but couldn't get it to work. :P Will have try that again with better time. Any ideas on this?

Edit. Got the status bar collapse part working. :) Still that one thing with the mobile data switch. I think the right place for that settings would be android.phone.SETTINGS, but I still get a force close...


The following code seems to be working:


new-instance v0, Landroid/content/Intent;

    const-string v1, "android.intent.action.MAIN"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-string v1, "com.android.phone"

    const-string v2, "com.android.phone.Settings"

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

	const/high16 v2, 0x1000
	
	invoke-virtual {v0, v2}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    invoke-virtual {v3, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V





  • 1
flsh grdn


...................................................................................................................................................................................

ZTE Blade / Orange San Francisco Grey

Running Eco CM9

#8
KonstaT

KonstaT

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 2,662 posts
  • Gender:Male
  • Location:Finland
  • Devices:Moto G, ZTE Open C
  • Twitter:@konstatuomio

The following code seems to be working:

Thanks, that was helpful. Needed little modification outside that code, but it works now. :)

My version is actually originally based on elimovil's port, so I think it has that original sound button. It does have resources for all four modes (sound+vib, sound only, vibrate only, silent), but it only works as sound on/off switch. That's why I added the vibrate button and when you use it, you can see that the images change in the sound button according to this.

So, what's next? ;) This has been very inspiring. I think my notification power widget was semi-dead project (not sure when I would have actually came back to it) and now it's again much better with the long press (and collapsing notification bar) function. :)

  • 0

#9
dirlan2001

dirlan2001

    Enthusiast

  • Members
  • PipPipPip
  • 210 posts
  • Gender:Male
  • Location:Hamme
  • Devices:Blade+Tab+OT918D

So, what's next? ;) This has been very inspiring.


:D maybe you could have a look at this thread ?

Sounds like rather usefull and interesting...

  • 0


Alcatel OT918D Blaze (dual SIM)

Samsung Galaxy Tab (the original)

ZTE San Francisco Moldovan MHMP r6 + Solidchips Bootanimation


iPAQ
614c - WM 6.5_5.2.21501 AKU 5.0.70 WWE with minor tweaks (radio gone)

iPAQ hx4700 - WM 6.1_5.2.20764 AKU 1.1.1 WWE (layed to rest)


#10
flshg

flshg

    Addict

  • Members
  • PipPipPipPipPip
  • 552 posts
  • Gender:Male
  • Location:HK
  • Devices:Nexus 4

Thanks, that was helpful. Needed little modification outside that code, but it works now. :)

My version is actually originally based on elimovil's port, so I think it has that original sound button. It does have resources for all four modes (sound+vib, sound only, vibrate only, silent), but it only works as sound on/off switch. That's why I added the vibrate button and when you use it, you can see that the images change in the sound button according to this.

So, what's next? ;) This has been very inspiring. I think my notification power widget was semi-dead project (not sure when I would have actually came back to it) and now it's again much better with the long press (and collapsing notification bar) function. :)


Nothing planned as yet, will be looking around for anything exciting to hack into our blades. I'm certainly no expert in smali but I'm sure we can find something to collaborate on.




:D maybe you could have a look at this thread ?

Sounds like rather usefull and interesting...


That certainly would be a useful addition but it is definitely out of my league. I think that is more for burstlam, and even then I think it would only be possible with access to source code or in-depth info of the hardware drivers.



  • 0
flsh grdn


...................................................................................................................................................................................

ZTE Blade / Orange San Francisco Grey

Running Eco CM9

#11
jonmac73

jonmac73

    Enthusiast

  • Members
  • PipPipPip
  • 199 posts
  • Gender:Male
  • Devices:Orange San Fran - Huawei G510
anyone know if this works on FA's blade mix rom ?
and any screenshots please ?

  • 0

UK Orange San Fran Gen2 TPT'd running CM9 ECO

 

UK Huawei Ascend G510 running stock 4.1.1


#12
KonstaT

KonstaT

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 2,662 posts
  • Gender:Male
  • Location:Finland
  • Devices:Moto G, ZTE Open C
  • Twitter:@konstatuomio

anyone know if this works on FA's blade mix rom ?
and any screenshots please ?

No, it doesn't.

Blade Mix is based on ginger stir fry (even though fallenangel refuses to say what it's based on), which is again based on the leaked gingerbread. You can find my older version (no longer developed) of the notification power widget here. It should work with all of the version the leaked ROM, but it doesn't have all the latest great features of this one. There are also some screenshots to get the idea what it (and also this) looks like.

  • 0

#13
ZuzMaRa

ZuzMaRa

    Newbie

  • Members
  • Pip
  • 33 posts
Hi,

Is there anyone around here who has tried it in burstlam's BladeGinger-Negaraku ROM? Any chance that it would work there?

THX

Cheers!

  • 0

#14
flshg

flshg

    Addict

  • Members
  • PipPipPipPipPip
  • 552 posts
  • Gender:Male
  • Location:HK
  • Devices:Nexus 4

Hi,

Is there anyone around here who has tried it in burstlam's BladeGinger-Negaraku ROM? Any chance that it would work there?

THX

Cheers!


This should already be ported to the latest version of that rom. V2.4 has this feature AFAIK.

  • 0
flsh grdn


...................................................................................................................................................................................

ZTE Blade / Orange San Francisco Grey

Running Eco CM9

#15
ZuzMaRa

ZuzMaRa

    Newbie

  • Members
  • Pip
  • 33 posts

This should already be ported to the latest version of that rom. V2.4 has this feature AFAIK.


Hi,

Yes, KonstaT's version is ported, but I'm not sure if it includes Ur mods.

Edited by ZuzMaRa, 06 December 2011 - 09:13 PM.

  • 0

#16
flshg

flshg

    Addict

  • Members
  • PipPipPipPipPip
  • 552 posts
  • Gender:Male
  • Location:HK
  • Devices:Nexus 4

Hi,

Yes, KonstaT's version is ported, but I'm not sure if it includes Ur mods.


KonstaT's latest version includes all of my mods, as should burstlams negaraku 2.4.

  • 0
flsh grdn


...................................................................................................................................................................................

ZTE Blade / Orange San Francisco Grey

Running Eco CM9

#17
ZuzMaRa

ZuzMaRa

    Newbie

  • Members
  • Pip
  • 33 posts

<br />KonstaT's latest version includes all of my mods, as should burstlams negaraku 2.4.<br />

<br /><br /><br />

Many THX 4 Ur time and patience.

Cheers

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users