Hello - I'm trying to start a Google Fit session automatically. I want to use an nfc tag to start "kayaking" activity.
I've been able to launch Fit using a shortcut, but I think I need to use an Intent to start the activity.
From Google API docs I found this, but I'm not sure how to use this in Automagic, and it seems like an Intent should be easier..?  Thanks!
     GoogleApiClient client = new GoogleApiClient.Builder(context)
         .addApi(Fitness.SESSIONS_API)
         ...
         .build();
     client.connect();
     Session session = new Session.Builder()
         .setName(sessionName)
         .setIdentifier(identifier)
         .setDescription(description)
         .setStartTimeMillis(startTime.getMillis(), TimeUnit.MILLISECONDS)
         .build();
     PendingResult<Status> pendingResult
         = Fitness.SessionsApi.startSession(client, session);
			
									
									
						Google Fit session
Moderator: Martin
Re: Google Fit session
http://automagic4android.com/flow.php?i ... a57fbed2ee
See attached flow above, showing my new approach to this. I'm getting the following error. Any help is much appreciated!
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=vnd.google.fitness.TRACK typ=vnd.google.fitness.activity/kayaking flg=0x10000000 (has extras) }
			
									
									
						See attached flow above, showing my new approach to this. I'm getting the following error. Any help is much appreciated!
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=vnd.google.fitness.TRACK typ=vnd.google.fitness.activity/kayaking flg=0x10000000 (has extras) }