Hey Guys,
I am currently running the latest CM7.2 nightly by maniac103 on my Motorola Defy.
CM7 usually has a special modified Nexus One Torch integrated, whose packagename is "net.cactii.flash2".
As I would like to assign a torch-toggle to a slider in widgetlocker, I need the torch-app to provide a shortcut/activity since it only offers a toggle-widget.
I am talking about the app-specific shortcuts not the shortcuts that directly link to an app.
EDIT: The reason why I haven't put this in Q&A is that this is hopefully going to be a mod, so it may save the mods some time for not needing to push it to another forum...
I may have already found out that the receiver the torch uses is called "net.cactii.flash2.TorchSwitch" and the intent it expects is "net.cactii.flash2.TOGGLE_FLASHLIGHT".
I am not sure though, if I got this whole Intent-/Receiver-thingy right... Any corrections are appreciated.
From this tutorial I have learnt, that apps provide these shortcut-entries in their AndroidManifest.xml. I should be able to modify, recompile and sign this apk.
I just don't know exactly, how I have to add this to the AndroidManifest.xml in terms of syntax and language. That's where I need help...
EDIT: Here's the code of the AndroidManifest.xml for quick review:
Before you tell me now, that I should use a different flashlight-app: I was already using TeslaLED which runs well with WidgetLocker.
However, the in-built torch offers a high brightness-mode that I want to use. Additionally, TeslaLED always needs 2-3 seconds to activate the flashlight, unlike Torch, which usually toggles instantly...
I have appended the torch-apk, as well as the AndroidManifest.xml I want to modify.
Here is an additional link (from another dev), which shows shortly, how the torch app works together with a statusbar-toggle, if that helps in any way...
Summary of what is needed: A mod for net.cactii.flash2's AndroidManifest.xml which provides a high brightness flashlight toggle-shortcut
If you potentially know how to write this short piece of code and you just want to know how android handles these shortcuts, please read this tutorial. It's very short and helpful.
EDIT: Alternatively we could try to make Torch listen to TeslaLED's intents, but I think that would be more sophisticated and could lead to problems, when both apps are installed...
Thanks for any help in advance!
Greetz, Unr3aL67
I am currently running the latest CM7.2 nightly by maniac103 on my Motorola Defy.
CM7 usually has a special modified Nexus One Torch integrated, whose packagename is "net.cactii.flash2".
As I would like to assign a torch-toggle to a slider in widgetlocker, I need the torch-app to provide a shortcut/activity since it only offers a toggle-widget.
I am talking about the app-specific shortcuts not the shortcuts that directly link to an app.
EDIT: The reason why I haven't put this in Q&A is that this is hopefully going to be a mod, so it may save the mods some time for not needing to push it to another forum...
I may have already found out that the receiver the torch uses is called "net.cactii.flash2.TorchSwitch" and the intent it expects is "net.cactii.flash2.TOGGLE_FLASHLIGHT".
I am not sure though, if I got this whole Intent-/Receiver-thingy right... Any corrections are appreciated.
From this tutorial I have learnt, that apps provide these shortcut-entries in their AndroidManifest.xml. I should be able to modify, recompile and sign this apk.
I just don't know exactly, how I have to add this to the AndroidManifest.xml in terms of syntax and language. That's where I need help...
EDIT: Here's the code of the AndroidManifest.xml for quick review:
However, the in-built torch offers a high brightness-mode that I want to use. Additionally, TeslaLED always needs 2-3 seconds to activate the flashlight, unlike Torch, which usually toggles instantly...
I have appended the torch-apk, as well as the AndroidManifest.xml I want to modify.
Here is an additional link (from another dev), which shows shortly, how the torch app works together with a statusbar-toggle, if that helps in any way...
Summary of what is needed: A mod for net.cactii.flash2's AndroidManifest.xml which provides a high brightness flashlight toggle-shortcut
If you potentially know how to write this short piece of code and you just want to know how android handles these shortcuts, please read this tutorial. It's very short and helpful.
EDIT: Alternatively we could try to make Torch listen to TeslaLED's intents, but I think that would be more sophisticated and could lead to problems, when both apps are installed...
Thanks for any help in advance!
Greetz, Unr3aL67