B4A Library Physical Activity Recognition Detection

Status
Not open for further replies.

brunnlechner

Member
Licensed User
Longtime User
Hallo,
the Activity Recognition Example works,
but when I press stop and then start any more activities are displayed.
Only when I finish in the task manager and start it works again.

This Example,
is an "improved" version of the Activity Recognition Example is works fine.
Activity Recognition Example Version 1.0 njdude.activityrecognition.sample
https://jumpshare.com/b/GLiDOG2y4aVjAigh1bz0

Thank you
Franz
 
Last edited:

Rusty

Well-Known Member
Licensed User
Longtime User
I'm having problems getting the Google-Play-service_lib\res installed.
When I bring up the SDK manager, it shows it is installed, but I keep getting this error:
ERROR: resource directory 'c:\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res' does not exist
The path exists up to here: c:\android-sdk\extras\google\google_play_services
And in fact, the file doesn't exist...
I've tried to install it, but no luck.
Ideas?
Thanks,
Rusty
 

Rusty

Well-Known Member
Licensed User
Longtime User
Thanks Don,
I upgraded to V6, the day it was released. No happiness on this one.
any other ideas?
Rusty
 

Rusty

Well-Known Member
Licensed User
Longtime User
Thanks Erel,
I'm surely doing something wrong.
I completely un-installed the Android SDK, downloaded a new one and installed it specifically selecting Google Play Services to be installed.
When I look at the C:\Android-SDK\extras\google\google_play_services folder, there is no .jar file at all.
There are only:
docs (folder)
samples (Folder)
source.properties (file)
Any advice on this?
Thanks,
Rusty
 

Rusty

Well-Known Member
Licensed User
Longtime User
...re removed and re installed SDK.
After MANY "install X packages", finally it installed required content as per your last post.
Thanks
 

Sgardy

Member
Licensed User
Longtime User
The attached sample uses this new library and displays the results on an activity, when the HOME key it pressed, the results will show on the status bar via a notification.

There's room for improvement, but this code might give you an idea.
I get this... why?

Compiling generated Java code. Error
B4A line: 45
ar.Initialize(\
javac 1.8.0_20
src\njdude\activityrecognition\sample\main.java:344: error: cannot access GooglePlayServicesClient
_v5.Initialize("ar",processBA);
^
class file for com.google.android.gms.common.GooglePlayServicesClient not found
 

MarcoRome

Expert
Licensed User
Longtime User
Look THIS
 

brunnlechner

Member
Licensed User
Longtime User
Button Start: Activity is displayed
Button Stop ( ar.Stop) : Activity is stopped
Button Start (ar.Connect(5000)): not Activity is displayed


https://www.b4x.com/android/forum/attachments/activityrecognition_sample-zip.

******************
Fixed bug: always ar.Initialize("ar") just before ar.Connect(5000)
******************
Button Start: Activity is displayed
Button Stop ( ar.Stop) : Activity is stopped
Button Start (ar.Connect(5000)): not Activity is displayed


https://www.b4x.com/android/forum/attachments/activityrecognition_sample-zip.
 

trueboss323

Active Member
Licensed User
Longtime User
Does this library work properly while you are driving but stopped at a red light? Would it stay at in vehicle or change to on foot?
 
Last edited:

Sgardy

Member
Licensed User
Longtime User
Hi Erel, why do I get this?

ar.Initialize(\
javac 1.8.0_20
src\b4a\example\main.java:344: error: cannot access GooglePlayServicesClient
_v5.Initialize("ar",processBA);
^
class file for com.google.android.gms.common.GooglePlayServicesClient not found
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…