I ifz3ft New Member Nov 25, 2023 #1 Hi there I am referring to this post: https://www.b4x.com/android/forum/threads/kitkat-step-detector.40563/#post-242811, and the lines B4X: AddSensor(18, "TYPE_STEP_DETECTOR", False) AddSensor(19, "TYPE_STEP_COUNTER", False) Sorry to come back on such an old topic but when I execute this code on Redmi11 I get a fixed value of 98.508 and despite my moves. (and TYPE_STEP_DETECTOR appears with value 1 when I start moving) What is wrong here please ? Only Targetsdkversion=28 displays those 2 values. Higher version says "not supported". So another question is how to count steps with version 33 ? Thanks in advance
Hi there I am referring to this post: https://www.b4x.com/android/forum/threads/kitkat-step-detector.40563/#post-242811, and the lines B4X: AddSensor(18, "TYPE_STEP_DETECTOR", False) AddSensor(19, "TYPE_STEP_COUNTER", False) Sorry to come back on such an old topic but when I execute this code on Redmi11 I get a fixed value of 98.508 and despite my moves. (and TYPE_STEP_DETECTOR appears with value 1 when I start moving) What is wrong here please ? Only Targetsdkversion=28 displays those 2 values. Higher version says "not supported". So another question is how to count steps with version 33 ? Thanks in advance
Erel B4X founder Staff member Licensed User Longtime User Nov 26, 2023 #2 Privacy changes in Android 10 | Android Developers This document outlines the privacy-related features and behavior changes introduced in Android 10 (API level 29), focusing on enhanced user control over data and app capabilities. developer.android.com Manifest editor: Code: AddPermission(android.permission.ACTIVITY_RECOGNITION) And you need to use RuntimePermissions to request it at runtime (use the string "android.permission.ACTIVITY_RECOGNITION") Upvote 0
Privacy changes in Android 10 | Android Developers This document outlines the privacy-related features and behavior changes introduced in Android 10 (API level 29), focusing on enhanced user control over data and app capabilities. developer.android.com Manifest editor: Code: AddPermission(android.permission.ACTIVITY_RECOGNITION) And you need to use RuntimePermissions to request it at runtime (use the string "android.permission.ACTIVITY_RECOGNITION")