本文整理汇总了Java中com.google.android.glass.timeline.TimelineManager类的典型用法代码示例。如果您正苦于以下问题:Java TimelineManager类的具体用法?Java TimelineManager怎么用?Java TimelineManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TimelineManager类属于com.google.android.glass.timeline包,在下文中一共展示了TimelineManager类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onStartCommand
import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
TimelineManager manager = TimelineManager.from(this);
LiveCard card = manager.createLiveCard("awesome");
RemoteViews view = new RemoteViews(this.getPackageName(), R.layout.live_card_layout);
view.setTextViewText(android.R.id.text1, "Amazing");
card.setViews(view);
Intent menuIntent = new Intent(this, CardActivity.class);
menuIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
card.setAction(PendingIntent.getActivity(this, 0, menuIntent, 0));
card.publish(LiveCard.PublishMode.REVEAL);
return START_STICKY;
}
示例2: onCreate
import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mTimelineManager = TimelineManager.from(this);
// Even though the text-to-speech engine is only used in response to a menu action, we
// initialize it when the application starts so that we avoid delays that could occur
// if we waited until it was needed to start it up.
mSpeech = new TextToSpeech(this, new TextToSpeech.OnInitListener() {
@Override
public void onInit(int status) {
// Do nothing.
}
});
SensorManager sensorManager =
(SensorManager) getSystemService(Context.SENSOR_SERVICE);
LocationManager locationManager =
(LocationManager) getSystemService(Context.LOCATION_SERVICE);
mOrientationManager = new OrientationManager(sensorManager, locationManager);
mLandmarks = new Landmarks(this);
}
示例3: onStartCommand
import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
/**
* Note:
* Services that have already started will receive information through this method.
*
* "startService() delivers a message to an existing running copy of the service,
* via the onStartCommand() method, if the service was already created. If it isn't yet
* created, it will create such a copy (thereby triggering a call to onCreate() first,
* followed by the onStartCommand) if there is no running copy of the service."
*/
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
mTimelineManager = TimelineManager.from(this);
try {
mROSMonitor = new ROSMonitorManager(this, mConnection);
mConnection.connect(HOST_ADDRESS,mROSMonitor );
} catch (WebSocketException e) {
e.printStackTrace();
}
return START_STICKY;
}
示例4: onCreate
import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mTimelineManager = TimelineManager.from(this);
// Even though the text-to-speech engine is only used in response to a menu action, we
// initialize it when the application starts so that we avoid delays that could occur
// if we waited until it was needed to start it up.
mSpeech = new TextToSpeech(this, new TextToSpeech.OnInitListener() {
@Override
public void onInit(int status) {
// Do nothing.
}
});
SensorManager sensorManager =
(SensorManager) getSystemService(Context.SENSOR_SERVICE);
LocationManager locationManager =
(LocationManager) getSystemService(Context.LOCATION_SERVICE);
File omDir = new File(getApplicationContext().getExternalFilesDir(null),
ORIENTATIONS_DIR);
if (!omDir.exists()) {
omDir.mkdirs();
}
recordingOrientationManager = new RecordingOrientationManager(
new SensorsOrientationManager(sensorManager, locationManager),
omDir, false);
replayingOrientationManager = new ReplayingOrientationManager();
replayingOrientationManager.addReplayListener(replayListener);
}
示例5: onCreate
import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mTimelineManager = TimelineManager.from(this);
mSpeech = new TextToSpeech(this, new TextToSpeech.OnInitListener() {
@Override
public void onInit(int status) {
//do nothing
}
});
}
示例6: onCreate
import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
userLife = startingLife;
enemyLife = startingLife;
mTimelineManager = TimelineManager.from(this);
}
示例7: onCreate
import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mTimelineManager = TimelineManager.from(this);
mObdManager = new ObdManager();
}
示例8: onCreate
import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mTimelineManager = TimelineManager.from(this);
mTimerDrawer = new PomoDrawer(this);
}
示例9: onCreate
import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mTimelineManager = TimelineManager.from(this);
}
示例10: onCreate
import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
mTimelineManager = TimelineManager.from(this);
super.onCreate();
}
示例11: onCreate
import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mTimelineManager = TimelineManager.from(this);
}
示例12: onCreate
import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mTimelineManager = TimelineManager.from(this);
mTimerDrawer = new TimerDrawer(this);
}
示例13: onCreate
import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mTimelineManager = TimelineManager.from(this);
mTrainBrainDrawer = new TrainBrainDrawer(this);
}
示例14: onCreate
import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mTimelineManager = TimelineManager.from(this);
}