Android nordic dfu notification activity.
package com.main.device.dfu;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import com.main.activities.MainActivity;
public class DFUNotificationActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (isTaskRoot()) {
final Intent intent = new Intent(this, MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtras(getIntent().getExtras()); // copy all extras
startActivity(intent);
}
finish();
}
}