当前位置: 首页>>代码示例>>Java>>正文


Java TimelineManager类代码示例

本文整理汇总了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;
}
 
开发者ID:briangriffey,项目名称:glass-full-activity,代码行数:19,代码来源:LaunchActivityService.java

示例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);
}
 
开发者ID:luisibanez,项目名称:gdk-line-sample,代码行数:25,代码来源:CompassService.java

示例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;
}
 
开发者ID:unl-nimbus-lab,项目名称:ros_glass_tools,代码行数:26,代码来源:ROSMonitorService.java

示例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);
}
 
开发者ID:euedge,项目名称:orientation-recorder,代码行数:34,代码来源:OrientationRecorderService.java

示例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
            }
        });
}
 
开发者ID:nkp,项目名称:ichack14,代码行数:12,代码来源:MainService.java

示例6: onCreate

import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    userLife = startingLife;
    enemyLife = startingLife;
    mTimelineManager = TimelineManager.from(this);
}
 
开发者ID:matthew-compton,项目名称:glass-yugioh,代码行数:8,代码来源:DuelService.java

示例7: onCreate

import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    
    mTimelineManager = TimelineManager.from(this);
    
    mObdManager = new ObdManager();
}
 
开发者ID:ZackFreedman,项目名称:Voidstar-AutoHud,代码行数:9,代码来源:HudService.java

示例8: onCreate

import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    mTimelineManager = TimelineManager.from(this);
    mTimerDrawer = new PomoDrawer(this);
}
 
开发者ID:freethejazz,项目名称:gdk-pomodoro,代码行数:7,代码来源:PomoService.java

示例9: onCreate

import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
  super.onCreate();
  mTimelineManager = TimelineManager.from(this);
}
 
开发者ID:ihab,项目名称:airball-for-android,代码行数:6,代码来源:AirballService.java

示例10: onCreate

import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
    mTimelineManager = TimelineManager.from(this);
    super.onCreate();
}
 
开发者ID:vicmns,项目名称:BluetoothGlass,代码行数:6,代码来源:GoogleVoiceTriggerService.java

示例11: onCreate

import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    mTimelineManager = TimelineManager.from(this);
}
 
开发者ID:klange,项目名称:glass-scouter,代码行数:6,代码来源:ScouterService.java

示例12: onCreate

import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    mTimelineManager = TimelineManager.from(this);
    mTimerDrawer = new TimerDrawer(this);
}
 
开发者ID:longzheng,项目名称:PTVGlass,代码行数:7,代码来源:TimerService.java

示例13: onCreate

import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    mTimelineManager = TimelineManager.from(this);
    mTrainBrainDrawer = new TrainBrainDrawer(this);
}
 
开发者ID:skylight1,项目名称:brain,代码行数:7,代码来源:BrainService.java

示例14: onCreate

import com.google.android.glass.timeline.TimelineManager; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    mTimelineManager = TimelineManager.from(this);
}
 
开发者ID:googleglass,项目名称:gdk-level-sample,代码行数:7,代码来源:LevelService.java


注:本文中的com.google.android.glass.timeline.TimelineManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。