Editor’s note: below is a blog post from Justin Jasmann, Android Application Development Consultant. Follow him on Twitter at JustinJasmann .
<img data-attachment-id="16958" data-permalink="http://devblog.blackberry.com/2013/12/android-developers-eliminate-the-back-bar-in-your-10-2-1-app/back-bar-y-u-no-hide-by-default/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-y-u-no-hide-by-default.jpg" data-orig-size="260,260" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":""}" data-image-title="Back-Bar Y U No Hide By Default" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-y-u-no-hide-by-default.jpg?w=260" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-y-u-no-hide-by-default.jpg?w=260" class="aligncenter size-full wp-image-16958" alt="Back-Bar Y U No Hide By Default" src="http://rimdevblog.files.wordpress.com/2013/12/back-bar-y-u-no-hide-by-default.jpg?w=800" srcset="http://rimdevblog.files.wordpress.com/2013/12/back-bar-y-u-no-hide-by-default.jpg 260w, http://rimdevblog.files.wordpress.com/2013/12/back-bar-y-u-no-hide-by-default.jpg?w=150 150w" sizes="(max-width: 260px) 100vw, 260px" />
Are you an Android developer that’s transitioning your app to BlackBerry 10? Are you tired of that pesky back-bar showing up every time you open the app, reducing the available screen real estate and forcing your users to hide it? If so, we have a solution for you.
All new for Android apps in OS 10.2.1, is the ability to eliminate the back-bar entirely (on a per-app basis). Yes, you heard me right.
It’s quite simple actually. All that is required is the addition of a small configuration file during the repackaging process.
android.cfg <?xml version="1.0" encoding="utf-8"?> <android> <config> <overridenavbar /> </config> </android> When and where you should add this file is important, so let’s walk through it together.
Convert your APK using blackberry-apkpackager. <img data-attachment-id="16959" data-permalink="http://devblog.blackberry.com/2013/12/android-developers-eliminate-the-back-bar-in-your-10-2-1-app/back-bar-screen-shot_1/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_1.png" data-orig-size="600,378" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":""}" data-image-title="Back-Bar Screen Shot_1" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_1.png?w=300" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_1.png?w=600" class="aligncenter size-full wp-image-16959" alt="Back-Bar Screen Shot_1" src="http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_1.png?w=800" srcset="http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_1.png 600w, http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_1.png?w=150 150w, http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_1.png?w=300 300w" sizes="(max-width: 600px) 100vw, 600px" />
Open the BAR file for editing using the utility of your choice. <img data-attachment-id="16960" data-permalink="http://devblog.blackberry.com/2013/12/android-developers-eliminate-the-back-bar-in-your-10-2-1-app/back-bar-screen-shot_2/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_2.png" data-orig-size="600,490" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":""}" data-image-title="Back-Bar Screen Shot_2" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_2.png?w=300" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_2.png?w=600" class="aligncenter size-full wp-image-16960" alt="Back-Bar Screen Shot_2" src="http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_2.png?w=800" srcset="http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_2.png 600w, http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_2.png?w=150 150w, http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_2.png?w=300 300w" sizes="(max-width: 600px) 100vw, 600px" />
Place the android.cfg file inside YourApp.bar/android. <img data-attachment-id="16961" data-permalink="http://devblog.blackberry.com/2013/12/android-developers-eliminate-the-back-bar-in-your-10-2-1-app/back-bar-screen-shot_3/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_3.png" data-orig-size="600,490" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":""}" data-image-title="Back-Bar Screen Shot_3" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_3.png?w=300" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_3.png?w=600" class="aligncenter size-full wp-image-16961" alt="Back-Bar Screen Shot_3" src="http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_3.png?w=800" srcset="http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_3.png 600w, http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_3.png?w=150 150w, http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_3.png?w=300 300w" sizes="(max-width: 600px) 100vw, 600px" />
Save your changes back. <img data-attachment-id="16962" data-permalink="http://devblog.blackberry.com/2013/12/android-developers-eliminate-the-back-bar-in-your-10-2-1-app/back-bar-screen-shot_4/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_4.png" data-orig-size="565,267" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":""}" data-image-title="Back-Bar Screen Shot_4" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_4.png?w=300" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_4.png?w=565" class="aligncenter size-full wp-image-16962" alt="Back-Bar Screen Shot_4" src="http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_4.png?w=800" srcset="http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_4.png 565w, http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_4.png?w=150 150w, http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_4.png?w=300 300w" sizes="(max-width: 565px) 100vw, 565px" />
Sign the BAR using blackberry-signer. <img data-attachment-id="16963" data-permalink="http://devblog.blackberry.com/2013/12/android-developers-eliminate-the-back-bar-in-your-10-2-1-app/back-bar-screen-shot_5/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_5.png" data-orig-size="600,378" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":""}" data-image-title="Back-Bar Screen Shot_5" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_5.png?w=300" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_5.png?w=600" class="aligncenter size-full wp-image-16963" alt="Back-Bar Screen Shot_5" src="http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_5.png?w=800" srcset="http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_5.png 600w, http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_5.png?w=150 150w, http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_5.png?w=300 300w" sizes="(max-width: 600px) 100vw, 600px" />
Deploy! <img data-attachment-id="16964" data-permalink="http://devblog.blackberry.com/2013/12/android-developers-eliminate-the-back-bar-in-your-10-2-1-app/back-bar-screen-shot_6/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_6.png" data-orig-size="600,278" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":""}" data-image-title="Back-Bar Screen Shot_6" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_6.png?w=300" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_6.png?w=600" class="aligncenter size-full wp-image-16964" alt="Back-Bar Screen Shot_6" src="http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_6.png?w=800" srcset="http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_6.png 600w, http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_6.png?w=150 150w, http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_6.png?w=300 300w" sizes="(max-width: 600px) 100vw, 600px" />
Voila! <img data-attachment-id="16965" data-permalink="http://devblog.blackberry.com/2013/12/android-developers-eliminate-the-back-bar-in-your-10-2-1-app/back-bar-screen-shot_7/" data-orig-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_7.png" data-orig-size="300,500" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":""}" data-image-title="Back-Bar Screen Shot_7" data-image-description="" data-medium-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_7.png?w=180" data-large-file="/content/dam/devblog-blackberry-com/images/blogs/2013/12/back-bar-screen-shot_7.png?w=300" class="aligncenter size-full wp-image-16965" alt="Back-Bar Screen Shot_7" src="http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_7.png?w=800" srcset="http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_7.png 300w, http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_7.png?w=90 90w, http://rimdevblog.files.wordpress.com/2013/12/back-bar-screen-shot_7.png?w=180 180w" sizes="(max-width: 300px) 100vw, 300px" />
Remember that the additional configuration file will only take effect on operating systems 10.2.1 and greater.