src/com/example/ant_simple_test/Activity_DisplayBase.java
// on success or reporting failure to user.
on success or reporting failure to user.
on success or reporting failure to user .
@Override
                            public void onResultReceived(AntPlusBikeCadencePcc result,
                                RequestAccessResult resultCode,
                                DeviceState initialDeviceStateCode)
                            {
                                switch (resultCode)
                                {
                                    case SUCCESS:
                                        bcPcc = result;
                                        bcPcc.subscribeCalculatedCadenceEvent(new ICalculatedCadenceReceiver()
                                            {
                                                @Override
                                                public void onNewCalculatedCadence(
                                                    long estTimestamp,
                                                    EnumSet<EventFlag> eventFlags,
                                                    final BigDecimal calculatedCadence)
                                                {
                                                    runOnUiThread(new Runnable()
                                                    {
                                                        @Override
                                                        public void run()
                                                        {
                                                        	Log.d(TAG, "calculatedCadence : " + calculatedCadence);
                                                            tv_value_2.setText(String.valueOf(calculatedCadence));
                                                        }
                                                    });
                                                }
                                            });
                                        break;
                                    case CHANNEL_NOT_AVAILABLE:
                                        break;
                                    case BAD_PARAMS:
                                        break;
                                    case OTHER_FAILURE:
                                        break;
                                    case DEPENDENCY_NOT_INSTALLED:
                                        break;
                                    default:
                                        break;
                                }
                            }
@ Override public void onResultReceived ( AntPlusBikeCadencePcc result , RequestAccessResult resultCode , DeviceState initialDeviceStateCode ) { switch ( resultCode ) { case SUCCESS : bcPcc = result ; bcPcc . subscribeCalculatedCadenceEvent ( new ICalculatedCadenceReceiver ( ) { @ Override public void onNewCalculatedCadence ( long estTimestamp , EnumSet < EventFlag > eventFlags , final BigDecimal calculatedCadence ) { runOnUiThread ( new Runnable ( ) { @ Override public void run ( ) { Log . d ( TAG , "calculatedCadence : " + calculatedCadence ) ; tv_value_2 . setText ( String . valueOf ( calculatedCadence ) ) ; } } ) ; } } ) ; break ; case CHANNEL_NOT_AVAILABLE : break ; case BAD_PARAMS : break ; case OTHER_FAILURE : break ; case DEPENDENCY_NOT_INSTALLED : break ; default : break ; } }
on success or reporting failure to user.
on success or reporting failure to user .