CipherLab RK25 User Manual page 91

Android programming
Hide thumbs Also See for RK25:
Table of Contents

Advertisement

sd = (Button)findViewById(R.id.button1);
sd.setOnClickListener(new OnClickListener() {
}
// Here is the launch OS Update with intent examples
public void SD_Update()
{
Intent SDIntent = new Intent();
SDIntent.setClassName("com.cipherlab.otaupdate","com.cipherlab.otaupdate.Ota
UpdateService");
//Set the SD action to be performed.
SDIntent.setAction("com.cipherlab.OtaUpdateService.SD");
Bundle bundle = new Bundle();
//Add update path to the intent.
bundle.putString("Data_SDPath", "/storage/sdcard1/
RS31.GMS.2020.20170513.sdupgrade.zip");
SDIntent.putExtras(bundle);
startService(SDIntent);
}
// create a BroadcastReceiver for receiving intents from OS Update service
private final BroadcastReceiver myReceiver_return = new BroadcastReceiver()
{
@Override
public void onReceive(Context context, Intent intent)
{
if(intent.getAction().equals("com.cipherlab.OtaUpdateService.ErrorMessage"))
@Override
public void onClick(View v) {
// call OS Update sample code
SD_Update();
}
});
// Error message must receive this intent message
Chapter 3 OS Update
83

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents