Hi I am now aiming to progress ota with android application.
Following the guidelines on ithub, I created a class DfuService, NotificationActivity. The class internal code has not been modified.
It works when the button is pressed as shown below. But I couldn't see any logs and it doesn't work.
Is there any other way? Do you need to modify nordic module(nRF) code to ota with dfu library?
otaStartButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final File root = new File(Environment.getExternalStorageDirectory(), "Nordic Semiconductor");
final DfuServiceInitiator starter = new DfuServiceInitiator(SwitchDeviceMac)
.setDeviceName(SwitchDeviceName)
.setKeepBond(false);
starter.createDfuNotificationChannel(OTA.this);
starter.setUnsafeExperimentalButtonlessServiceInSecureDfuEnabled(false);
starter.setPrepareDataObjectDelay(300L);
starter.setZip(null, root.getPath());
final DfuServiceController controller = starter.start(OTA.this, DfuService.class);
}
});