Android TV with B4A.
View attachment 125488
Is it possible to make the app for Android TV with B4A?
Yes it is.
What we need?
Hardware:
* Android TV (with bluetooth build in),
* Air Mouse Bluetooth Remote Control.
Look HERE.
Software:
* B4A,
Look HERE.
* keyboard for android tv (LeanKey Keyboard),
Look HERE.
* - Total Commander (you can see "Android\Data" folder and you can copy files from USB stick to the "Android\Data folder").
View attachment 125492
Look HERE.
- or File Manager
Look HERE.
How to do:
1. Create app with B4A.
2. Create "banner.png" file (w: 320 x h: 180 pix) in "Object\res\drawable" in the app folder. Atribute of this file has to be: "only for read". Example file is attached in this post.
3. Copy these lines to the Manifest file by the Manifest Editor in the B4A:
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"/>)
'SetApplicationAttribute(android:hardwareAccelerated, "true")
SetManifestAttribute("android:installLocation", "auto")
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
' TV Settings
AddManifestText(<uses-feature android:name="android.software.leanback"
android:required="false" />
<uses-feature android:name="android.hardware.touchscreen"
android:required="false" />)
SetApplicationAttribute(android:banner, "@drawable/banner")
AddActivityText(Main,
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>)
'End of default text.
4. Compile the APK file.
5. Copy APK file on the USB stick.
6. Instal APK file from USB stick to the Android TV with the file commander instaled on the Android TV.
View attachment 125493
You can try my free apps on the Android TV.
1. DifPic - simple different pictures game.
View attachment 126228
Download APK for Android TV HERE.
Look more HERE.
2. pMove - picture puzzle game.
View attachment 126229
Download APK for Android TV HERE.
Look more HERE.
3) Map_AxL - offline jpg/jgw raster map application.
View attachment 126230
Download APK for Android TV HERE.
Look more HERE.
Enjoy
JS
Additionally, if you want to skip the hardware hassle while testing your B4A projects, using a
universal tv remote app is a great way to control your Android TV directly from your smartphone without needing an extra Air Mouse.