Does vivoactive support ActivityRecording?

Former Member
Former Member
Hi,I have a problem of ConnectIQ SDK, The codes of ActivityRecording works fine in device simulator,But can't work in vivoactive watch. I use codes below:

using Toybox.WatchUi as Ui;
using Toybox.Graphics as Gfx;
using Toybox.System as Sys;
using Toybox.Lang as Lang;
using Toybox.ActivityRecording as Record;
using Toybox.Position as Position;

var session = null;

class BaseInputDelegate extends Ui.BehaviorDelegate
{

function onMenu() {
if( Toybox has :ActivityRecording ) {
if( ( session == null ) || ( session.isRecording() == false ) ) {
session = Record.createSession({:name=>"HIKING", :sport=>Record.SPORT_HIKING});
session.start();
Ui.requestUpdate();
}
else if( ( session != null ) && session.isRecording() ) {
session.stop();
session.save();
session = null;
Ui.requestUpdate();
}
}
return true ;
}

}

class HikingView extends Ui.View {
// Some codes here. abbreviated

function onUpdate(dc) {
if( Toybox has :ActivityRecording ) {
//Do something
} else {
//Do something
//It always come into "Here".
}
}
}

It always come into "else".
Firmware of vivoactive watch is 2.50, and SDK version is 1.1.1
How do I write Recording function?

Thanks