Jump to content

App to flash the keypad lights when you receive a text.


Guest Timmmm
 Share

Recommended Posts

Aha, fixed it. I had just not added permission to use wakelocks. Source coming soon, (let me just clean it up & document it a bit). New version attached to the initial post.

Link to comment
Share on other sites

Aha, fixed it. I had just not added permission to use wakelocks. Source coming soon, (let me just clean it up & document it a bit). New version attached to the initial post.

For some reason it locks up for me. Is there anything what needs to be done except the chmod?

Link to comment
Share on other sites

Hmm strange. Well, if you have a task/file manager that can look at running services (e.g. ASTRO), and there is one called Pulse Lights, then it should be working.

Link to comment
Share on other sites

Ok, I have found out why it was crashing, and although it was a bug it was totally *not my fault*. Rather, it is a result of the completely s*** documentation of the Android SDK. It is truly dire. The app uses a thing called a 'wakelock' to keep the CPU awake while flashing the lights. When the flashing stops it releases the lock so the CPU can go to sleep, however for whatever reason it sometimes did this twice, without locking it inbetween. Apparently this is a good enough reason for Android to KILL YOUR APP. Even though it doesn't mention this AT ALL in the documentation:

http://developer.android.com/reference/and....html#release()

That page contains more examples of the absent documentation - isHeld() has no documentation (although it is pretty clear what it does). But what the hell does setReferenceCounted() do? The docs say it "Sets whether the wakelock is ref counted". Wow thanks, that has really informed me more than the method name itself. Useless.

Anyway, I've fixed it and it now really works . New version attached here (sorry I forgot to change the version number so you might have to uninstall the old one first).

-Angry Tim

PulseLights1.4.apk.zip

Link to comment
Share on other sites

  • 2 weeks later...
force close on boot for me

Am I missing something? Why do we need the lights to flash when a text arrives when the screen/text alert box lights up anyway?

Link to comment
Share on other sites

Is it possible to make it flashing for missing call or for other notification?

Yep, but I'm a bit fed up with the stupid android API. I'm going to post the source code and then maybe someone can add it. Same goes for the force-close and the fact that it *still* doesn't seem to work properly on my phone.

Reasons the Android API is crap:

* It's Java. 'nuff said.

* The documentation is s***. I mean *really* s***. s*** as in the code explicitly says some things won't work, but the documentation says they will.

* The application model is insanely complicated.

* You never know which of the possibly many threads your code is running in, and whether it can be long lived, modify the UI and so on.

* Stupid things like this: http://developer.android.com/intl/de/resou...mory-leaks.html

* Not the API, but Eclipse is a big pile of excrement. Slow, fat, and its UI resembles the antithesis of logic.

</rant>

Link to comment
Share on other sites

Yep, but I'm a bit fed up with the stupid android API. I'm going to post the source code and then maybe someone can add it. Same goes for the force-close and the fact that it *still* doesn't seem to work properly on my phone.

Reasons the Android API is crap:

* It's Java. 'nuff said.

* The documentation is s***. I mean *really* s***. s*** as in the code explicitly says some things won't work, but the documentation says they will.

* The application model is insanely complicated.

* You never know which of the possibly many threads your code is running in, and whether it can be long lived, modify the UI and so on.

* Stupid things like this: http://developer.android.com/intl/de/resou...mory-leaks.html

* Not the API, but Eclipse is a big pile of excrement. Slow, fat, and its UI resembles the antithesis of logic.

</rant>

yes in these day i'm looking some source code for android...and it really s***...if you can post the source code maby some one can fix it...for me a led indicator will be very important...thank for your amazing work...

Link to comment
Share on other sites

  • 2 weeks later...

yes...is there someone that can check this code...this application is too important for me...there will be a way to "listen" if some application is making flash the trackball in a htc g2 and that signal making flashing our keypad...is this a stupid thing to say?

Link to comment
Share on other sites

The best way to fix this (and also handle other notifications) is to compile a replacement liblights. It may be a pain to get the source and compile it though. Some is in platform/hardware/msm7k but I'm pretty sure you need more...

I might have a go at some point.

Link to comment
Share on other sites

Hi Tim,

Just running your app in the debugger now, and one issue I've caught is "Receiver not registered", which might be the cause of one of the force closes. I'll see if I can fix it and send an update.

Dave

Update: Possible false alarm, app was exiting because it couldn't chmod the brightness device in the emulator.

Edited by david_dawkins
Link to comment
Share on other sites

  • 1 month later...

I know a little old now, but does this work ?

I guess you could all say, come on now dave try it and find out. But I am a bit weary of hurting my little pulse-y

Ha, or I am being lazy.

:)

Link to comment
Share on other sites

Hmm well I have tried it, but am I being really silly, I cant see anything happening. Only testing by sending a text to myself (how sad) but there is no change.

I am rooted and have allowed access... ?

Link to comment
Share on other sites

Sorry I never got it to work properly and google are sending me a free nexus one so I probably won't have a pulse much longer.

OK, please explain the "google are sending me a free nexus one" bit.. where do I apply? :)

Link to comment
Share on other sites

OK, please explain the "google are sending me a free nexus one" bit.. where do I apply? :)

If you're a developer with an app that has over 5000 downloads and an average rating of over 3.5 ... you get one? I think?

I have a great idea for an app. I'm just too lazy to make it =P

Link to comment
Share on other sites

If you're a developer with an app that has over 5000 downloads and an average rating of over 3.5 ... you get one? I think?

I have a great idea for an app. I'm just too lazy to make it =P

Well you make it, and I will download it 5,000 times and we have a time share on the nexus one - how about that for a deal :)

Link to comment
Share on other sites

If you're a developer with an app that has over 5000 downloads and an average rating of over 3.5 ... you get one? I think?

I have a great idea for an app. I'm just too lazy to make it =P

Ah OK. I have an app in the making, I should get on and finish it...

Link to comment
Share on other sites

  • 1 month later...
I would really love this app to work

green for mail

red for sms

or any other combo, any progress?

It's actually already been suggested, and if I'm right, the lights are 2 LEDs but only seen but the phone as 1 light, if you get what I mean. So no independant control.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.