2739 lines
132 KiB
HTML
2739 lines
132 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (1.8.0_152-release) on Fri Oct 06 17:56:11 CEST 2017 -->
|
|
<title>DfuBaseService</title>
|
|
<meta name="date" content="2017-10-06">
|
|
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
|
<script type="text/javascript" src="../../../../script.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="DfuBaseService";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":10,"i1":10,"i2":10,"i3":6,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/BuildConfig.html" title="class in no.nordicsemi.android.dfu"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuController.html" title="interface in no.nordicsemi.android.dfu"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?no/nordicsemi/android/dfu/DfuBaseService.html" target="_top">Frames</a></li>
|
|
<li><a href="DfuBaseService.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">no.nordicsemi.android.dfu</div>
|
|
<h2 title="Class DfuBaseService" class="title">Class DfuBaseService</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>android.content.Context</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>android.content.ContextWrapper</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>android.app.Service</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>android.app.IntentService</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>no.nordicsemi.android.dfu.DfuBaseService</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Implemented Interfaces:</dt>
|
|
<dd>android.content.ComponentCallbacks, android.content.ComponentCallbacks2</dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public abstract class <span class="typeNameLabel">DfuBaseService</span>
|
|
extends android.app.IntentService</pre>
|
|
<div class="block">The DFU Service provides full support for Over-the-Air (OTA) Device Firmware Update (DFU) by Nordic Semiconductor.
|
|
With the Soft Device 7.0.0+ it allows to upload a new Soft Device, new Bootloader and a new Application. For older soft devices only the Application update is supported.
|
|
<p>
|
|
To run the service to your application extend it in your project and overwrite the missing method. Remember to add your class to the AndroidManifest.xml file.
|
|
</p>
|
|
<p>
|
|
The <a href="../../../../no/nordicsemi/android/dfu/DfuServiceInitiator.html" title="class in no.nordicsemi.android.dfu"><code>DfuServiceInitiator</code></a> object should be used to start the DFU Service.
|
|
</p>
|
|
<pre>
|
|
final DfuServiceInitiator starter = new DfuServiceInitiator(mSelectedDevice.getAddress())
|
|
.setDeviceName(mSelectedDevice.getName())
|
|
.setKeepBond(keepBond)
|
|
.setZip(mFileStreamUri, mFilePath)
|
|
.start(this, DfuService.class);
|
|
</pre>
|
|
<p>
|
|
You may register the progress and log listeners using the <a href="../../../../no/nordicsemi/android/dfu/DfuServiceListenerHelper.html" title="class in no.nordicsemi.android.dfu"><code>DfuServiceListenerHelper</code></a> helper class. See <a href="../../../../no/nordicsemi/android/dfu/DfuProgressListener.html" title="interface in no.nordicsemi.android.dfu"><code>DfuProgressListener</code></a> and <a href="../../../../no/nordicsemi/android/dfu/DfuLogListener.html" title="interface in no.nordicsemi.android.dfu"><code>DfuLogListener</code></a> for
|
|
more information.
|
|
</p>
|
|
<p>
|
|
The service will show its progress on the notification bar and will send local broadcasts to the application.
|
|
</p></div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
|
|
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Field and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ACTION_ABORT">ACTION_ABORT</a></span></code>
|
|
<div class="block">Aborts the upload.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ACTION_PAUSE">ACTION_PAUSE</a></span></code>
|
|
<div class="block">Pauses the upload.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ACTION_RESUME">ACTION_RESUME</a></span></code>
|
|
<div class="block">Resumes the upload that has been paused before using <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ACTION_PAUSE"><code>ACTION_PAUSE</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#BROADCAST_ACTION">BROADCAST_ACTION</a></span></code>
|
|
<div class="block">Activity may broadcast this broadcast in order to pause, resume or abort DFU process.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#BROADCAST_ERROR">BROADCAST_ERROR</a></span></code>
|
|
<div class="block">The broadcast error message contains the following extras:
|
|
|
|
<a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_DATA"><code>EXTRA_DATA</code></a> - the error number.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#BROADCAST_LOG">BROADCAST_LOG</a></span></code>
|
|
<div class="block">The log events are only broadcast when there is no nRF Logger installed.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#BROADCAST_PROGRESS">BROADCAST_PROGRESS</a></span></code>
|
|
<div class="block">The broadcast message contains the following extras:
|
|
|
|
<a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_DATA"><code>EXTRA_DATA</code></a> - the progress value (percentage 0-100) or:
|
|
|
|
<a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_CONNECTING"><code>PROGRESS_CONNECTING</code></a>
|
|
<a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_STARTING"><code>PROGRESS_STARTING</code></a>
|
|
<a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_ENABLING_DFU_MODE"><code>PROGRESS_ENABLING_DFU_MODE</code></a>
|
|
<a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_VALIDATING"><code>PROGRESS_VALIDATING</code></a>
|
|
<a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_DISCONNECTING"><code>PROGRESS_DISCONNECTING</code></a>
|
|
<a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_COMPLETED"><code>PROGRESS_COMPLETED</code></a>
|
|
<a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_ABORTED"><code>PROGRESS_ABORTED</code></a>
|
|
|
|
|
|
<a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_DEVICE_ADDRESS"><code>EXTRA_DEVICE_ADDRESS</code></a> - the target device address
|
|
<a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_PART_CURRENT"><code>EXTRA_PART_CURRENT</code></a> - the number of currently transmitted part
|
|
<a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_PARTS_TOTAL"><code>EXTRA_PARTS_TOTAL</code></a> - total number of parts that are being sent, f.e.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#DFU_STATUS_CRC_ERROR">DFU_STATUS_CRC_ERROR</a></span></code>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#DFU_STATUS_DATA_SIZE_EXCEEDS_LIMIT">DFU_STATUS_DATA_SIZE_EXCEEDS_LIMIT</a></span></code>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#DFU_STATUS_INVALID_STATE">DFU_STATUS_INVALID_STATE</a></span></code>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#DFU_STATUS_NOT_SUPPORTED">DFU_STATUS_NOT_SUPPORTED</a></span></code>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#DFU_STATUS_OPERATION_FAILED">DFU_STATUS_OPERATION_FAILED</a></span></code>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#DFU_STATUS_SUCCESS">DFU_STATUS_SUCCESS</a></span></code>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_BLUETOOTH_DISABLED">ERROR_BLUETOOTH_DISABLED</a></span></code>
|
|
<div class="block">Thrown when the the Bluetooth adapter is disabled.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_CHARACTERISTICS_NOT_FOUND">ERROR_CHARACTERISTICS_NOT_FOUND</a></span></code>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="block"><span class="deprecationComment">This error will no longer be thrown. <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_SERVICE_NOT_FOUND"><code>ERROR_SERVICE_NOT_FOUND</code></a> will be thrown instead.</span></div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_CONNECTION_MASK">ERROR_CONNECTION_MASK</a></span></code>
|
|
<div class="block">The flag set when one of <code>BluetoothGattCallback</code> methods was called with status other than <code>BluetoothGatt.GATT_SUCCESS</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_CONNECTION_STATE_MASK">ERROR_CONNECTION_STATE_MASK</a></span></code>
|
|
<div class="block">The flag set when the <code>BluetoothGattCallback.onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int)</code> method was called with
|
|
status other than <code>BluetoothGatt.GATT_SUCCESS</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_CRC_ERROR">ERROR_CRC_ERROR</a></span></code>
|
|
<div class="block">Thrown when the received CRC does not match with the calculated one.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_DEVICE_DISCONNECTED">ERROR_DEVICE_DISCONNECTED</a></span></code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_DEVICE_NOT_BONDED">ERROR_DEVICE_NOT_BONDED</a></span></code>
|
|
<div class="block">Thrown when device had to be paired before the DFU process was started.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_FILE_ERROR">ERROR_FILE_ERROR</a></span></code>
|
|
<div class="block">Thrown if service was unable to open the file (<code>IOException</code> has been thrown).</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_FILE_INVALID">ERROR_FILE_INVALID</a></span></code>
|
|
<div class="block">Thrown when input file is not a valid HEX or ZIP file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_FILE_IO_EXCEPTION">ERROR_FILE_IO_EXCEPTION</a></span></code>
|
|
<div class="block">Thrown when <code>IOException</code> occurred when reading from file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_FILE_NOT_FOUND">ERROR_FILE_NOT_FOUND</a></span></code> </td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_FILE_SIZE_INVALID">ERROR_FILE_SIZE_INVALID</a></span></code>
|
|
<div class="block">Thrown when the firmware file is not word-aligned.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_FILE_TYPE_UNSUPPORTED">ERROR_FILE_TYPE_UNSUPPORTED</a></span></code>
|
|
<div class="block">Thrown when the the service does not support given type or mime-type.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_INIT_PACKET_REQUIRED">ERROR_INIT_PACKET_REQUIRED</a></span></code>
|
|
<div class="block">DFU Bootloader version 0.6+ requires sending the Init packet.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_INVALID_RESPONSE">ERROR_INVALID_RESPONSE</a></span></code>
|
|
<div class="block">Thrown when unknown response has been obtained from the target.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_MASK">ERROR_MASK</a></span></code>
|
|
<div class="block">If this bit is set than the progress value indicates an error.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_REMOTE_MASK">ERROR_REMOTE_MASK</a></span></code>
|
|
<div class="block">Flag set when the DFU target returned a DFU error.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_SERVICE_DISCOVERY_NOT_STARTED">ERROR_SERVICE_DISCOVERY_NOT_STARTED</a></span></code>
|
|
<div class="block">Error thrown when <code>gatt.discoverServices();</code> returns false.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_SERVICE_NOT_FOUND">ERROR_SERVICE_NOT_FOUND</a></span></code>
|
|
<div class="block">Thrown when the service discovery has finished but the DFU service has not been found.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_TYPE_COMMUNICATION">ERROR_TYPE_COMMUNICATION</a></span></code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_TYPE_COMMUNICATION_STATE">ERROR_TYPE_COMMUNICATION_STATE</a></span></code> </td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_TYPE_DFU_REMOTE">ERROR_TYPE_DFU_REMOTE</a></span></code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_TYPE_OTHER">ERROR_TYPE_OTHER</a></span></code> </td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_ACTION">EXTRA_ACTION</a></span></code>
|
|
<div class="block">The action extra.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_AVG_SPEED_B_PER_MS">EXTRA_AVG_SPEED_B_PER_MS</a></span></code>
|
|
<div class="block">The average upload speed in bytes/millisecond for the current part.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_CUSTOM_UUIDS_FOR_BUTTONLESS_DFU_WITH_BOND_SHARING">EXTRA_CUSTOM_UUIDS_FOR_BUTTONLESS_DFU_WITH_BOND_SHARING</a></span></code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_CUSTOM_UUIDS_FOR_BUTTONLESS_DFU_WITHOUT_BOND_SHARING">EXTRA_CUSTOM_UUIDS_FOR_BUTTONLESS_DFU_WITHOUT_BOND_SHARING</a></span></code> </td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_CUSTOM_UUIDS_FOR_EXPERIMENTAL_BUTTONLESS_DFU">EXTRA_CUSTOM_UUIDS_FOR_EXPERIMENTAL_BUTTONLESS_DFU</a></span></code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_CUSTOM_UUIDS_FOR_LEGACY_DFU">EXTRA_CUSTOM_UUIDS_FOR_LEGACY_DFU</a></span></code> </td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_CUSTOM_UUIDS_FOR_SECURE_DFU">EXTRA_CUSTOM_UUIDS_FOR_SECURE_DFU</a></span></code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_DATA">EXTRA_DATA</a></span></code>
|
|
<div class="block">An extra field with progress and error information used in broadcast events.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_DEVICE_ADDRESS">EXTRA_DEVICE_ADDRESS</a></span></code>
|
|
<div class="block">The address of the device to update.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_DEVICE_NAME">EXTRA_DEVICE_NAME</a></span></code>
|
|
<div class="block">The optional device name.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_DISABLE_NOTIFICATION">EXTRA_DISABLE_NOTIFICATION</a></span></code>
|
|
<div class="block">A boolean indicating whether to disable the progress notification in the status bar.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_ERROR_TYPE">EXTRA_ERROR_TYPE</a></span></code>
|
|
<div class="block">The type of the error.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_FILE_MIME_TYPE">EXTRA_FILE_MIME_TYPE</a></span></code>
|
|
<div class="block">The input file mime-type.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_FILE_PATH">EXTRA_FILE_PATH</a></span></code>
|
|
<div class="block">A path to the file with the new firmware.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_FILE_RES_ID">EXTRA_FILE_RES_ID</a></span></code>
|
|
<div class="block">See <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_FILE_PATH"><code>EXTRA_FILE_PATH</code></a> for details.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_FILE_TYPE">EXTRA_FILE_TYPE</a></span></code>
|
|
<div class="block">This optional extra parameter may contain a file type.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_FILE_URI">EXTRA_FILE_URI</a></span></code>
|
|
<div class="block">See <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_FILE_PATH"><code>EXTRA_FILE_PATH</code></a> for details.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_FORCE_DFU">EXTRA_FORCE_DFU</a></span></code>
|
|
<div class="block">This property must contain a boolean value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_INIT_FILE_PATH">EXTRA_INIT_FILE_PATH</a></span></code>
|
|
<div class="block">The Init packet URI.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_INIT_FILE_RES_ID">EXTRA_INIT_FILE_RES_ID</a></span></code>
|
|
<div class="block">The Init packet URI.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_INIT_FILE_URI">EXTRA_INIT_FILE_URI</a></span></code>
|
|
<div class="block">The Init packet URI.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_KEEP_BOND">EXTRA_KEEP_BOND</a></span></code>
|
|
<div class="block">This flag indicated whether the bond information should be kept or removed after an upgrade of the Application.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_LOG_LEVEL">EXTRA_LOG_LEVEL</a></span></code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_LOG_MESSAGE">EXTRA_LOG_MESSAGE</a></span></code> </td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_PACKET_RECEIPT_NOTIFICATIONS_ENABLED">EXTRA_PACKET_RECEIPT_NOTIFICATIONS_ENABLED</a></span></code>
|
|
<div class="block">This property must contain a boolean value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_PACKET_RECEIPT_NOTIFICATIONS_VALUE">EXTRA_PACKET_RECEIPT_NOTIFICATIONS_VALUE</a></span></code>
|
|
<div class="block">This property must contain a positive integer value, usually from range 1-200.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_PART_CURRENT">EXTRA_PART_CURRENT</a></span></code>
|
|
<div class="block">The number of currently transferred part.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_PARTS_TOTAL">EXTRA_PARTS_TOTAL</a></span></code>
|
|
<div class="block">Number of parts in total.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_PROGRESS">EXTRA_PROGRESS</a></span></code>
|
|
<div class="block">An extra field to send the progress or error information in the DFU notification.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_RESTORE_BOND">EXTRA_RESTORE_BOND</a></span></code>
|
|
<div class="block">
|
|
If the new firmware (application) does not share the bond information with the old one, the bond information is lost.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_SPEED_B_PER_MS">EXTRA_SPEED_B_PER_MS</a></span></code>
|
|
<div class="block">The current upload speed in bytes/millisecond.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_UNSAFE_EXPERIMENTAL_BUTTONLESS_DFU">EXTRA_UNSAFE_EXPERIMENTAL_BUTTONLESS_DFU</a></span></code>
|
|
<div class="block">Set this flag to true to enable experimental buttonless feature in Secure DFU.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#LOG_LEVEL_APPLICATION">LOG_LEVEL_APPLICATION</a></span></code>
|
|
<div class="block">Log entries level for applications</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#LOG_LEVEL_DEBUG">LOG_LEVEL_DEBUG</a></span></code>
|
|
<div class="block">Level used just for debugging purposes.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#LOG_LEVEL_ERROR">LOG_LEVEL_ERROR</a></span></code>
|
|
<div class="block">Log entries with very high importance, like errors</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#LOG_LEVEL_INFO">LOG_LEVEL_INFO</a></span></code>
|
|
<div class="block">Default logging level for important entries</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#LOG_LEVEL_VERBOSE">LOG_LEVEL_VERBOSE</a></span></code>
|
|
<div class="block">Log entries with minor importance</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#LOG_LEVEL_WARNING">LOG_LEVEL_WARNING</a></span></code>
|
|
<div class="block">Log entries with high importance</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#mConnectionState">mConnectionState</a></span></code>
|
|
<div class="block">The current connection state.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#MIME_TYPE_OCTET_STREAM">MIME_TYPE_OCTET_STREAM</a></span></code> </td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#MIME_TYPE_ZIP">MIME_TYPE_ZIP</a></span></code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#NOTIFICATION_CHANNEL_DFU">NOTIFICATION_CHANNEL_DFU</a></span></code> </td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#NOTIFICATION_ID">NOTIFICATION_ID</a></span></code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_ABORTED">PROGRESS_ABORTED</a></span></code>
|
|
<div class="block">The upload has been aborted.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_COMPLETED">PROGRESS_COMPLETED</a></span></code>
|
|
<div class="block">The connection is successful.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_CONNECTING">PROGRESS_CONNECTING</a></span></code>
|
|
<div class="block">Service is connecting to the remote DFU target.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_DISCONNECTING">PROGRESS_DISCONNECTING</a></span></code>
|
|
<div class="block">Service is disconnecting from the DFU target.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_ENABLING_DFU_MODE">PROGRESS_ENABLING_DFU_MODE</a></span></code>
|
|
<div class="block">Service has triggered a switch to bootloader mode.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_STARTING">PROGRESS_STARTING</a></span></code>
|
|
<div class="block">Service is enabling notifications and starting transmission.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_VALIDATING">PROGRESS_VALIDATING</a></span></code>
|
|
<div class="block">Service is sending validation request to the remote DFU target.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#STATE_CLOSED">STATE_CLOSED</a></span></code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>protected static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#STATE_CONNECTED">STATE_CONNECTED</a></span></code> </td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#STATE_CONNECTED_AND_READY">STATE_CONNECTED_AND_READY</a></span></code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>protected static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#STATE_CONNECTING">STATE_CONNECTING</a></span></code> </td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#STATE_DISCONNECTED">STATE_DISCONNECTED</a></span></code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>protected static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#STATE_DISCONNECTING">STATE_DISCONNECTING</a></span></code> </td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_APPLICATION">TYPE_APPLICATION</a></span></code>
|
|
<div class="block">
|
|
The file contains a new version of Application.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_AUTO">TYPE_AUTO</a></span></code>
|
|
<div class="block">
|
|
A ZIP file that consists of more than 1 file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_BOOTLOADER">TYPE_BOOTLOADER</a></span></code>
|
|
<div class="block">
|
|
The file contains a new version of Bootloader.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_SOFT_DEVICE">TYPE_SOFT_DEVICE</a></span></code>
|
|
<div class="block">
|
|
The file contains a new version of Soft Device.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="fields.inherited.from.class.android.app.Service">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Fields inherited from class android.app.Service</h3>
|
|
<code>START_CONTINUATION_MASK, START_FLAG_REDELIVERY, START_FLAG_RETRY, START_NOT_STICKY, START_REDELIVER_INTENT, START_STICKY, START_STICKY_COMPATIBILITY, STOP_FOREGROUND_DETACH, STOP_FOREGROUND_REMOVE</code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="fields.inherited.from.class.android.content.Context">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Fields inherited from class android.content.Context</h3>
|
|
<code>ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, APP_OPS_SERVICE, APPWIDGET_SERVICE, AUDIO_SERVICE, BATTERY_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_EXTERNAL_SERVICE, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, BLUETOOTH_SERVICE, CAMERA_SERVICE, CAPTIONING_SERVICE, CARRIER_CONFIG_SERVICE, CLIPBOARD_SERVICE, COMPANION_DEVICE_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, FINGERPRINT_SERVICE, HARDWARE_PROPERTIES_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, JOB_SCHEDULER_SERVICE, KEYGUARD_SERVICE, LAUNCHER_APPS_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_PROJECTION_SERVICE, MEDIA_ROUTER_SERVICE, MEDIA_SESSION_SERVICE, MIDI_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_NO_LOCALIZED_COLLATORS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NETWORK_STATS_SERVICE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE, RECEIVER_VISIBLE_TO_INSTANT_APPS, RESTRICTIONS_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, SHORTCUT_SERVICE, STORAGE_SERVICE, STORAGE_STATS_SERVICE, SYSTEM_HEALTH_SERVICE, TELECOM_SERVICE, TELEPHONY_SERVICE, TELEPHONY_SUBSCRIPTION_SERVICE, TEXT_CLASSIFICATION_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TV_INPUT_SERVICE, UI_MODE_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_AWARE_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE</code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="fields.inherited.from.class.android.content.ComponentCallbacks2">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Fields inherited from interface android.content.ComponentCallbacks2</h3>
|
|
<code>TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#DfuBaseService--">DfuBaseService</a></span>()</code> </td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>protected void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#close-android.bluetooth.BluetoothGatt-">close</a></span>(android.bluetooth.BluetoothGatt gatt)</code>
|
|
<div class="block">Closes the GATT device and cleans up.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>protected android.bluetooth.BluetoothGatt</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#connect-java.lang.String-">connect</a></span>(java.lang.String address)</code>
|
|
<div class="block">Connects to the BLE device with given address.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>protected void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#disconnect-android.bluetooth.BluetoothGatt-">disconnect</a></span>(android.bluetooth.BluetoothGatt gatt)</code>
|
|
<div class="block">Disconnects from the device.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>protected abstract java.lang.Class<? extends android.app.Activity></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#getNotificationTarget--">getNotificationTarget</a></span>()</code>
|
|
<div class="block">This method must return the activity class that will be used to create the pending intent used as a content intent in the notification showing the upload progress.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>protected boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#isDebug--">isDebug</a></span>()</code>
|
|
<div class="block">Override this method to enable detailed debug LogCat logs with DFU events.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#onCreate--">onCreate</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#onDestroy--">onDestroy</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>protected void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#onHandleIntent-android.content.Intent-">onHandleIntent</a></span>(android.content.Intent intent)</code> </td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#onTaskRemoved-android.content.Intent-">onTaskRemoved</a></span>(android.content.Intent rootIntent)</code> </td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>protected void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#refreshDeviceCache-android.bluetooth.BluetoothGatt-boolean-">refreshDeviceCache</a></span>(android.bluetooth.BluetoothGatt gatt,
|
|
boolean force)</code>
|
|
<div class="block">Clears the device cache.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>protected void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#terminateConnection-android.bluetooth.BluetoothGatt-int-">terminateConnection</a></span>(android.bluetooth.BluetoothGatt gatt,
|
|
int error)</code>
|
|
<div class="block">Disconnects from the device and cleans local variables in case of error.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#updateProgressNotification--">updateProgressNotification</a></span>()</code>
|
|
<div class="block">Creates or updates the notification in the Notification Manager.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>protected void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#waitFor-int-">waitFor</a></span>(int millis)</code>
|
|
<div class="block">Wait for given number of milliseconds.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>protected void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#waitUntilDisconnected--">waitUntilDisconnected</a></span>()</code>
|
|
<div class="block">Wait until the connection state will change to <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#STATE_DISCONNECTED"><code>STATE_DISCONNECTED</code></a> or until an error occurs.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.android.app.IntentService">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class android.app.IntentService</h3>
|
|
<code>onBind, onStart, onStartCommand, setIntentRedelivery</code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.android.app.Service">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class android.app.Service</h3>
|
|
<code>dump, getApplication, onConfigurationChanged, onLowMemory, onRebind, onTrimMemory, onUnbind, startForeground, stopForeground, stopForeground, stopSelf, stopSelf, stopSelfResult</code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.android.content.ContextWrapper">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class android.content.ContextWrapper</h3>
|
|
<code>attachBaseContext, bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createContextForSplit, createDeviceProtectedStorageContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, deleteSharedPreferences, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDatabasePath, getDataDir, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFilesDir, getFileStreamPath, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getSystemService, getSystemServiceName, getTheme, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isDeviceProtectedStorage, isRestricted, moveDatabaseFrom, moveSharedPreferencesFrom, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setTheme, setWallpaper, setWallpaper, startActivities, startActivities, startActivity, startActivity, startForegroundService, startInstrumentation, startIntentSender, startIntentSender, startService, stopService, unbindService, unregisterReceiver</code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.android.content.Context">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class android.content.Context</h3>
|
|
<code>getColor, getColorStateList, getDrawable, getString, getString, getSystemService, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, registerComponentCallbacks, unregisterComponentCallbacks</code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.Object</h3>
|
|
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Detail</h3>
|
|
<a name="NOTIFICATION_ID">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>NOTIFICATION_ID</h4>
|
|
<pre>public static final int NOTIFICATION_ID</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.NOTIFICATION_ID">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="NOTIFICATION_CHANNEL_DFU">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>NOTIFICATION_CHANNEL_DFU</h4>
|
|
<pre>public static final java.lang.String NOTIFICATION_CHANNEL_DFU</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.NOTIFICATION_CHANNEL_DFU">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_DEVICE_ADDRESS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_DEVICE_ADDRESS</h4>
|
|
<pre>public static final java.lang.String EXTRA_DEVICE_ADDRESS</pre>
|
|
<div class="block">The address of the device to update.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_DEVICE_ADDRESS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_DEVICE_NAME">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_DEVICE_NAME</h4>
|
|
<pre>public static final java.lang.String EXTRA_DEVICE_NAME</pre>
|
|
<div class="block">The optional device name. This name will be shown in the notification.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_DEVICE_NAME">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_DISABLE_NOTIFICATION">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_DISABLE_NOTIFICATION</h4>
|
|
<pre>public static final java.lang.String EXTRA_DISABLE_NOTIFICATION</pre>
|
|
<div class="block">A boolean indicating whether to disable the progress notification in the status bar. Defaults to false.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_DISABLE_NOTIFICATION">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_RESTORE_BOND">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_RESTORE_BOND</h4>
|
|
<pre>public static final java.lang.String EXTRA_RESTORE_BOND</pre>
|
|
<div class="block"><p>
|
|
If the new firmware (application) does not share the bond information with the old one, the bond information is lost. Set this flag to <code>true</code>
|
|
to make the service create new bond with the new application when the upload is done (and remove the old one). When set to <code>false</code> (default),
|
|
the DFU service assumes that the LTK is shared between them. Note: currently it is not possible to remove the old bond without creating a new one so if
|
|
your old application supported bonding while the new one does not you have to modify the source code yourself.
|
|
</p>
|
|
<p>
|
|
In case of updating the soft device the application is always removed together with the bond information.
|
|
</p>
|
|
<p>
|
|
Search for occurrences of EXTRA_RESTORE_BOND in this file to check the implementation and get more details.
|
|
</p></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_RESTORE_BOND">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_KEEP_BOND">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_KEEP_BOND</h4>
|
|
<pre>public static final java.lang.String EXTRA_KEEP_BOND</pre>
|
|
<div class="block"><p>This flag indicated whether the bond information should be kept or removed after an upgrade of the Application.
|
|
If an application is being updated on a bonded device with the DFU Bootloader that has been configured to preserve the bond information for the new application,
|
|
set it to <code>true</code>.</p>
|
|
|
|
<p>By default the Legacy DFU Bootloader clears the whole application's memory. It may be however configured in the \Nordic\nrf51\components\libraries\bootloader_dfu\dfu_types.h
|
|
file (sdk 11, line 76: <code>#define DFU_APP_DATA_RESERVED 0x0000</code>) to preserve some pages. The BLE_APP_HRM_DFU sample app stores the LTK and System Attributes in the first
|
|
two pages, so in order to preserve the bond information this value should be changed to 0x0800 or more. For Secure DFU this value is by default set to 3 pages.
|
|
When those data are preserved, the new Application will notify the app with the Service Changed indication when launched for the first time. Otherwise this
|
|
service will remove the bond information from the phone and force to refresh the device cache (see <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#refreshDeviceCache-android.bluetooth.BluetoothGatt-boolean-"><code>refreshDeviceCache(android.bluetooth.BluetoothGatt, boolean)</code></a>).</p>
|
|
|
|
<p>In contrast to <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_RESTORE_BOND"><code>EXTRA_RESTORE_BOND</code></a> this flag will not remove the old bonding and recreate a new one, but will keep the bond information untouched.</p>
|
|
<p>The default value of this flag is <code>false</code></p></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_KEEP_BOND">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_FORCE_DFU">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_FORCE_DFU</h4>
|
|
<pre>public static final java.lang.String EXTRA_FORCE_DFU</pre>
|
|
<div class="block">This property must contain a boolean value.
|
|
<p>The <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html" title="class in no.nordicsemi.android.dfu"><code>DfuBaseService</code></a>, when connected to a DFU target will check whether it is in application or in DFU bootloader mode. For DFU implementations from SDK 7.0 or newer
|
|
this is done by reading the value of DFU Version characteristic. If the returned value is equal to 0x0100 (major = 0, minor = 1) it means that we are in the application mode and
|
|
jump to the bootloader mode is required.
|
|
<p>However, for DFU implementations from older SDKs, where there was no DFU Version characteristic, the service must guess. If this option is set to false (default) it will count
|
|
number of device's services. If the count is equal to 3 (Generic Access, Generic Attribute, DFU Service) it will assume that it's in DFU mode. If greater than 3 - in app mode.
|
|
This guessing may not be always correct. One situation may be when the nRF chip is used to flash update on external MCU using DFU. The DFU procedure may be implemented in the
|
|
application, which may (and usually does) have more services. In such case set the value of this property to true.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_FORCE_DFU">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_UNSAFE_EXPERIMENTAL_BUTTONLESS_DFU">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_UNSAFE_EXPERIMENTAL_BUTTONLESS_DFU</h4>
|
|
<pre>public static final java.lang.String EXTRA_UNSAFE_EXPERIMENTAL_BUTTONLESS_DFU</pre>
|
|
<div class="block">Set this flag to true to enable experimental buttonless feature in Secure DFU. When the
|
|
experimental Buttonless DFU Service is found on a device, the service will use it to
|
|
switch the device to the bootloader mode, connect to it in that mode and proceed with DFU.
|
|
<p>
|
|
<b>Please, read the information below before setting it to true.</b>
|
|
<p>
|
|
In the SDK 12.x the Buttonless DFU feature for Secure DFU was experimental.
|
|
It is NOT recommended to use it: it was not properly tested, had implementation bugs
|
|
(e.g. https://devzone.nordicsemi.com/question/100609/sdk-12-bootloader-erased-after-programming/) and
|
|
does not required encryption and therefore may lead to DOS attack (anyone can use it to switch the device
|
|
to bootloader mode). However, as there is no other way to trigger bootloader mode on devices
|
|
without a button, this DFU Library supports this service, but the feature must be explicitly enabled here.
|
|
Be aware, that setting this flag to false will no protect your devices from this kind of attacks, as
|
|
an attacker may use another app for that purpose. To be sure your device is secure remove this
|
|
experimental service from your device.
|
|
<p>
|
|
<b>Spec:</b><br>
|
|
Buttonless DFU Service UUID: 8E400001-F315-4F60-9FB8-838830DAEA50<br>
|
|
Buttonless DFU characteristic UUID: 8E400001-F315-4F60-9FB8-838830DAEA50 (the same)<br>
|
|
Enter Bootloader Op Code: 0x01<br>
|
|
Correct return value: 0x20-01-01 , where:<br>
|
|
0x20 - Response Op Code<br>
|
|
0x01 - Request Code<br>
|
|
0x01 - Success<br>
|
|
The device should disconnect and restart in DFU mode after sending the notification.
|
|
<p>
|
|
In SDK 13 this issue will be fixed by a proper implementation (bonding required,
|
|
passing bond information to the bootloader, encryption, well tested). It is recommended to use this
|
|
new service when SDK 13 (or later) is out. TODO: fix the docs when SDK 13 is out.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_UNSAFE_EXPERIMENTAL_BUTTONLESS_DFU">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_PACKET_RECEIPT_NOTIFICATIONS_ENABLED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_PACKET_RECEIPT_NOTIFICATIONS_ENABLED</h4>
|
|
<pre>public static final java.lang.String EXTRA_PACKET_RECEIPT_NOTIFICATIONS_ENABLED</pre>
|
|
<div class="block">This property must contain a boolean value.
|
|
<p>If true the Packet Receipt Notification procedure will be enabled. See DFU documentation on http://infocenter.nordicsemi.com for more details.
|
|
The number of packets before receiving a Packet Receipt Notification is set with property <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_PACKET_RECEIPT_NOTIFICATIONS_VALUE"><code>EXTRA_PACKET_RECEIPT_NOTIFICATIONS_VALUE</code></a>.
|
|
The PRNs by default are enabled on devices running Android 4.3, 4.4.x and 5.x and disabled on 6.x and newer.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_PACKET_RECEIPT_NOTIFICATIONS_VALUE"><code>EXTRA_PACKET_RECEIPT_NOTIFICATIONS_VALUE</code></a>,
|
|
<a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_PACKET_RECEIPT_NOTIFICATIONS_ENABLED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_PACKET_RECEIPT_NOTIFICATIONS_VALUE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_PACKET_RECEIPT_NOTIFICATIONS_VALUE</h4>
|
|
<pre>public static final java.lang.String EXTRA_PACKET_RECEIPT_NOTIFICATIONS_VALUE</pre>
|
|
<div class="block">This property must contain a positive integer value, usually from range 1-200.
|
|
<p>The default value is . Setting it to 0 will disable the Packet Receipt Notification procedure.
|
|
When sending a firmware using the DFU procedure the service will send this number of packets before waiting for a notification.
|
|
Packet Receipt Notifications are used to synchronize the sender with receiver.
|
|
<p>On Android, calling <code>BluetoothGatt.writeCharacteristic(BluetoothGattCharacteristic)</code>
|
|
simply adds the packet to outgoing queue before returning the callback. Adding the next packet in the callback is much faster than the real transmission
|
|
(also the speed depends on the device chip manufacturer) and the queue may reach its limit. When does, the transmission stops and Android Bluetooth hangs (see Note below).
|
|
Using PRN procedure eliminates this problem as the notification is send when all packets were delivered the queue is empty.
|
|
<p>Note: this bug has been fixed on Android 6.0 Marshmallow and now no notifications are required. The onCharacteristicWrite callback will be
|
|
postponed until half of the queue is empty and upload will be resumed automatically. Disabling PRNs speeds up the upload process on those devices.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_PACKET_RECEIPT_NOTIFICATIONS_ENABLED"><code>EXTRA_PACKET_RECEIPT_NOTIFICATIONS_ENABLED</code></a>,
|
|
<a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_PACKET_RECEIPT_NOTIFICATIONS_VALUE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_FILE_PATH">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_FILE_PATH</h4>
|
|
<pre>public static final java.lang.String EXTRA_FILE_PATH</pre>
|
|
<div class="block">A path to the file with the new firmware. It may point to a HEX, BIN or a ZIP file.
|
|
Some file manager applications return the path as a String while other return a Uri. Use the <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_FILE_URI"><code>EXTRA_FILE_URI</code></a> in the later case.
|
|
For files included in /res/raw resource directory please use <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_FILE_RES_ID"><code>EXTRA_FILE_RES_ID</code></a> instead.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_FILE_PATH">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_FILE_URI">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_FILE_URI</h4>
|
|
<pre>public static final java.lang.String EXTRA_FILE_URI</pre>
|
|
<div class="block">See <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_FILE_PATH"><code>EXTRA_FILE_PATH</code></a> for details.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_FILE_URI">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_FILE_RES_ID">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_FILE_RES_ID</h4>
|
|
<pre>public static final java.lang.String EXTRA_FILE_RES_ID</pre>
|
|
<div class="block">See <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_FILE_PATH"><code>EXTRA_FILE_PATH</code></a> for details.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_FILE_RES_ID">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_INIT_FILE_PATH">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_INIT_FILE_PATH</h4>
|
|
<pre>public static final java.lang.String EXTRA_INIT_FILE_PATH</pre>
|
|
<div class="block">The Init packet URI. This file is required if the Extended Init Packet is required (SDK 7.0+). Must point to a 'dat' file corresponding with the selected firmware.
|
|
The Init packet may contain just the CRC (in case of older versions of DFU) or the Extended Init Packet in binary format (SDK 7.0+).</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_INIT_FILE_PATH">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_INIT_FILE_URI">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_INIT_FILE_URI</h4>
|
|
<pre>public static final java.lang.String EXTRA_INIT_FILE_URI</pre>
|
|
<div class="block">The Init packet URI. This file is required if the Extended Init Packet is required (SDK 7.0+). Must point to a 'dat' file corresponding with the selected firmware.
|
|
The Init packet may contain just the CRC (in case of older versions of DFU) or the Extended Init Packet in binary format (SDK 7.0+).</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_INIT_FILE_URI">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_INIT_FILE_RES_ID">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_INIT_FILE_RES_ID</h4>
|
|
<pre>public static final java.lang.String EXTRA_INIT_FILE_RES_ID</pre>
|
|
<div class="block">The Init packet URI. This file is required if the Extended Init Packet is required (SDK 7.0+). Must point to a 'dat' file corresponding with the selected firmware.
|
|
The Init packet may contain just the CRC (in case of older versions of DFU) or the Extended Init Packet in binary format (SDK 7.0+).</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_INIT_FILE_RES_ID">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_FILE_MIME_TYPE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_FILE_MIME_TYPE</h4>
|
|
<pre>public static final java.lang.String EXTRA_FILE_MIME_TYPE</pre>
|
|
<div class="block">The input file mime-type. Currently only "application/zip" (ZIP) or "application/octet-stream" (HEX or BIN) are supported. If this parameter is
|
|
empty the "application/octet-stream" is assumed.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_FILE_MIME_TYPE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="MIME_TYPE_OCTET_STREAM">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>MIME_TYPE_OCTET_STREAM</h4>
|
|
<pre>public static final java.lang.String MIME_TYPE_OCTET_STREAM</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.MIME_TYPE_OCTET_STREAM">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="MIME_TYPE_ZIP">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>MIME_TYPE_ZIP</h4>
|
|
<pre>public static final java.lang.String MIME_TYPE_ZIP</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.MIME_TYPE_ZIP">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_FILE_TYPE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_FILE_TYPE</h4>
|
|
<pre>public static final java.lang.String EXTRA_FILE_TYPE</pre>
|
|
<div class="block">This optional extra parameter may contain a file type. Currently supported are:
|
|
<ul>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_SOFT_DEVICE"><code>TYPE_SOFT_DEVICE</code></a> - only Soft Device update</li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_BOOTLOADER"><code>TYPE_BOOTLOADER</code></a> - only Bootloader update</li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_APPLICATION"><code>TYPE_APPLICATION</code></a> - only application update</li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_AUTO"><code>TYPE_AUTO</code></a> - the file is a ZIP file that may contain more than one HEX/BIN + DAT files. Since SDK 8.0 the ZIP Distribution packet is a recommended
|
|
way of delivering firmware files. Please, see the DFU documentation for more details. A ZIP distribution packet may be created using the 'nrf utility'
|
|
command line application, that is a part of Master Control Panel 3.8.0.The ZIP file MAY contain only the following files:
|
|
<b>softdevice.hex/bin</b>, <b>bootloader.hex/bin</b>, <b>application.hex/bin</b> to determine the type based on its name. At lease one of them MUST be present.
|
|
</li>
|
|
</ul>
|
|
If this parameter is not provided the type is assumed as follows:
|
|
<ol>
|
|
<li>If the <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_FILE_MIME_TYPE"><code>EXTRA_FILE_MIME_TYPE</code></a> field is <code>null</code> or is equal to <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#MIME_TYPE_OCTET_STREAM">"application/octet-stream"</a> - the <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_APPLICATION"><code>TYPE_APPLICATION</code></a> is assumed.</li>
|
|
<li>If the <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_FILE_MIME_TYPE"><code>EXTRA_FILE_MIME_TYPE</code></a> field is equal to <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#MIME_TYPE_ZIP">"application/zip"</a> - the <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#TYPE_AUTO"><code>TYPE_AUTO</code></a> is assumed.</li>
|
|
</ol></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_FILE_TYPE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="TYPE_SOFT_DEVICE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>TYPE_SOFT_DEVICE</h4>
|
|
<pre>public static final int TYPE_SOFT_DEVICE</pre>
|
|
<div class="block"><p>
|
|
The file contains a new version of Soft Device.
|
|
</p>
|
|
<p>
|
|
Since DFU Library 7.0 all firmware may contain an Init packet. The Init packet is required if Extended Init Packet is used by the DFU bootloader (SDK 7.0+)..
|
|
The Init packet for the bootloader must be placed in the .dat file.
|
|
</p></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_FILE_TYPE"><code>EXTRA_FILE_TYPE</code></a>,
|
|
<a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.TYPE_SOFT_DEVICE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="TYPE_BOOTLOADER">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>TYPE_BOOTLOADER</h4>
|
|
<pre>public static final int TYPE_BOOTLOADER</pre>
|
|
<div class="block"><p>
|
|
The file contains a new version of Bootloader.
|
|
</p>
|
|
<p>
|
|
Since DFU Library 7.0 all firmware may contain an Init packet. The Init packet is required if Extended Init Packet is used by the DFU bootloader (SDK 7.0+).
|
|
The Init packet for the bootloader must be placed in the .dat file.
|
|
</p></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_FILE_TYPE"><code>EXTRA_FILE_TYPE</code></a>,
|
|
<a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.TYPE_BOOTLOADER">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="TYPE_APPLICATION">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>TYPE_APPLICATION</h4>
|
|
<pre>public static final int TYPE_APPLICATION</pre>
|
|
<div class="block"><p>
|
|
The file contains a new version of Application.
|
|
</p>
|
|
<p>
|
|
Since DFU Library 0.5 all firmware may contain an Init packet. The Init packet is required if Extended Init Packet is used by the DFU bootloader (SDK 7.0+).
|
|
The Init packet for the application must be placed in the .dat file.
|
|
</p></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_FILE_TYPE"><code>EXTRA_FILE_TYPE</code></a>,
|
|
<a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.TYPE_APPLICATION">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="TYPE_AUTO">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>TYPE_AUTO</h4>
|
|
<pre>public static final int TYPE_AUTO</pre>
|
|
<div class="block"><p>
|
|
A ZIP file that consists of more than 1 file. Since SDK 8.0 the ZIP Distribution packet is a recommended way of delivering firmware files. Please, see the DFU documentation for
|
|
more details. A ZIP distribution packet may be created using the 'nrf utility' command line application, that is a part of Master Control Panel 3.8.0.
|
|
For backwards compatibility this library supports also ZIP files without the manifest file. Instead they must follow the fixed naming convention:
|
|
The names of files in the ZIP must be: <b>softdevice.hex</b> (or .bin), <b>bootloader.hex</b> (or .bin), <b>application.hex</b> (or .bin) in order
|
|
to be read correctly. Using the Soft Device v7.0.0+ the Soft Device and Bootloader may be updated and sent together. In case of additional application file included,
|
|
the service will try to send Soft Device, Bootloader and Application together (which is not supported currently) and if it fails, send first SD+BL, reconnect and send the application
|
|
in the following connection.
|
|
</p>
|
|
<p>
|
|
Since the DFU Library 0.5 you may specify the Init packet, that will be send prior to the firmware. The init packet contains some verification data, like a device type and
|
|
revision, application version or a list of supported Soft Devices. The Init packet is required if Extended Init Packet is used by the DFU bootloader (SDK 7.0+).
|
|
In case of using the compatibility ZIP files the Init packet for the Soft Device and Bootloader must be in the 'system.dat' file while for the application
|
|
in the 'application.dat' file (included in the ZIP). The CRC in the 'system.dat' must be a CRC of both BIN contents if both a Soft Device and a Bootloader is present.
|
|
</p></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_FILE_TYPE"><code>EXTRA_FILE_TYPE</code></a>,
|
|
<a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.TYPE_AUTO">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_DATA">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_DATA</h4>
|
|
<pre>public static final java.lang.String EXTRA_DATA</pre>
|
|
<div class="block">An extra field with progress and error information used in broadcast events.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_DATA">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_PROGRESS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_PROGRESS</h4>
|
|
<pre>public static final java.lang.String EXTRA_PROGRESS</pre>
|
|
<div class="block">An extra field to send the progress or error information in the DFU notification. The value may contain:
|
|
<ul>
|
|
<li>Value 0 - 100 - percentage progress value</li>
|
|
<li>One of the following status constants:
|
|
<ul>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_CONNECTING"><code>PROGRESS_CONNECTING</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_STARTING"><code>PROGRESS_STARTING</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_ENABLING_DFU_MODE"><code>PROGRESS_ENABLING_DFU_MODE</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_VALIDATING"><code>PROGRESS_VALIDATING</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_DISCONNECTING"><code>PROGRESS_DISCONNECTING</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_COMPLETED"><code>PROGRESS_COMPLETED</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_ABORTED"><code>PROGRESS_ABORTED</code></a></li>
|
|
</ul>
|
|
</li>
|
|
<li>An error code with <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_MASK"><code>ERROR_MASK</code></a> if initialization error occurred</li>
|
|
<li>An error code with <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_REMOTE_MASK"><code>ERROR_REMOTE_MASK</code></a> if remote DFU target returned an error</li>
|
|
<li>An error code with <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_CONNECTION_MASK"><code>ERROR_CONNECTION_MASK</code></a> if connection error occurred (f.e. GATT error (133) or Internal GATT Error (129))</li>
|
|
</ul>
|
|
To check if error occurred use:<br>
|
|
<code>boolean error = progressValue >= DfuBaseService.ERROR_MASK;</code></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_PROGRESS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_PART_CURRENT">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_PART_CURRENT</h4>
|
|
<pre>public static final java.lang.String EXTRA_PART_CURRENT</pre>
|
|
<div class="block">The number of currently transferred part. The SoftDevice and Bootloader may be send together as one part. If user wants to upload them together with an application it has to be sent
|
|
in another connection as the second part.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_PARTS_TOTAL"><code>EXTRA_PARTS_TOTAL</code></a>,
|
|
<a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_PART_CURRENT">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_PARTS_TOTAL">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_PARTS_TOTAL</h4>
|
|
<pre>public static final java.lang.String EXTRA_PARTS_TOTAL</pre>
|
|
<div class="block">Number of parts in total.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_PART_CURRENT"><code>EXTRA_PART_CURRENT</code></a>,
|
|
<a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_PARTS_TOTAL">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_SPEED_B_PER_MS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_SPEED_B_PER_MS</h4>
|
|
<pre>public static final java.lang.String EXTRA_SPEED_B_PER_MS</pre>
|
|
<div class="block">The current upload speed in bytes/millisecond.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_SPEED_B_PER_MS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_AVG_SPEED_B_PER_MS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_AVG_SPEED_B_PER_MS</h4>
|
|
<pre>public static final java.lang.String EXTRA_AVG_SPEED_B_PER_MS</pre>
|
|
<div class="block">The average upload speed in bytes/millisecond for the current part.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_AVG_SPEED_B_PER_MS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="BROADCAST_PROGRESS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>BROADCAST_PROGRESS</h4>
|
|
<pre>public static final java.lang.String BROADCAST_PROGRESS</pre>
|
|
<div class="block">The broadcast message contains the following extras:
|
|
<ul>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_DATA"><code>EXTRA_DATA</code></a> - the progress value (percentage 0-100) or:
|
|
<ul>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_CONNECTING"><code>PROGRESS_CONNECTING</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_STARTING"><code>PROGRESS_STARTING</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_ENABLING_DFU_MODE"><code>PROGRESS_ENABLING_DFU_MODE</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_VALIDATING"><code>PROGRESS_VALIDATING</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_DISCONNECTING"><code>PROGRESS_DISCONNECTING</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_COMPLETED"><code>PROGRESS_COMPLETED</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_ABORTED"><code>PROGRESS_ABORTED</code></a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_DEVICE_ADDRESS"><code>EXTRA_DEVICE_ADDRESS</code></a> - the target device address</li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_PART_CURRENT"><code>EXTRA_PART_CURRENT</code></a> - the number of currently transmitted part</li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_PARTS_TOTAL"><code>EXTRA_PARTS_TOTAL</code></a> - total number of parts that are being sent, f.e. if a ZIP file contains a Soft Device, a Bootloader and an Application,
|
|
the SoftDevice and Bootloader will be send together as one part. Then the service will disconnect and reconnect to the new Bootloader and send the
|
|
application as part number two.</li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_SPEED_B_PER_MS"><code>EXTRA_SPEED_B_PER_MS</code></a> - current speed in bytes/millisecond as float</li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_AVG_SPEED_B_PER_MS"><code>EXTRA_AVG_SPEED_B_PER_MS</code></a> - the average transmission speed in bytes/millisecond as float</li>
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.BROADCAST_PROGRESS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="PROGRESS_CONNECTING">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PROGRESS_CONNECTING</h4>
|
|
<pre>public static final int PROGRESS_CONNECTING</pre>
|
|
<div class="block">Service is connecting to the remote DFU target.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.PROGRESS_CONNECTING">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="PROGRESS_STARTING">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PROGRESS_STARTING</h4>
|
|
<pre>public static final int PROGRESS_STARTING</pre>
|
|
<div class="block">Service is enabling notifications and starting transmission.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.PROGRESS_STARTING">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="PROGRESS_ENABLING_DFU_MODE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PROGRESS_ENABLING_DFU_MODE</h4>
|
|
<pre>public static final int PROGRESS_ENABLING_DFU_MODE</pre>
|
|
<div class="block">Service has triggered a switch to bootloader mode. Now the service waits for the link loss event (this may take up to several seconds) and will connect again
|
|
to the same device, now started in the bootloader mode.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.PROGRESS_ENABLING_DFU_MODE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="PROGRESS_VALIDATING">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PROGRESS_VALIDATING</h4>
|
|
<pre>public static final int PROGRESS_VALIDATING</pre>
|
|
<div class="block">Service is sending validation request to the remote DFU target.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.PROGRESS_VALIDATING">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="PROGRESS_DISCONNECTING">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PROGRESS_DISCONNECTING</h4>
|
|
<pre>public static final int PROGRESS_DISCONNECTING</pre>
|
|
<div class="block">Service is disconnecting from the DFU target.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.PROGRESS_DISCONNECTING">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="PROGRESS_COMPLETED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PROGRESS_COMPLETED</h4>
|
|
<pre>public static final int PROGRESS_COMPLETED</pre>
|
|
<div class="block">The connection is successful.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.PROGRESS_COMPLETED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="PROGRESS_ABORTED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>PROGRESS_ABORTED</h4>
|
|
<pre>public static final int PROGRESS_ABORTED</pre>
|
|
<div class="block">The upload has been aborted. Previous software version will be restored on the target.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.PROGRESS_ABORTED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="BROADCAST_ERROR">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>BROADCAST_ERROR</h4>
|
|
<pre>public static final java.lang.String BROADCAST_ERROR</pre>
|
|
<div class="block">The broadcast error message contains the following extras:
|
|
<ul>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_DATA"><code>EXTRA_DATA</code></a> - the error number. Use <a href="../../../../no/nordicsemi/android/error/GattError.html#parse-int-"><code>GattError.parse(int)</code></a> to get String representation</li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_DEVICE_ADDRESS"><code>EXTRA_DEVICE_ADDRESS</code></a> - the target device address</li>
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.BROADCAST_ERROR">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_ERROR_TYPE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_ERROR_TYPE</h4>
|
|
<pre>public static final java.lang.String EXTRA_ERROR_TYPE</pre>
|
|
<div class="block">The type of the error. This extra contains information about that kind of error has occurred. Connection state errors and other errors may share the same numbers.
|
|
For example, the <code>BluetoothGattCallback.onCharacteristicWrite(BluetoothGatt, BluetoothGattCharacteristic, int)</code> method may return a status code 8 (GATT INSUF AUTHORIZATION),
|
|
while the status code 8 returned by <code>BluetoothGattCallback.onConnectionStateChange(BluetoothGatt, int, int)</code> is a GATT CONN TIMEOUT error.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_ERROR_TYPE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_TYPE_OTHER">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_TYPE_OTHER</h4>
|
|
<pre>public static final int ERROR_TYPE_OTHER</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_TYPE_OTHER">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_TYPE_COMMUNICATION_STATE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_TYPE_COMMUNICATION_STATE</h4>
|
|
<pre>public static final int ERROR_TYPE_COMMUNICATION_STATE</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_TYPE_COMMUNICATION_STATE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_TYPE_COMMUNICATION">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_TYPE_COMMUNICATION</h4>
|
|
<pre>public static final int ERROR_TYPE_COMMUNICATION</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_TYPE_COMMUNICATION">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_TYPE_DFU_REMOTE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_TYPE_DFU_REMOTE</h4>
|
|
<pre>public static final int ERROR_TYPE_DFU_REMOTE</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_TYPE_DFU_REMOTE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_MASK">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_MASK</h4>
|
|
<pre>public static final int ERROR_MASK</pre>
|
|
<div class="block">If this bit is set than the progress value indicates an error. Use <a href="../../../../no/nordicsemi/android/error/GattError.html#parse-int-"><code>GattError.parse(int)</code></a> to obtain error name.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_MASK">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_DEVICE_DISCONNECTED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_DEVICE_DISCONNECTED</h4>
|
|
<pre>public static final int ERROR_DEVICE_DISCONNECTED</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_DEVICE_DISCONNECTED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_FILE_NOT_FOUND">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_FILE_NOT_FOUND</h4>
|
|
<pre>public static final int ERROR_FILE_NOT_FOUND</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_FILE_NOT_FOUND">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_FILE_ERROR">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_FILE_ERROR</h4>
|
|
<pre>public static final int ERROR_FILE_ERROR</pre>
|
|
<div class="block">Thrown if service was unable to open the file (<code>IOException</code> has been thrown).</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_FILE_ERROR">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_FILE_INVALID">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_FILE_INVALID</h4>
|
|
<pre>public static final int ERROR_FILE_INVALID</pre>
|
|
<div class="block">Thrown when input file is not a valid HEX or ZIP file.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_FILE_INVALID">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_FILE_IO_EXCEPTION">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_FILE_IO_EXCEPTION</h4>
|
|
<pre>public static final int ERROR_FILE_IO_EXCEPTION</pre>
|
|
<div class="block">Thrown when <code>IOException</code> occurred when reading from file.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_FILE_IO_EXCEPTION">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_SERVICE_DISCOVERY_NOT_STARTED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_SERVICE_DISCOVERY_NOT_STARTED</h4>
|
|
<pre>public static final int ERROR_SERVICE_DISCOVERY_NOT_STARTED</pre>
|
|
<div class="block">Error thrown when <code>gatt.discoverServices();</code> returns false.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_SERVICE_DISCOVERY_NOT_STARTED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_SERVICE_NOT_FOUND">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_SERVICE_NOT_FOUND</h4>
|
|
<pre>public static final int ERROR_SERVICE_NOT_FOUND</pre>
|
|
<div class="block">Thrown when the service discovery has finished but the DFU service has not been found. The device does not support DFU of is not in DFU mode.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_SERVICE_NOT_FOUND">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_CHARACTERISTICS_NOT_FOUND">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_CHARACTERISTICS_NOT_FOUND</h4>
|
|
<pre>@Deprecated
|
|
public static final int ERROR_CHARACTERISTICS_NOT_FOUND</pre>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">This error will no longer be thrown. <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_SERVICE_NOT_FOUND"><code>ERROR_SERVICE_NOT_FOUND</code></a> will be thrown instead.</span></div>
|
|
<div class="block">Thrown when the required DFU service has been found but at least one of the DFU characteristics is absent.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_CHARACTERISTICS_NOT_FOUND">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_INVALID_RESPONSE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_INVALID_RESPONSE</h4>
|
|
<pre>public static final int ERROR_INVALID_RESPONSE</pre>
|
|
<div class="block">Thrown when unknown response has been obtained from the target. The DFU target must follow specification.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_INVALID_RESPONSE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_FILE_TYPE_UNSUPPORTED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_FILE_TYPE_UNSUPPORTED</h4>
|
|
<pre>public static final int ERROR_FILE_TYPE_UNSUPPORTED</pre>
|
|
<div class="block">Thrown when the the service does not support given type or mime-type.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_FILE_TYPE_UNSUPPORTED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_BLUETOOTH_DISABLED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_BLUETOOTH_DISABLED</h4>
|
|
<pre>public static final int ERROR_BLUETOOTH_DISABLED</pre>
|
|
<div class="block">Thrown when the the Bluetooth adapter is disabled.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_BLUETOOTH_DISABLED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_INIT_PACKET_REQUIRED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_INIT_PACKET_REQUIRED</h4>
|
|
<pre>public static final int ERROR_INIT_PACKET_REQUIRED</pre>
|
|
<div class="block">DFU Bootloader version 0.6+ requires sending the Init packet. If such bootloader version is detected, but the init packet has not been set this error is thrown.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_INIT_PACKET_REQUIRED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_FILE_SIZE_INVALID">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_FILE_SIZE_INVALID</h4>
|
|
<pre>public static final int ERROR_FILE_SIZE_INVALID</pre>
|
|
<div class="block">Thrown when the firmware file is not word-aligned. The firmware size must be dividable by 4 bytes.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_FILE_SIZE_INVALID">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_CRC_ERROR">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_CRC_ERROR</h4>
|
|
<pre>public static final int ERROR_CRC_ERROR</pre>
|
|
<div class="block">Thrown when the received CRC does not match with the calculated one. The service will try 3 times to send the data, and if the CRC fails each time this error will be thrown.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_CRC_ERROR">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_DEVICE_NOT_BONDED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_DEVICE_NOT_BONDED</h4>
|
|
<pre>public static final int ERROR_DEVICE_NOT_BONDED</pre>
|
|
<div class="block">Thrown when device had to be paired before the DFU process was started.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_DEVICE_NOT_BONDED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_REMOTE_MASK">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_REMOTE_MASK</h4>
|
|
<pre>public static final int ERROR_REMOTE_MASK</pre>
|
|
<div class="block">Flag set when the DFU target returned a DFU error. Look for DFU specification to get error codes.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_REMOTE_MASK">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_CONNECTION_MASK">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_CONNECTION_MASK</h4>
|
|
<pre>public static final int ERROR_CONNECTION_MASK</pre>
|
|
<div class="block">The flag set when one of <code>BluetoothGattCallback</code> methods was called with status other than <code>BluetoothGatt.GATT_SUCCESS</code>.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_CONNECTION_MASK">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ERROR_CONNECTION_STATE_MASK">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ERROR_CONNECTION_STATE_MASK</h4>
|
|
<pre>public static final int ERROR_CONNECTION_STATE_MASK</pre>
|
|
<div class="block">The flag set when the <code>BluetoothGattCallback.onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int)</code> method was called with
|
|
status other than <code>BluetoothGatt.GATT_SUCCESS</code>.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ERROR_CONNECTION_STATE_MASK">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="BROADCAST_LOG">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>BROADCAST_LOG</h4>
|
|
<pre>public static final java.lang.String BROADCAST_LOG</pre>
|
|
<div class="block">The log events are only broadcast when there is no nRF Logger installed. The broadcast contains 2 extras:
|
|
<ul>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_LOG_LEVEL"><code>EXTRA_LOG_LEVEL</code></a> - The log level, one of following: <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#LOG_LEVEL_DEBUG"><code>LOG_LEVEL_DEBUG</code></a>, <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#LOG_LEVEL_VERBOSE"><code>LOG_LEVEL_VERBOSE</code></a>, <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#LOG_LEVEL_INFO"><code>LOG_LEVEL_INFO</code></a>,
|
|
<a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#LOG_LEVEL_APPLICATION"><code>LOG_LEVEL_APPLICATION</code></a>, <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#LOG_LEVEL_WARNING"><code>LOG_LEVEL_WARNING</code></a>, <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#LOG_LEVEL_ERROR"><code>LOG_LEVEL_ERROR</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_LOG_MESSAGE"><code>EXTRA_LOG_MESSAGE</code></a> - The log message</li>
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.BROADCAST_LOG">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_LOG_MESSAGE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_LOG_MESSAGE</h4>
|
|
<pre>public static final java.lang.String EXTRA_LOG_MESSAGE</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_LOG_MESSAGE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_LOG_LEVEL">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_LOG_LEVEL</h4>
|
|
<pre>public static final java.lang.String EXTRA_LOG_LEVEL</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_LOG_LEVEL">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="LOG_LEVEL_DEBUG">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>LOG_LEVEL_DEBUG</h4>
|
|
<pre>public static final int LOG_LEVEL_DEBUG</pre>
|
|
<div class="block">Level used just for debugging purposes. It has lowest level</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.LOG_LEVEL_DEBUG">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="LOG_LEVEL_VERBOSE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>LOG_LEVEL_VERBOSE</h4>
|
|
<pre>public static final int LOG_LEVEL_VERBOSE</pre>
|
|
<div class="block">Log entries with minor importance</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.LOG_LEVEL_VERBOSE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="LOG_LEVEL_INFO">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>LOG_LEVEL_INFO</h4>
|
|
<pre>public static final int LOG_LEVEL_INFO</pre>
|
|
<div class="block">Default logging level for important entries</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.LOG_LEVEL_INFO">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="LOG_LEVEL_APPLICATION">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>LOG_LEVEL_APPLICATION</h4>
|
|
<pre>public static final int LOG_LEVEL_APPLICATION</pre>
|
|
<div class="block">Log entries level for applications</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.LOG_LEVEL_APPLICATION">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="LOG_LEVEL_WARNING">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>LOG_LEVEL_WARNING</h4>
|
|
<pre>public static final int LOG_LEVEL_WARNING</pre>
|
|
<div class="block">Log entries with high importance</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.LOG_LEVEL_WARNING">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="LOG_LEVEL_ERROR">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>LOG_LEVEL_ERROR</h4>
|
|
<pre>public static final int LOG_LEVEL_ERROR</pre>
|
|
<div class="block">Log entries with very high importance, like errors</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.LOG_LEVEL_ERROR">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="BROADCAST_ACTION">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>BROADCAST_ACTION</h4>
|
|
<pre>public static final java.lang.String BROADCAST_ACTION</pre>
|
|
<div class="block">Activity may broadcast this broadcast in order to pause, resume or abort DFU process.
|
|
Use <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_ACTION"><code>EXTRA_ACTION</code></a> extra to pass the action.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.BROADCAST_ACTION">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_ACTION">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_ACTION</h4>
|
|
<pre>public static final java.lang.String EXTRA_ACTION</pre>
|
|
<div class="block">The action extra. It may have one of the following values: <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ACTION_PAUSE"><code>ACTION_PAUSE</code></a>, <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ACTION_RESUME"><code>ACTION_RESUME</code></a>, <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ACTION_ABORT"><code>ACTION_ABORT</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_ACTION">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ACTION_PAUSE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ACTION_PAUSE</h4>
|
|
<pre>public static final int ACTION_PAUSE</pre>
|
|
<div class="block">Pauses the upload. The service will wait for broadcasts with the action set to <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ACTION_RESUME"><code>ACTION_RESUME</code></a> or <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ACTION_ABORT"><code>ACTION_ABORT</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ACTION_PAUSE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ACTION_RESUME">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ACTION_RESUME</h4>
|
|
<pre>public static final int ACTION_RESUME</pre>
|
|
<div class="block">Resumes the upload that has been paused before using <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ACTION_PAUSE"><code>ACTION_PAUSE</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ACTION_RESUME">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ACTION_ABORT">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ACTION_ABORT</h4>
|
|
<pre>public static final int ACTION_ABORT</pre>
|
|
<div class="block">Aborts the upload. The service does not need to be paused before.
|
|
After sending <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#BROADCAST_ACTION"><code>BROADCAST_ACTION</code></a> with extra <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_ACTION"><code>EXTRA_ACTION</code></a> set to this value the DFU bootloader will restore the old application
|
|
(if there was already an application). Be aware that uploading the Soft Device will erase the application in order to make space in the memory.
|
|
In case there is no application, or the application has been removed, the DFU bootloader will be started and user may try to send the application again.
|
|
The bootloader may advertise with the address incremented by 1 to prevent caching services.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.ACTION_ABORT">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_CUSTOM_UUIDS_FOR_LEGACY_DFU">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_CUSTOM_UUIDS_FOR_LEGACY_DFU</h4>
|
|
<pre>public static final java.lang.String EXTRA_CUSTOM_UUIDS_FOR_LEGACY_DFU</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_CUSTOM_UUIDS_FOR_LEGACY_DFU">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_CUSTOM_UUIDS_FOR_SECURE_DFU">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_CUSTOM_UUIDS_FOR_SECURE_DFU</h4>
|
|
<pre>public static final java.lang.String EXTRA_CUSTOM_UUIDS_FOR_SECURE_DFU</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_CUSTOM_UUIDS_FOR_SECURE_DFU">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_CUSTOM_UUIDS_FOR_EXPERIMENTAL_BUTTONLESS_DFU">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_CUSTOM_UUIDS_FOR_EXPERIMENTAL_BUTTONLESS_DFU</h4>
|
|
<pre>public static final java.lang.String EXTRA_CUSTOM_UUIDS_FOR_EXPERIMENTAL_BUTTONLESS_DFU</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_CUSTOM_UUIDS_FOR_EXPERIMENTAL_BUTTONLESS_DFU">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_CUSTOM_UUIDS_FOR_BUTTONLESS_DFU_WITHOUT_BOND_SHARING">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_CUSTOM_UUIDS_FOR_BUTTONLESS_DFU_WITHOUT_BOND_SHARING</h4>
|
|
<pre>public static final java.lang.String EXTRA_CUSTOM_UUIDS_FOR_BUTTONLESS_DFU_WITHOUT_BOND_SHARING</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_CUSTOM_UUIDS_FOR_BUTTONLESS_DFU_WITHOUT_BOND_SHARING">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="EXTRA_CUSTOM_UUIDS_FOR_BUTTONLESS_DFU_WITH_BOND_SHARING">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>EXTRA_CUSTOM_UUIDS_FOR_BUTTONLESS_DFU_WITH_BOND_SHARING</h4>
|
|
<pre>public static final java.lang.String EXTRA_CUSTOM_UUIDS_FOR_BUTTONLESS_DFU_WITH_BOND_SHARING</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.EXTRA_CUSTOM_UUIDS_FOR_BUTTONLESS_DFU_WITH_BOND_SHARING">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="DFU_STATUS_SUCCESS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DFU_STATUS_SUCCESS</h4>
|
|
<pre>@Deprecated
|
|
public static final int DFU_STATUS_SUCCESS</pre>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.DFU_STATUS_SUCCESS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="DFU_STATUS_INVALID_STATE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DFU_STATUS_INVALID_STATE</h4>
|
|
<pre>@Deprecated
|
|
public static final int DFU_STATUS_INVALID_STATE</pre>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.DFU_STATUS_INVALID_STATE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="DFU_STATUS_NOT_SUPPORTED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DFU_STATUS_NOT_SUPPORTED</h4>
|
|
<pre>@Deprecated
|
|
public static final int DFU_STATUS_NOT_SUPPORTED</pre>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.DFU_STATUS_NOT_SUPPORTED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="DFU_STATUS_DATA_SIZE_EXCEEDS_LIMIT">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DFU_STATUS_DATA_SIZE_EXCEEDS_LIMIT</h4>
|
|
<pre>@Deprecated
|
|
public static final int DFU_STATUS_DATA_SIZE_EXCEEDS_LIMIT</pre>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.DFU_STATUS_DATA_SIZE_EXCEEDS_LIMIT">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="DFU_STATUS_CRC_ERROR">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DFU_STATUS_CRC_ERROR</h4>
|
|
<pre>@Deprecated
|
|
public static final int DFU_STATUS_CRC_ERROR</pre>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.DFU_STATUS_CRC_ERROR">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="DFU_STATUS_OPERATION_FAILED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DFU_STATUS_OPERATION_FAILED</h4>
|
|
<pre>@Deprecated
|
|
public static final int DFU_STATUS_OPERATION_FAILED</pre>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.DFU_STATUS_OPERATION_FAILED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="mConnectionState">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>mConnectionState</h4>
|
|
<pre>protected int mConnectionState</pre>
|
|
<div class="block">The current connection state. If its value is > 0 than an error has occurred. Error number is a negative value of mConnectionState</div>
|
|
</li>
|
|
</ul>
|
|
<a name="STATE_DISCONNECTED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>STATE_DISCONNECTED</h4>
|
|
<pre>protected static final int STATE_DISCONNECTED</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.STATE_DISCONNECTED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="STATE_CONNECTING">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>STATE_CONNECTING</h4>
|
|
<pre>protected static final int STATE_CONNECTING</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.STATE_CONNECTING">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="STATE_CONNECTED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>STATE_CONNECTED</h4>
|
|
<pre>protected static final int STATE_CONNECTED</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.STATE_CONNECTED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="STATE_CONNECTED_AND_READY">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>STATE_CONNECTED_AND_READY</h4>
|
|
<pre>protected static final int STATE_CONNECTED_AND_READY</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.STATE_CONNECTED_AND_READY">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="STATE_DISCONNECTING">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>STATE_DISCONNECTING</h4>
|
|
<pre>protected static final int STATE_DISCONNECTING</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.STATE_DISCONNECTING">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="STATE_CLOSED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>STATE_CLOSED</h4>
|
|
<pre>protected static final int STATE_CLOSED</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuBaseService.STATE_CLOSED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="DfuBaseService--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>DfuBaseService</h4>
|
|
<pre>public DfuBaseService()</pre>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="onCreate--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onCreate</h4>
|
|
<pre>public void onCreate()</pre>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>onCreate</code> in class <code>android.app.IntentService</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="onTaskRemoved-android.content.Intent-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onTaskRemoved</h4>
|
|
<pre>public void onTaskRemoved(android.content.Intent rootIntent)</pre>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>onTaskRemoved</code> in class <code>android.app.Service</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="onDestroy--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onDestroy</h4>
|
|
<pre>public void onDestroy()</pre>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>onDestroy</code> in class <code>android.app.IntentService</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="onHandleIntent-android.content.Intent-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onHandleIntent</h4>
|
|
<pre>protected void onHandleIntent(android.content.Intent intent)</pre>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code>onHandleIntent</code> in class <code>android.app.IntentService</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="connect-java.lang.String-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>connect</h4>
|
|
<pre>protected android.bluetooth.BluetoothGatt connect(java.lang.String address)</pre>
|
|
<div class="block">Connects to the BLE device with given address. This method is SYNCHRONOUS, it wait until the connection status change from <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#STATE_CONNECTING"><code>STATE_CONNECTING</code></a> to <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#STATE_CONNECTED_AND_READY"><code>STATE_CONNECTED_AND_READY</code></a> or an
|
|
error occurs. This method returns <code>null</code> if Bluetooth adapter is disabled.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>address</code> - the device address</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the GATT device or <code>null</code> if Bluetooth adapter is disabled.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="terminateConnection-android.bluetooth.BluetoothGatt-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>terminateConnection</h4>
|
|
<pre>protected void terminateConnection(android.bluetooth.BluetoothGatt gatt,
|
|
int error)</pre>
|
|
<div class="block">Disconnects from the device and cleans local variables in case of error. This method is SYNCHRONOUS and wait until the disconnecting process will be completed.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>gatt</code> - the GATT device to be disconnected</dd>
|
|
<dd><code>error</code> - error number</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="disconnect-android.bluetooth.BluetoothGatt-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>disconnect</h4>
|
|
<pre>protected void disconnect(android.bluetooth.BluetoothGatt gatt)</pre>
|
|
<div class="block">Disconnects from the device. This is SYNCHRONOUS method and waits until the callback returns new state. Terminates immediately if device is already disconnected. Do not call this method
|
|
directly, use <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#terminateConnection-android.bluetooth.BluetoothGatt-int-"><code>terminateConnection(android.bluetooth.BluetoothGatt, int)</code></a> instead.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>gatt</code> - the GATT device that has to be disconnected</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="waitUntilDisconnected--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>waitUntilDisconnected</h4>
|
|
<pre>protected void waitUntilDisconnected()</pre>
|
|
<div class="block">Wait until the connection state will change to <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#STATE_DISCONNECTED"><code>STATE_DISCONNECTED</code></a> or until an error occurs.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="waitFor-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>waitFor</h4>
|
|
<pre>protected void waitFor(int millis)</pre>
|
|
<div class="block">Wait for given number of milliseconds.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>millis</code> - waiting period</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="close-android.bluetooth.BluetoothGatt-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>close</h4>
|
|
<pre>protected void close(android.bluetooth.BluetoothGatt gatt)</pre>
|
|
<div class="block">Closes the GATT device and cleans up.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>gatt</code> - the GATT device to be closed</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="refreshDeviceCache-android.bluetooth.BluetoothGatt-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>refreshDeviceCache</h4>
|
|
<pre>protected void refreshDeviceCache(android.bluetooth.BluetoothGatt gatt,
|
|
boolean force)</pre>
|
|
<div class="block">Clears the device cache. After uploading new firmware the DFU target will have other services than before.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>gatt</code> - the GATT device to be refreshed</dd>
|
|
<dd><code>force</code> - <code>true</code> to force the refresh</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="updateProgressNotification--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>updateProgressNotification</h4>
|
|
<pre>public void updateProgressNotification()</pre>
|
|
<div class="block">Creates or updates the notification in the Notification Manager. Sends broadcast with given progress state to the activity.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getNotificationTarget--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getNotificationTarget</h4>
|
|
<pre>protected abstract java.lang.Class<? extends android.app.Activity> getNotificationTarget()</pre>
|
|
<div class="block">This method must return the activity class that will be used to create the pending intent used as a content intent in the notification showing the upload progress.
|
|
The activity will be launched when user click the notification. DfuService will add <code>Intent.FLAG_ACTIVITY_NEW_TASK</code> flag and the following extras:
|
|
<ul>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_DEVICE_ADDRESS"><code>EXTRA_DEVICE_ADDRESS</code></a> - target device address</li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_DEVICE_NAME"><code>EXTRA_DEVICE_NAME</code></a> - target device name</li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#EXTRA_PROGRESS"><code>EXTRA_PROGRESS</code></a> - the connection state (values < 0)*, current progress (0-100) or error number if <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#ERROR_MASK"><code>ERROR_MASK</code></a> bit set.</li>
|
|
</ul>
|
|
If your application disabled DFU notifications by calling <a href="../../../../no/nordicsemi/android/dfu/DfuServiceInitiator.html#setDisableNotification-boolean-"><code>DfuServiceInitiator.setDisableNotification(boolean)</code></a> with parameter true this method will never be called
|
|
and may return null.<br>
|
|
_______________________________<br>
|
|
* - connection state constants:
|
|
<ul>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_CONNECTING"><code>PROGRESS_CONNECTING</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_DISCONNECTING"><code>PROGRESS_DISCONNECTING</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_COMPLETED"><code>PROGRESS_COMPLETED</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_ABORTED"><code>PROGRESS_ABORTED</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_STARTING"><code>PROGRESS_STARTING</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_ENABLING_DFU_MODE"><code>PROGRESS_ENABLING_DFU_MODE</code></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html#PROGRESS_VALIDATING"><code>PROGRESS_VALIDATING</code></a></li>
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the target activity class</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isDebug--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>isDebug</h4>
|
|
<pre>protected boolean isDebug()</pre>
|
|
<div class="block">Override this method to enable detailed debug LogCat logs with DFU events.
|
|
<p>Recommended use:</p>
|
|
<pre>
|
|
@Override
|
|
protected boolean isDebug() {
|
|
return BuildConfig.DEBUG;
|
|
}
|
|
</pre></div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>true to enable LogCat output, false (default) if not</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/BuildConfig.html" title="class in no.nordicsemi.android.dfu"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuController.html" title="interface in no.nordicsemi.android.dfu"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?no/nordicsemi/android/dfu/DfuBaseService.html" target="_top">Frames</a></li>
|
|
<li><a href="DfuBaseService.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</body>
|
|
</html>
|