Skip to content

Commit

Permalink
updated ios, watchOs and android sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
Erkki Silvola committed Sep 30, 2019
1 parent 86c8997 commit 3364e97
Show file tree
Hide file tree
Showing 39 changed files with 1,167 additions and 284 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Most accurate Heart rate sensor in the markets. The H10 is used in the Getting s
[Store page](https://www.polar.com/en/products/accessories/H10_heart_rate_sensor)

#### H10 heart rate sensor available data types
* From version 3.0.35 onwards. Available later.
* From version 3.0.35 onwards.
* Heart rate as beats per minute. RR Interval in ms and 1/1024 format.
* Electrocardiography (ECG) data in µV. Default epoch for timestamp is 1.1.2000
* Accelerometer data with samplerates of 25Hz, 50Hz, 100Hz and 200Hz and range of 2G, 4G and 8G. Axis specific acceleration data in mG. Default epoch for timestamp is 1.1.2000
Expand All @@ -37,7 +37,7 @@ Optical heart rate sensor is a rechargeable device that measures user’s heart
[Store page](https://www.polar.com/us-en/products/accessories/oh1-optical-heart-rate-sensor)

#### OH1 Optical heart rate sensor available data types
* From version 2.0.8 onwards. Available later.
* From version 2.0.8 onwards.
* Heart rate as beats per minute.
* Photoplethysmograpy (PPG) values.
* PP interval (milliseconds) representing cardiac pulse-to-pulse interval extracted from PPG signal.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ public void run() throws Exception {
@SuppressLint("CheckResult")
@Override
public void onClick(View view) {
api.startRecording(DEVICE_ID,"TEST_APP_ID", PolarBleApi.RecordingInterval.INTERVAL_1S, PolarBleApi.SampleType.HR).subscribe(
api.startRecording(DEVICE_ID,"TEST_APP_ID", PolarBleApi.RecordingInterval.INTERVAL_1S, PolarBleApi.SampleType.RR).subscribe(
new Action() {
@Override
public void run() throws Exception {
Expand Down
3 changes: 2 additions & 1 deletion examples/example-ios/polarBleSdkTestApp/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class ViewController: UIViewController,
api.powerStateObserver = self
api.deviceFeaturesObserver = self
api.logger = self
api.cccWriteObserver = self
api.polarFilter(false)
NSLog("\(PolarBleApiDefaultImpl.versionInfo())")
}
Expand Down Expand Up @@ -241,7 +242,7 @@ class ViewController: UIViewController,
}

@IBAction func startH10Recording(_ sender: Any) {
_ = api.startRecording(deviceId, exerciseId: "TEST_APP_ID", interval: .interval_1s, sampleType: .hr).observeOn(MainScheduler.instance).subscribe{ e in
_ = api.startRecording(deviceId, exerciseId: "TEST_APP_ID", interval: .interval_1s, sampleType: .rr).observeOn(MainScheduler.instance).subscribe{ e in
switch e {
case .completed:
NSLog("recording started")
Expand Down
143 changes: 72 additions & 71 deletions polar-sdk-android/docs/html/BDBleApiImpl_8java_source.html

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions polar-sdk-android/docs/html/PolarBiozData_8java_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@
<div class="title">PolarBiozData.java</div> </div>
</div><!--header-->
<div class="contents">
<a href="PolarBiozData_8java.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">// Copyright © 2019 Polar Electro Oy. All rights reserved.</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="keyword">package </span>polar.com.sdk.api.model;</div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="keyword">import</span> java.util.List;</div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html"> 9</a></span>&#160;<span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html">PolarBiozData</a> {</div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a8bb9752d020c3b3948ed97c334fc3858"> 14</a></span>&#160; <span class="keyword">public</span> <span class="keywordtype">long</span> <a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a8bb9752d020c3b3948ed97c334fc3858">timeStamp</a>;</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a829694108df47c3f5276f2dd845f398a"> 19</a></span>&#160; <span class="keyword">public</span> List&lt;Integer&gt; <a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a829694108df47c3f5276f2dd845f398a">samples</a>;</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a73ace427af9328e21ff151fbf06f0e7a"> 21</a></span>&#160; <span class="keyword">public</span> <a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a73ace427af9328e21ff151fbf06f0e7a">PolarBiozData</a>(<span class="keywordtype">long</span> <a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a8bb9752d020c3b3948ed97c334fc3858">timeStamp</a>, List&lt;Integer&gt; <a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a829694108df47c3f5276f2dd845f398a">samples</a>) {</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160; this.timeStamp = <a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a8bb9752d020c3b3948ed97c334fc3858">timeStamp</a>;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; this.samples = <a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a829694108df47c3f5276f2dd845f398a">samples</a>;</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; }</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;}</div><div class="ttc" id="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData_html_a8bb9752d020c3b3948ed97c334fc3858"><div class="ttname"><a href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a8bb9752d020c3b3948ed97c334fc3858">polar.com.sdk.api.model.PolarBiozData.timeStamp</a></div><div class="ttdeci">long timeStamp</div><div class="ttdef"><b>Definition:</b> <a href="PolarBiozData_8java_source.html#l00014">PolarBiozData.java:14</a></div></div>
<div class="ttc" id="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData_html_a73ace427af9328e21ff151fbf06f0e7a"><div class="ttname"><a href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a73ace427af9328e21ff151fbf06f0e7a">polar.com.sdk.api.model.PolarBiozData.PolarBiozData</a></div><div class="ttdeci">PolarBiozData(long timeStamp, List&lt; Integer &gt; samples)</div><div class="ttdef"><b>Definition:</b> <a href="PolarBiozData_8java_source.html#l00021">PolarBiozData.java:21</a></div></div>
<a href="PolarBiozData_8java.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">// Copyright © 2019 Polar Electro Oy. All rights reserved.</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="keyword">package </span>polar.com.sdk.api.model;</div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="keyword">import</span> java.util.List;</div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html"> 9</a></span>&#160;<span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html">PolarBiozData</a> {</div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a8bb9752d020c3b3948ed97c334fc3858"> 14</a></span>&#160; <span class="keyword">public</span> <span class="keywordtype">long</span> <a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a8bb9752d020c3b3948ed97c334fc3858">timeStamp</a>;</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a829694108df47c3f5276f2dd845f398a"> 19</a></span>&#160; <span class="keyword">public</span> List&lt;Integer&gt; <a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a829694108df47c3f5276f2dd845f398a">samples</a>;</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#ae71748c202067f3e082b08d62cba409c"> 20</a></span>&#160; <span class="keyword">public</span> <span class="keywordtype">byte</span> <a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#ae71748c202067f3e082b08d62cba409c">status</a>;</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a22ac1739749274ff4076dd8a5572b935"> 22</a></span>&#160; <span class="keyword">public</span> <a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a22ac1739749274ff4076dd8a5572b935">PolarBiozData</a>(<span class="keywordtype">long</span> <a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a8bb9752d020c3b3948ed97c334fc3858">timeStamp</a>, List&lt;Integer&gt; <a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a829694108df47c3f5276f2dd845f398a">samples</a>, <span class="keywordtype">byte</span> <a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#ae71748c202067f3e082b08d62cba409c">status</a>) {</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; this.timeStamp = <a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a8bb9752d020c3b3948ed97c334fc3858">timeStamp</a>;</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; this.samples = <a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a829694108df47c3f5276f2dd845f398a">samples</a>;</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; this.status = <a class="code" href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#ae71748c202067f3e082b08d62cba409c">status</a>;</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160; }</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;}</div><div class="ttc" id="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData_html_ae71748c202067f3e082b08d62cba409c"><div class="ttname"><a href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#ae71748c202067f3e082b08d62cba409c">polar.com.sdk.api.model.PolarBiozData.status</a></div><div class="ttdeci">byte status</div><div class="ttdef"><b>Definition:</b> <a href="PolarBiozData_8java_source.html#l00020">PolarBiozData.java:20</a></div></div>
<div class="ttc" id="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData_html_a8bb9752d020c3b3948ed97c334fc3858"><div class="ttname"><a href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a8bb9752d020c3b3948ed97c334fc3858">polar.com.sdk.api.model.PolarBiozData.timeStamp</a></div><div class="ttdeci">long timeStamp</div><div class="ttdef"><b>Definition:</b> <a href="PolarBiozData_8java_source.html#l00014">PolarBiozData.java:14</a></div></div>
<div class="ttc" id="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData_html_a22ac1739749274ff4076dd8a5572b935"><div class="ttname"><a href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a22ac1739749274ff4076dd8a5572b935">polar.com.sdk.api.model.PolarBiozData.PolarBiozData</a></div><div class="ttdeci">PolarBiozData(long timeStamp, List&lt; Integer &gt; samples, byte status)</div><div class="ttdef"><b>Definition:</b> <a href="PolarBiozData_8java_source.html#l00022">PolarBiozData.java:22</a></div></div>
<div class="ttc" id="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData_html_a829694108df47c3f5276f2dd845f398a"><div class="ttname"><a href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html#a829694108df47c3f5276f2dd845f398a">polar.com.sdk.api.model.PolarBiozData.samples</a></div><div class="ttdeci">List&lt; Integer &gt; samples</div><div class="ttdef"><b>Definition:</b> <a href="PolarBiozData_8java_source.html#l00019">PolarBiozData.java:19</a></div></div>
<div class="ttc" id="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData_html"><div class="ttname"><a href="classpolar_1_1com_1_1sdk_1_1api_1_1model_1_1PolarBiozData.html">polar.com.sdk.api.model.PolarBiozData</a></div><div class="ttdef"><b>Definition:</b> <a href="PolarBiozData_8java_source.html#l00009">PolarBiozData.java:9</a></div></div>
</div><!-- fragment --></div><!-- contents -->
Expand Down
97 changes: 97 additions & 0 deletions polar-sdk-android/docs/html/PolarBleApiCallbackProvider_8java.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SDK for Polar sensors: PolarBleApiCallbackProvider.java File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">SDK for Polar sensors
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('PolarBleApiCallbackProvider_8java.html','');});
/* @license-end */
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#namespaces">Packages</a> </div>
<div class="headertitle">
<div class="title">PolarBleApiCallbackProvider.java File Reference</div> </div>
</div><!--header-->
<div class="contents">

<p><a href="PolarBleApiCallbackProvider_8java_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">interface &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacepolar_1_1com_1_1sdk_1_1api_1_1PolarBleApiCallbackProvider.html">polar.com.sdk.api.PolarBleApiCallbackProvider</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Packages</h2></td></tr>
<tr class="memitem:namespacepolar_1_1com_1_1sdk_1_1api"><td class="memItemLeft" align="right" valign="top">package &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepolar_1_1com_1_1sdk_1_1api.html">polar.com.sdk.api</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_5eb159725f84c66aafd839904a4acdd0.html">main</a></li><li class="navelem"><a class="el" href="dir_fd3f6763802dee1ad875f6c80eac0bda.html">java</a></li><li class="navelem"><a class="el" href="dir_57f0ca8c420846e7d0426b6adce5936e.html">polar</a></li><li class="navelem"><a class="el" href="dir_1ff65af9a4dc657909b37e4b73346a08.html">com</a></li><li class="navelem"><a class="el" href="dir_fac840b1a3a552bfa17e24a7f5dc9555.html">sdk</a></li><li class="navelem"><a class="el" href="dir_b936df1acb3136008a04b697d550213c.html">api</a></li><li class="navelem"><a class="el" href="PolarBleApiCallbackProvider_8java.html">PolarBleApiCallbackProvider.java</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
</ul>
</div>
</body>
</html>
Loading

0 comments on commit 3364e97

Please sign in to comment.