Google Glass에 라이브 카드를 표시하는 방법 ?? 라이브 카드를 개발하는 동안 특별하게 돌볼 필요가있는 문제는 무엇입니까? 내가 만들었지 만 작동하지 않습니다. 여기에 서비스 코드가 있습니다.Google Glass에서 라이브 카드를 만드는 중에 문제가 발생했습니다. 카드가 표시되지 않습니다
public int onStartCommand(Intent intent, int flags, int startId) {
// TODO Auto-generated method stub
if (livecard == null) {
livecard = new LiveCard(this, "tag");
// live card view
remote = new RemoteViews(getPackageName(),
com.example.livecardnew.R.layout.live_card);
livecard.setViews(remote);
// live card menu activity
Intent menuIntent = new Intent(this, MenuActivity.class);
menuIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_CLEAR_TASK);
// issue ths card when tapped
livecard.setAction(PendingIntent.getActivity(this, 100, menuIntent,
0));
livecard.publish(LiveCard.PublishMode.REVEAL);
}
else {
livecard.navigate();
}
return Service.START_STICKY;
}
의 AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.livecardnew"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<!-- android:theme="@style/AppTheme" -->
<activity
android:name=".MenuActivity"
android:label="@string/app_name" >
</activity>
<service
android:name="com.example.livecardnew.MyService"
android:enabled="true"
android:exported="true"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="@xml/voice_trigger" />
</service>
</application>
? 우리는 더 많은 정보가 필요합니다. 감사! – pt2121
오류는 없지만 카드가 Google 유리에 업로드되지 않습니다. @EntryLevelDev –