Android how to do remote HOME key binding on Android media box
#1
Hi,
I am buidling a kodi 15.2 on an AMLOGIC 812 CPU's android media box. It has a IR remote device.

I have taken kodi as an android launcher and android OS do not capture the HOME key.

Now in my custom addon, I want HOME key to go to a assigned window. But in my python code, I can not capture the HOME key's code, by following code:

------------------
class MyWindow(xbmcgui.WindowXML):
...
def onAction(self, action):
print action.getId()
------------------

Maybe should I renew the keymap config?

Thanks.
Reply
#2
I have added the intent-filter in my androidmanifest.xml :

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.xbmc.kodi" platformBuildVersionCode="17" platformBuildVersionName="4.2.2-1425461">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-feature android:name="android.hardware.screen.landscape" android:required="true"/>
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false"/>
<uses-feature android:name="android.hardware.type.television" android:required="false"/>
<uses-feature android:name="android.hardware.usb.host" android:required="false"/>
<uses-feature android:name="android.hardware.wifi" android:required="false"/>
<application android:hasCode="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:logo="@drawable/banner">
<activity android:configChanges="keyboard|keyboardHidden|navigation|orientation|screenLayout|screenSize|touchscreen" android:finishOnTaskLaunch="true" android:launchMode="singleInstance" android:name=".Splash" androidConfusedcreenOrientation="sensorLandscape" android:theme="@androidConfusedtyle/Theme.NoTitleBar.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.HOME"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:mimeType="video/*"/>
<data android:mimeType="audio/*"/>
<data android:mimeType="image/*"/>
<data androidConfusedcheme="file"/>
<data androidConfusedcheme="content"/>
<data androidConfusedcheme="http"/>
<data androidConfusedcheme="https"/>
<data androidConfusedcheme="ftp"/>
<data androidConfusedcheme="ftps"/>
<data androidConfusedcheme="rtp"/>
<data androidConfusedcheme="rtsp"/>
<data androidConfusedcheme="mms"/>
<data androidConfusedcheme="dav"/>
<data androidConfusedcheme="davs"/>
<data androidConfusedcheme="ssh"/>
<data androidConfusedcheme="sftp"/>
<data androidConfusedcheme="smb"/>
</intent-filter>
</activity>
<activity android:configChanges="keyboard|keyboardHidden|navigation|orientation|screenLayout|screenSize|touchscreen" android:finishOnTaskLaunch="true" android:label="@string/app_name" android:launchMode="singleInstance" android:name=".Main" androidConfusedcreenOrientation="sensorLandscape" android:theme="@androidConfusedtyle/Theme.NoTitleBar.Fullscreen">
<meta-data android:name="android.app.lib_name" android:value="kodi"/>
</activity>
</application>
</manifest>
Reply

Logout Mark Read Team Forum Stats Members Help
how to do remote HOME key binding on Android media box0