can any one help me to convert this code kodular IDE for extension as i am getting error
some one help me how we can arrange this code according to kodular IDE
/The app should check if the permission is granted already/
if (ContextCompat.checkSelfPermission(thisActivity, Manifest.permission.ACTIVITY_RECOGNITION)
!= PackageManager.PERMISSION_GRANTED) {
// Permission is not granted
}
/To request the permission/
ActivityCompat.requestPermissions(thisActivity,
arrayOf(Manifest.permission.ACTIVITY_RECOGNITION),
MY_PERMISSIONS_REQUEST_ACTIVITY_RECOGNITION);
/* app can read the current daily step*/
private class VerifyDataTask extends AsyncTask<Void, Void, Void> {
protected Void doInBackground(Void… params) {
long total = 0;
PendingResult<DailyTotalResult> result = Fitness.HistoryApi.readDailyTotal(mClient, DataType.TYPE_STEP_COUNT_DELTA);
DailyTotalResult totalResult = result.await(30, TimeUnit.SECONDS);
if (totalResult.getStatus().isSuccess()) {
DataSet totalSet = totalResult.getTotal();
total = totalSet.isEmpty()
? 0
: totalSet.getDataPoints().get(0).getValue(Field.FIELD_STEPS).asInt();
} else {
Log.w(TAG, "There was a problem getting the step count.");
}
Log.i(TAG, "Total steps: " + total);
return null;
}
Thank you yes i have used that component but problem is if just touch or shake u r mobile it will count the steps that y i need this extension as i heard google fit will count the steps 80% accurate and if u shake mobile fast then only it will count else not please help me on this.
i am not good in coding else i could help you i think he is busy in there work or he is not checking there inbox try to message to group of kodular extension developers or contact @Deep_Host at there youtube channel