I'm trying to change the layout of my Bluetooth keyboard I'm using with my Android tablet to a French Canadian keyboard (not the multilingual one btw). After a long search, I finally found a deprecated app to add a British keymap, which I tried to adapt for my purpose. The app compile in Android studio, and I can even select it in the setting, but... It doesn't affect the output. By the way, the British layout included with Android does change the output. Here is all my code, since it's fairly short:
1- AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.nt6.frcankeyboard"
android:versionCode="001"
android:versionName="0.1">
<!-- API level 16 is needed for KEYBOARD_LAYOUTS etc. -->
<!-- by default touchscreen is required by Android apps, we don't need one -->
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<application android:label="@string/app_name"
android:allowBackup="false">
<!-- keyboard -->
<receiver android:name=".InputDeviceReceiver"
android:label="@string/keyboard_layouts_label">
<intent-filter>
<action android:name="android.hardware.input.action.QUERY_KEYBOARD_LAYOUTS" />
</intent-filter>
<meta-data android:name="android.hardware.input.metadata.KEYBOARD_LAYOUTS"
android:resource="@xml/keyboard_layouts" />
</receiver>
</application>
</manifest>
2- string.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">French Canadian Keyboard Layouts</string>
<string name="keyboard_layouts_label">nt6\'s Extra Layouts</string>
<string name="keyboard_layout_french_can_label">French (Can)</string>
</resources>
3- keyboard_layouts.xml
<?xml version="1.0" encoding="utf-8"?>
<keyboard-layouts xmlns:android="http://schemas.android.com/apk/res/android">
<keyboard-layout android:name="keyboard_layout_french_can"
android:label="@string/keyboard_layout_french_can_label"
android:keyboardLayout="@raw/keyboard_layout_french_can" />
</keyboard-layouts>
4- keyboard_layout_french_can.kcm: https://pastebin.com/xUrhcCjn
Here is the link to the instruction to compile a tool to test the kcm file. I can't use it since the Android source-tree is too big for my hard drive (I tried to download it for a bit more than 4 days): https://source.android.com/devices/input/validate-keymaps.html
Here are the information on the way to include outsourced kcm file: https://developer.android.com/reference/android/hardware/input/InputManager.html#ACTION_QUERY_KEYBOARD_LAYOUTS
I have the link to the original British keyboard, and the instruction on how to write, as well as a screen shot of my layout being visible. I can add them if requested.
Please help, the lack of concise documentation (seriously, there is even a dead link) and the lack of still working example mean that I'm at my limit there.