Hi all,
thanks for your answers.
i already found the sample "
DroidScript > Samples > Send Intent ",- that give´s me some introduction, which parameter i need.
i´m also able to open the "clock" - app by following code:
//Called when application is started.
function OnStart()
{
var packageName="com.sec.android.app.clockpackage";
var className="com.sec.android.app.clockpackage.ClockPackage";
var action ="SHOW_TIMERS";
var category = null;
var uri = null;
var type = null;
var extras = [
// {name:"android.intent.extra.alarm.EXTRA_HOUR", type:"integer",value:"17"},
// {name:"android.intent.extra.alarm.EXTRA_MINUTES", type:"integer", value:"00"}
// {name:"android.intent.extra.alarm.LENGTH",type:"integer",value:"30000"}
//{name:"android.intent.extra.alarm.MESSAGE",type:"string",value:"testest"}
];
extras = JSON.stringify( extras );
app.SendIntent( packageName, className, action, category, uri, type, extras )
}
unfortunately, only the clock app opens, but the app don´t change in the right tab nor set the timer or alarm entry.
so, something about the para list isnt correct.
@Dave: i already checked the docs ( link:
https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_TIMER) ,- it should be an "integer",- but also tried
*)"number", "int" , "integer" (leave "type" away)
*) leave the quotes away from "value" and/or "type"
some information, is getting me also struggling:
the docs are talking about a constant value "Constant Value: "android.intent.extra.alarm.HOUR".
but the headline of the parameter is "public static final
String EXTRA_HOUR"
1.) what is the correct variable - name finally? ( HOUR or EXTRA_HOUR)
2.) what´s the correct data type ? String?(= from my opinion, the vlaues have to be with quotes) or integer?
very confusing this topic... ( but we are talking about just setting a alarm... what about real complicate app - intents ? :-O)
rgds
Bernhard