Esempio n. 1
0
 private void subscribe()
 {
     //Subscribe
     SA.Fitness.SubscribeRequest.Builder builder = new SA.Fitness.SubscribeRequest.Builder();
     builder.SetDataType(SA.Fitness.DataType.TYPE_STEP_COUNT_DELTA);
     SA.Fitness.SubscribeRequest request = builder.Build();
     request.OnSubscribeFinished += Request_OnSubscribeFinished;
     SA.Fitness.Recording.Instance.Subscribe(request);
 }
Esempio n. 2
0
        //--------------------------------------
        // PUBLIC API CALL METHODS
        //--------------------------------------

        public void Subscribe(SubscribeRequest request)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(request.Id);
            builder.Append(Connection.SEPARATOR1);
            builder.Append(request.DataType.Value);

            subscriptions.Add(request.Id, request);
            Proxy.Subscribe(builder.ToString());
        }