99
11.2.4
Specification
■
Intent
(1) START intent
Package name:
Class name: jp.casio.ht.osupdateservice.StartUpdate
Extra:
(2) FINISHED message
Package name:
Class name: jp.casio.ht.osupdateservice.finishupdate
Extra:
■
How to issue the START intent
Application creates an Intent specifying the package name, class name, and extra and
invokes startActivity to call the OSUpdateService.
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setClassName("jp.casio.ht.
osupdateservice
",
"
jp.casio.ht.
osupdateservice
.StartUpdate");
Uri uri = Uri.parse(“PATH to the OS image file”);
intent.setData(uri);
startActivity(intent);
■
How to receive FINISHED intent
Receive a broadcast message ( i.e. "jp.casio.ht.remoteupdate.finishupdate" ) using the
broadcast receiver of the application.
FinishBroadcastReceiver receiver = new FinishBroadcastReceiver();
IntentFilter intentFilter= new
IntentFilter("jp.casio.ht.
osupdateservice
.finishupdate");
registerReceiver(receiver, intentFilter);
…
class FinishBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Bundle bundle = intent.getExtras();
String result: = bundle.getString("result");
}
}
■
Execution result can be judged by bundled result.
-1
OS update image file is not valid.
0
Update was completed normally.
1
Specified update has already been applied.
2
OS update service internal error.
Содержание IT-G400 Series
Страница 8: ...6 2 2 Languages 2 2 1 List of supported languages ...
Страница 56: ...54 3 15 Notes Notepad Delete menu Open created note Create new note Select note to be deleted Delete all notes ...
Страница 58: ...56 4 Settings 4 1 List of softwares Icon Software name Settings ...
Страница 98: ...96 When update is completed it will restart automatically ...
Страница 104: ...102 5 Recive FINISHED message and show log file ...