Remember how we mentioned yesterday that there was a bug in Android Wear that prevented purchased apps from installing themselves? Well, it seems that this particular bug has been squashed, as the folks over at Google have managed to deliver a workaround to this situation so that paid apps (as well as other apps that make use of Google Play’s forward-lock mechanism) which run on the Android Wear platform will be able to install. the solution is pretty simple – just place the wearable APK in the res/raw directory, and wonders happen.
One can always perform a manual packaging of the apps by performing the following.
Copy the signed wearable app into your handheld project’s res/raw directory and rename it to wearable_app.apk, it will be referred to as wearable_app.
Create a res/xml/wearable_app_desc.xml file that contains the version and path information of the wearable app:
The package, versionCode, and versionName will sport similar values that have been specified in the wearable app’s AndroidManifest.xml file, while the rawPathResId happens to be the static variable name of said resource. Should the filename of your resource happen to be wearable_app.apk, then the static variable name would be wearable_app.
Other details can be found here, and Google will update the “wearApp” Gradle rule sometime down the road so that the Android SDK build tools will support APK embedding into res/raw. [Press Release]
Next Story: Sony Xperia Z1 Compact Hits The US