语言

Menu
Sites
Language
Native Activity Recognition

I can't get the Activity Recognition get running in native apps (nor in web apps). My Code:

int result = activity_create(&handle);
        if (ACTIVITY_ERROR_NONE != result) {
			// ERROR HANDLING
		}
		result = activity_start_recognition(handle, type, ActivityRecognition::EventCallBack, this);
		if (ACTIVITY_ERROR_NONE != result) {
			// ERROR HANDLING
		}

sometimes but almost never the callback is called with Activity type WALK. My App is a background service with POWER LOCK on and background mode enabled. Priviliges healthinfo and location are enabled.

Does anyone have an idea ? Is the feature deprecated ? I cant get any examples on this and almost no infos.

 

EDIT: My watch is a Samsung Galaxy Watch Active 2, perhaps my issue is related to the hardware ?

 

Thanks

编辑者为: Patrick Pogscheba 03 11月, 2020