Coder Social home page Coder Social logo

movesensedotnet's People

Contributors

andycw avatar avodovnik avatar tentom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

movesensedotnet's Issues

Deployment to Windows x86-64 architecture

I need to develop a Windows UWP application or a WPF that could use Movesense.
Is it possible to create a C# application that works on windows with x86-64 architecture and not with ARM mobile deployments?

Permission fails for android versions lower than Marshmallow

As run time permissions is not introduced before android Marshmallow the BasicDemo will crash. I am not sure if this is caused by the Plugin.Permission or the MovesenseDotNet library.

As I am not familiar with Android programming I did not want to make a pull request for this issue.

My solution was to wrap the permission check to include a version check and skip the permission check for older versions of android. So the GetLocationPermissionAsync() now look like this:

void GetLocationPermissionAsync()
{
    //Check to see if any permission in our group is available, if one, then all are
    const string permission = Manifest.Permission.AccessCoarseLocation;
    if (Android.OS.Build.VERSION.SdkInt >= BuildVersionCodes.M) {
        if (CheckSelfPermission(permission) == (int)Permission.Granted) {
           return;
        }
        //Finally request permissions with the list of permissions and Id
        RequestPermissions(PermissionsLocation, RequestLocationId);
     }
}

in the mainActivity.cs file. This might be a bad solution but it is working for me on Android Kit-Kat (4.4.2) on a Samsung galaxy s4 mini.

HR issue

Hi there,

I am trying to read HR data from the device, I am using the following piece of code:
image

but I get the following error:
Unhandled Exception:
MdsLibrary.MdsException: Com.Movesense.Mds.MdsException: Failed status: 404, reason: NOT_FOUND
--- End of managed Com.Movesense.Mds.MdsException stack trace ---
com.movesense.mds.MdsException: Failed status: 404, reason: NOT_FOUND at com.movesense.mds.internal.operation.MdsRestOperation.onResponse(MdsRestOperation.java:81) at com.movesense.mds.internal.operation.MdsResponseOperation.protectedRun(MdsResponseOperation.java:26)
at com.movesense.mds.internal.workqueue.QueueOperation.run(QueueOperation.java:70)
at com.movesense.mds.internal.workqueue.WorkQueueImpl.runOperation(WorkQueueImpl.java:79)
at com.movesense.mds.internal.workqueue.WorkQueueImpl$1.run(WorkQueueImpl.java:30)
at java.lang.Thread.run(Thread.java:784)
occurred

Also, will HR capability be added in the future?

IMovesense.GetLogbookDataJsonAsync output

The output from IMovesense.GetLogbookDataJsonAsync has more than one value for ArrayAcc, ArrayGyro and ArrayMagn at the same timestamp. Not sure which of the values I should use.

Here is the output:
image

Here is the code for context:

//Delete all data entries
await movesense.DeleteLogEntriesAsync(tappedSensor.Name);

//Create DataLogger config
await movesense.SetupLoggerAsync(tappedSensor.Name, 26);

//Start logging
await movesense.SetLoggerStatusAsync(tappedSensor.Name, true);

//Read for 2 seconds
Thread.Sleep(2000);

//Stop logging
await movesense.SetLoggerStatusAsync(tappedSensor.Name, false);

//List Log contents
var logbook_entries = await movesense.GetLogEntriesAsync(tappedSensor.Name);

//Read Data
var data = await movesense.GetLogbookDataJsonAsync(tappedSensor.Name, logbook_entries.LogEntries.Elements[0].Id);

ApiSubscriptionAsync will fail for all services that does not have a freq in its path

The ApiSubscriptionAsync function is requiring a freq as an input argument which is put on the end of the path. This causes the function to return 404 NOT_FOUND for all API calls that does not have a number at the end. eg the /Time api from the movesense library.

await Plugin.Movesense.CrossMovesense.Current.ApiSubscriptionAsync<string>(this.Device.Name, "Temp/", 1 , 
                                          (d) => {
                                          Debug.WriteLine(d);
                                           });

Also note that in ApiSubscriptionAsync the user will need to remove the leading slash and insert a trailing slash in the path compared to the ApiCallASync where you need the leading slash but not the tailing slash.

Suggested fix: remove the "freq" argument or make it nullable. Also decide on where to put the slashes.

workaround (for your own services): Add a magic number to the end of your path and use that as the freq when subscribing.

Edit:
This was on an Android device running android 4.4 (KitKat). Code compiled with VS 2017 and the V1.0.3-beta of the Plugin.Movesense NuGet package

GetLogbookEntries API not functional - when status 100

The API /Mem/Logbook/Entries (see docs), is supposed to return either status code 200 or 100 if there is much data, that needs to be spiltted to multiple requests.

In that case the method GetLogEntriesAsync as well as ApiCallAsync throws an MdsException.

Example call:

IMovesense mds /* ... */;
string data = await mds.ApiCallAsync<string>(myMovesenseDevice, MdsOp.GET, "/Mem/Logbook/Entries");

The call works for small amounts of data on the movesense device. However not, if there are plenty of LogbookEntries stored (about 50).

As stated in the above linked docs, the api caller has to react to status code 100. In that case, the first 4-5 entries are already in the body of the "Status 100"-response, as seen in logcat. that should be cached, and the api call needs to be called again (with parameter StartAfterId), as long as there are no more data available.

Edit: The same seems to apply to /Mem/Logbook/byId/{LogId}/Data docs

Btw: Please provide the steps to compile the project in src folder, so we can try to fork and PR a solution ourself.

MoveSenseBindingiOS 1.38.0.2 Missing

Plugin.Movesense 2.2.3.2 expects on iOS MoveSenseBindingiOS 1.38.0.2, but only 1.38.0.1 is available. Thus, currently, you can't use the latest version on iOS.

Error on connecting to sensor

When running the following code:
await movesense.ConnectMdsAsync(tappedSensor.Id);

I get this error, I am not sure what may be causing it. :
No implementation found for void com.movesense.mds.SDSInternalWrapper.sdsSetDelegate(java.lang.Object) (tried Java_com_movesense_mds_SDSInternalWrapper_sdsSetDelegate and Java_com_movesense_mds_SDSInternalWrapper_sdsSetDelegate__Ljava_lang_Object_2)

Error running CustomServiceSample.Android

I get the following error on I build CustomServiceSample.Android: Unable to remove directory "obj\Debug\81\android\bin\classes". Could not find a part of the path 'AccessibilityManagerCompat_AccessibilityStateChangeListenerImplementor.class'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.