ok
This commit is contained in:
parent
a50979a502
commit
9e847cb658
8 changed files with 36 additions and 20 deletions
|
@ -1,6 +1,11 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
|
<<<<<<< Updated upstream
|
||||||
guid: 80685d60eb42cd340a5c76d410187801
|
guid: 80685d60eb42cd340a5c76d410187801
|
||||||
timeCreated: 1524716619
|
timeCreated: 1524716619
|
||||||
|
=======
|
||||||
|
guid: 1d9a971c325c98e4a81ea4ec2e52aed6
|
||||||
|
timeCreated: 1524756178
|
||||||
|
>>>>>>> Stashed changes
|
||||||
licenseType: Free
|
licenseType: Free
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
|
|
|
@ -67,7 +67,6 @@ namespace Assets.Scripts.Fitbit
|
||||||
{
|
{
|
||||||
DontDestroyOnLoad(this);
|
DontDestroyOnLoad(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnGUI()
|
private void OnGUI()
|
||||||
{
|
{
|
||||||
if (!_bGotTheData && !string.IsNullOrEmpty(_statusMessage) && _bFirstFire)
|
if (!_bGotTheData && !string.IsNullOrEmpty(_statusMessage) && _bFirstFire)
|
||||||
|
@ -125,7 +124,6 @@ namespace Assets.Scripts.Fitbit
|
||||||
_wwwRequest = new WWW(_tokenUrl, form.data, headers);
|
_wwwRequest = new WWW(_tokenUrl, form.data, headers);
|
||||||
StartCoroutine(WaitForAccess(_wwwRequest));
|
StartCoroutine(WaitForAccess(_wwwRequest));
|
||||||
|
|
||||||
|
|
||||||
while (!_wwwRequest.isDone)
|
while (!_wwwRequest.isDone)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -136,7 +134,6 @@ namespace Assets.Scripts.Fitbit
|
||||||
var parsed = new JSONObject(_wwwRequest.text);
|
var parsed = new JSONObject(_wwwRequest.text);
|
||||||
ParseAccessToken(parsed);
|
ParseAccessToken(parsed);
|
||||||
Debug.Log("\nParsed Token: " + _oAuth2.Token);
|
Debug.Log("\nParsed Token: " + _oAuth2.Token);
|
||||||
|
|
||||||
GetAllData();
|
GetAllData();
|
||||||
Debug.Log("Steps from Fitbit: " + _fitbitData.CurrentSteps);
|
Debug.Log("Steps from Fitbit: " + _fitbitData.CurrentSteps);
|
||||||
_bGotTheData = true;
|
_bGotTheData = true;
|
||||||
|
@ -157,7 +154,6 @@ namespace Assets.Scripts.Fitbit
|
||||||
|
|
||||||
_wwwRequest = new WWW(_tokenUrl, form.data, headers);
|
_wwwRequest = new WWW(_tokenUrl, form.data, headers);
|
||||||
StartCoroutine(WaitForAccess(_wwwRequest));
|
StartCoroutine(WaitForAccess(_wwwRequest));
|
||||||
|
|
||||||
while (!_wwwRequest.isDone)
|
while (!_wwwRequest.isDone)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -185,7 +181,6 @@ namespace Assets.Scripts.Fitbit
|
||||||
return;
|
return;
|
||||||
_returnCode = code.Substring(CustomAndroidScheme.Length + 6);
|
_returnCode = code.Substring(CustomAndroidScheme.Length + 6);
|
||||||
Debug.Log("Return Code is: " + _returnCode);
|
Debug.Log("Return Code is: " + _returnCode);
|
||||||
|
|
||||||
UseReturnCode();
|
UseReturnCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,9 +193,6 @@ namespace Assets.Scripts.Fitbit
|
||||||
UseReturnCode();
|
UseReturnCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void GetAllData()
|
public void GetAllData()
|
||||||
{
|
{
|
||||||
GetProfileData();
|
GetProfileData();
|
||||||
|
@ -264,7 +256,6 @@ namespace Assets.Scripts.Fitbit
|
||||||
Debug.Log("Doing Distance GET Request");
|
Debug.Log("Doing Distance GET Request");
|
||||||
StartCoroutine(WaitForAccess(_wwwRequest));
|
StartCoroutine(WaitForAccess(_wwwRequest));
|
||||||
|
|
||||||
|
|
||||||
while (!_wwwRequest.isDone)
|
while (!_wwwRequest.isDone)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -331,7 +322,6 @@ namespace Assets.Scripts.Fitbit
|
||||||
UppercaseFirst(tempKey);
|
UppercaseFirst(tempKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_bGotTheData = true;
|
_bGotTheData = true;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -406,7 +396,6 @@ namespace Assets.Scripts.Fitbit
|
||||||
XDocument doc = XDocument.Parse(json.InnerXml);
|
XDocument doc = XDocument.Parse(json.InnerXml);
|
||||||
var root = doc.Descendants("value").FirstOrDefault();
|
var root = doc.Descendants("value").FirstOrDefault();
|
||||||
_fitbitData.CurrentSteps = ToInt(root.Value);
|
_fitbitData.CurrentSteps = ToInt(root.Value);
|
||||||
|
|
||||||
Debug.Log("Steps from Fitbit: " + _fitbitData.CurrentSteps);
|
Debug.Log("Steps from Fitbit: " + _fitbitData.CurrentSteps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -480,7 +469,6 @@ namespace Assets.Scripts.Fitbit
|
||||||
Debug.Log(www.error);
|
Debug.Log(www.error);
|
||||||
}
|
}
|
||||||
Debug.Log("end of WaitForAccess \n");
|
Debug.Log("end of WaitForAccess \n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//just a utility function to get the correct date format for activity calls that require one
|
//just a utility function to get the correct date format for activity calls that require one
|
||||||
|
@ -509,8 +497,6 @@ namespace Assets.Scripts.Fitbit
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private int ToInt(string thing)
|
private int ToInt(string thing)
|
||||||
{
|
{
|
||||||
var temp = 0;
|
var temp = 0;
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
|
<<<<<<< Updated upstream
|
||||||
guid: aa5e856e9b878764db7c192f3aa20277
|
guid: aa5e856e9b878764db7c192f3aa20277
|
||||||
timeCreated: 1524716713
|
timeCreated: 1524716713
|
||||||
|
=======
|
||||||
|
guid: 849590d4a954ae445aa5db73d734450c
|
||||||
|
timeCreated: 1524756213
|
||||||
|
>>>>>>> Stashed changes
|
||||||
licenseType: Free
|
licenseType: Free
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
|
<<<<<<< Updated upstream
|
||||||
guid: 36444c03eedb84147a326a329de30d0e
|
guid: 36444c03eedb84147a326a329de30d0e
|
||||||
timeCreated: 1524716713
|
timeCreated: 1524716713
|
||||||
|
=======
|
||||||
|
guid: 80ba6a52e9d55564fbe8130844b17f29
|
||||||
|
timeCreated: 1524756213
|
||||||
|
>>>>>>> Stashed changes
|
||||||
licenseType: Free
|
licenseType: Free
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
|
<<<<<<< Updated upstream
|
||||||
guid: 7a928c029cb14204588724261a513ec1
|
guid: 7a928c029cb14204588724261a513ec1
|
||||||
timeCreated: 1524716713
|
timeCreated: 1524716713
|
||||||
|
=======
|
||||||
|
guid: 1d8622418b8bead4cad17658d650c6c2
|
||||||
|
timeCreated: 1524756213
|
||||||
|
>>>>>>> Stashed changes
|
||||||
licenseType: Free
|
licenseType: Free
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
|
<<<<<<< Updated upstream
|
||||||
guid: da64cad21a33a6444ac511376fcb771b
|
guid: da64cad21a33a6444ac511376fcb771b
|
||||||
timeCreated: 1524716713
|
timeCreated: 1524716713
|
||||||
|
=======
|
||||||
|
guid: 9101b04121334074fb6e70fc34eeb3f9
|
||||||
|
timeCreated: 1524756213
|
||||||
|
>>>>>>> Stashed changes
|
||||||
licenseType: Free
|
licenseType: Free
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
|
<<<<<<< Updated upstream
|
||||||
guid: 2e4069fa83cbbb041aa91e83f7ece28e
|
guid: 2e4069fa83cbbb041aa91e83f7ece28e
|
||||||
timeCreated: 1524716713
|
timeCreated: 1524716713
|
||||||
|
=======
|
||||||
|
guid: 1d4c10710438d404085599a6fe50d37b
|
||||||
|
timeCreated: 1524756213
|
||||||
|
>>>>>>> Stashed changes
|
||||||
licenseType: Free
|
licenseType: Free
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
|
|
BIN
MoCha/UpgradeLog.htm
Normal file
BIN
MoCha/UpgradeLog.htm
Normal file
Binary file not shown.
Reference in a new issue