but…it worked only one or two times…i try to explain…i gave 25 seconds,compiled the apk,installed,launch and…tadahhhhhh…timer set to 25 seconds!!.almost fell off my chair!! …
but…every time i go back to app,and press b_start again, it doesnt work…call the timer,but ignore ExtraValue.
Rebuilt inAI,changin seconds to 30…noway…00 again…then i add the extra_skip…true,false…and after some attempts…it works,but with 25 seconds…
im getting mad !!..
.according to:
“public static final String ACTION_SET_TIMER
Activity Action: Set a timer.
Activates an existing timer or creates a new one.
This action requests a timer to be started for a specific length of time. If no length is specified, the implementation should start an activity that is capable of setting a timer (EXTRA_SKIP_UI is ignored in this case). If a length is specified, and EXTRA_SKIP_UI is true, the implementation should remove this timer after it has been dismissed. If an identical, unused timer exists matching both parameters, an implementation may re-use it instead of creating a new one (in this case, the timer should not be removed after dismissal). This action always starts the timer.”
so it seems the skip_ui the problem…
another problem is that the timer doesnt fire…it call the timer but doesnt start it…sooo…lot of problem so far…
your blocks look strange... but if it works it's fine...
you are using the deprecated ExtraValue property which usually has been used together with the ExtraKey property... ExtraKey would be EXTRA_LENGTH and ExtraValue would be 30 in the example
why don't you use the Extras property together with lists of lists correctly?
the SKIP UI expects a boolean value and the default acrivity starter is not able to do that... see again what I said earlier
Taifun
PS: I probably will add the Set Timer method into the alarm extension if I find some time...
I think the problem is merely the syntax and how the AI2 AS translate (compile) the text into code..
"EXTRA_LENGTH"..with or without "".??..with the comma or without? the number should be passed as text or number??....we have to prefix with the "android.intent.action." for every extras..????
and so on..
We need a documentation for the ActivityStarter component that explain HOW it translate into code.
Should be nice to "open" the generated apk and see inside..
but im not a programmer..so my adventure ends here..
it's hard to experiment when you have so few clues bout a language..
now..i decompiled the apk with a online tool..the result is a 21 MB zip with dozens of folders and subfolders:
However, it seems there is no solution in the post. After 2 years, I encounter the same problem.
ActivityStarter1.Action to > "android.intent.action.SET_TIMER"
ActivityStarter1.Extras to > make a list > make a list "android.intent.extra.alarm.LENGTH" and 120 (number)
ActivityStarter1.StartActivity
and nothing setup. (I have edited the manifest to add the permission of set alarm)
However, using TaifunAlarm extension works. So, I don't understand what is the difference.
Second question:
is it possible to have skip_ui in dismiss_alarm action? or any ways to dismiss alarm and switch back to the own app?
Here is the screenshot. If no Extras, it will open the clock, but when there is extras, it has nothing pop out or timer setup.
I have also tired 120(number), "120"(string), still the same behaviour
Thank you very much your suggestions!
I would like to learn why my own problem didn't but the extension works, you suggested a good way for me to explore more.
May I switch to another question here:
Can we "delete" system alarm instead only dismiss it?
Can we dismiss alarm without UI or auto switch back to app?