2016-07-04 37 views
0

我正在嘗試使現有的Android應用程序可穿戴。需要RemoteControlReceiver的包路徑嗎?

是否需要指定用於設置媒體按鈕事件接收器的完整包路徑?

我在官方文檔中沒有看到任何解釋。這是因爲在如下documentation

<receiver android:name=".RemoteControlReceiver"> 
<intent-filter> 
<action android:name="android.intent.action.MEDIA_BUTTON" /> 
</intent-filter> 
</receiver> 

雖然我有這個在我當前的代碼:(。)

<receiver android:name="com.pckg.my.app.subpack.RemoteControlReceiver"> 
<intent-filter> 
<action android:name="android.intent.action.MEDIA_BUTTON" /> 
</intent-filter> 
</receiver> 
+0

你的問題是什麼? – trincot

+0

我編輯你的問題,包括一個實際的問題。不過,你應該編輯你的問題,並解釋你的當前代碼有什麼問題。 – trincot

回答

0

嘗試添加在你的Android名稱的開頭

<receiver android:name=".com.pckg.my.app.subpack.RemoteControlReceiver">