FORUMS
Remove All Ads from XDA

[APP] LG 2X/Black Notifications

15 posts
Thanks Meter: 29
 
By xigzil, Junior Member on 15th June 2011, 08:37 PM
Post Reply Email Thread
2nd December 2012, 07:46 PM |#91  
Member
Thanks Meter: 15
 
More
Quote:
Originally Posted by tiagorl

Tell me what and where to modify. I can create the apk

Enviado desde mi LG-P990 usando Tapatalk 2

It's ok, I have create an Apk file for people who don't want to recreate the file. I made the file completely compatible with ICS and GB rom. But you need to uninstall the old app before this one.



Here: https://www.box.com/shared/hy5h68p85gfroaj781pe

Update: this is the v1 and I deleted the app, the v2 is below.
Update2: better use either the v1 in the last post (or rmein's version) with SuperSU. It is cleaner this way.

It would be great if the owner of both this topic and the github repository update the application

Mr. Börjesson, please give me your email so that I send to you the new java file.
The Following 6 Users Say Thank You to ergosum For This Useful Post: [ View ] Gift ergosum Ad-Free
 
 
2nd December 2012, 08:50 PM |#92  
Member
Thanks Meter: 7
 
More
Quote:
Originally Posted by ergosum

It's ok, I have create an Apk file for people who don't want to recreate the file. I made the file completely compatible with ICS and GB rom. But you need to uninstall the old app before this one.

Here: https://www.box.com/shared/hy5h68p85gfroaj781pe

It would be great if the owner of both this topic and the github repository update the application

Mr. Börjesson, please give me your email so that I send to you the new java file.

Thanks a lot dude!!!! You're the best!! Now working at 100%

Enviado desde mi LG-P990 usando Tapatalk 2
3rd December 2012, 12:50 AM |#93  
aigaming's Avatar
Senior Member
Flag Belgrade
Thanks Meter: 346
 
More
Quote:
Originally Posted by ergosum

It's ok, I have create an Apk file for people who don't want to recreate the file. I made the file completely compatible with ICS and GB rom. But you need to uninstall the old app before this one.

Here: https://www.box.com/shared/hy5h68p85gfroaj781pe

It would be great if the owner of both this topic and the github repository update the application

Mr. Börjesson, please give me your email so that I send to you the new java file.

Great m8,this was so much needed for our phone,can't wait to get home and test it!
3rd December 2012, 10:26 AM |#94  
Member
Thanks Meter: 7
 
More
Post
Quote:
Originally Posted by ergosum

It's ok, I have create an Apk file for people who don't want to recreate the file. I made the file completely compatible with ICS and GB rom. But you need to uninstall the old app before this one.

Here: https://www.box.com/shared/hy5h68p85gfroaj781pe

It would be great if the owner of both this topic and the github repository update the application

Mr. Börjesson, please give me your email so that I send to you the new java file.

Dear ergosum, I have an issue, I dont know If you have experienced that. When I restart the phone, the app does not work. I have the 28G fw.
Thanks and best regards;
4th December 2012, 06:33 PM |#95  
rmein's Avatar
Senior Member
Thanks Meter: 193
 
More
Quote:
Originally Posted by tiagorl

Dear ergosum, I have an issue, I dont know If you have experienced that. When I restart the phone, the app does not work. I have the 28G fw.
Thanks and best regards;

I seem to have the same problem. It works fine once you have opened the app, but does not work after a reboot unless you do that.

The notification MainService is not loading on boot, even though the app and the AccessibilityService are starting up.
8th December 2012, 12:09 PM |#96  
Member
Thanks Meter: 15
 
More
Oh you're right. I will check that, I don't have much experience in Android system, but I will try.
9th December 2012, 01:05 AM |#97  
Member
Thanks Meter: 15
 
More
Pffffffffff it took me the night to try to figure out how to correct this bug. I managed to start the application's service "MainService", even thought it's not clean. But it doesn't work until I open the app. I think I need to start another service called "AccessibilityService", because this service only appear after I open the app.

Anyway,I have to sleep and other things to do (exams...)... so I won't give anything until one or two week I guess...
The Following User Says Thank You to ergosum For This Useful Post: [ View ] Gift ergosum Ad-Free
9th December 2012, 10:20 AM |#98  
rmein's Avatar
Senior Member
Thanks Meter: 193
 
More
Quote:
Originally Posted by ergosum

Pffffffffff it took me the night to try to figure out how to correct this bug. I managed to start the application's service "MainService", even thought it's not clean. But it doesn't work until I open the app. I think I need to start another service called "AccessibilityService", because this service only appear after I open the app.

Anyway,I have to sleep and other things to do (exams...)... so I won't give anything until one or two week I guess...

Thanks for the hard work on this. Have you managed to contact the original author yet? Perhaps if you put your code up on github for him to have a quick look at, he would be able to spot the problem.
9th December 2012, 11:45 AM |#99  
Member
Thanks Meter: 15
 
More
Quote:
Originally Posted by rmein

Thanks for the hard work on this. Have you managed to contact the original author yet? Perhaps if you put your code up on github for him to have a quick look at, he would be able to spot the problem.

I am still trying but for some reason, it doesn't work.

I have tried to contact the author by PMing him. I don't have his email and I don't have rights to commit in his github I believe (I created an account just for that purpose).





Wait !!! I think I found a way. It's not clean, but it works...


Update:
Here, v2. It will work but not immediately after boot, just wait like 1 minute. Now you don't have to open the app to make the notification work.
https://www.box.com/s/u4jbet743l9okz33f4fr
The Following User Says Thank You to ergosum For This Useful Post: [ View ] Gift ergosum Ad-Free
9th December 2012, 01:58 PM |#100  
rmein's Avatar
Senior Member
Thanks Meter: 193
 
More
Quote:
Originally Posted by ergosum

I am still trying but for some reason, it doesn't work.

I have tried to contact the author by PMing him. I don't have his email and I don't have rights to commit in his github I believe (I created an account just for that purpose).





Wait !!! I think I found a way. It's not clean, but it works...


Update:
Here, v2. It will work but not immediately after boot, just wait like 1 minute. Now you don't have to open the app to make the notification work.
https://www.box.com/s/u4jbet743l9okz33f4fr

That looks like it is working fine now, but I don't really understand how it could have been broken in the first place. What changes did you make to get it working originally?

As far as I can see it would have needed a new src/com/martinborjesson/o2xtouchlednotifications/touchled/devices/TouchLEDP990ics.java file based on the original TouchLEDP990 file, but with the new location of the brightness file. You would also need a couple of extra lines in the src/com/martinborjesson/o2xtouchlednotifications/touchled/TouchLED.java file:

Code:
	static public TouchLED getTouchLED() {
		if (touchLED == null) {
			if (TouchLEDP990.isAvailable()) { // P990 and P999 works the same
				touchLED = new TouchLEDP990();
			} else if (TouchLEDP990ics.isAvailable()) {  // new ICS suport for the P990
				touchLED = new TouchLEDP990ics();
			} else if (TouchLEDP970.isAvailable()) {
				touchLED = new TouchLEDP970();
			} else if (TouchLEDP920.isAvailable()) {
				touchLED = new TouchLEDP920();
			} else if (TouchLEDP930.isAvailable()) {
				touchLED = new TouchLEDP930();
			} else if (TouchLEDP930jb.isAvailable()) {  // JellyBean support for P930
				touchLED = new TouchLEDP930jb();				
			} else if (TouchLEDP940.isAvailable()) {
				touchLED = new TouchLEDP940();
			} else if (TouchLEDLS855.isAvailable()) {
				touchLED = new TouchLEDLS855();
			} else if (TouchLEDP350.isAvailable()){
				touchLED = new TouchLEDP350();
			} else {
				touchLED = new TouchLEDNone();
			}
		}
		touchLED.usable = touchLED.isValid() && touchLED.hasProperPermissions();
		return touchLED;
	}
That is what happened with previous commits to add support for new devices, I still haven't had time to set up an android SDK environment yet, so haven't done any proper testing.
9th December 2012, 02:43 PM |#101  
Member
Thanks Meter: 15
 
More
Quote:
Originally Posted by rmein

That looks like it is working fine now, but I don't really understand how it could have been broken in the first place. What changes did you make to get it working originally?

As far as I can see it would have needed a new src/com/martinborjesson/o2xtouchlednotifications/touchled/devices/TouchLEDP990ics.java file based on the original TouchLEDP990 file, but with the new location of the brightness file. You would also need a couple of extra lines in the src/com/martinborjesson/o2xtouchlednotifications/touchled/TouchLED.java file:

That is what happened with previous commits to add support for new devices, I still haven't had time to set up an android SDK environment yet, so haven't done any proper testing.

That's what I thought. Briefly, this is what I've done.

In the v1, I had just modified the TouchLEDP990.java to test the existence of the new WLED_FILE (ICS) and the old, to keep compatibility. Now it works when it started as an app, but when booting, the service was always waiting for the process (su + chmod) to close. So I removed the process.waitFor, because adding an "exit\n" doesn't do it. (The new process wouldn't end.) So now the service starts, but it does nothing. I believe it is because the hasPermission returned false since the native process didn't wait the chmod to be done. So, I had to make the hasPermission return always true, otherwise the service wouldn't wait for chmod to be done.

So I did change the touchled file, and modified the superuser.java to remove the process wait. If you have the time to find another solution, good luck!
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes