Android Tutorial Running your apk as an extension on Google Chrome

Mashiane

Expert
Licensed User
I have just found this out and its such a marvel to share. These are the steps for a MS-Windows install

Step 1
  1. Download the ARChon runtime from https://bitbucket.org/vladikoff/archon/get/v1.0.zip
  2. Unzip the archive.
  3. Open your extensions page in Chrome by going to Menu > More Tools > Extensions
  4. Enable Developer mode in the top right corner, if it is not already enabled.
  5. Select "Load unpacked extension."
  6. Choose the folder containing the ARChon runtime you unzipped earlier.
Step 2
  1. Download the node.js .msi file (not the .exe) from http://nodejs.org/download/
  2. Install node.js.
  3. In a command prompt, run the following command: npm install chromeos-apk -g
Step 3

Now you are ready to package and run your app on the Chrome Browser as an extension.

1. In a command prompt, in the folder where your apk resides, run the following command: chromeos-apk [NAME OF APK]
2. This should create a folder e.g. [Package Name].android
3. Inside this folder, on the _locales folder, find a file named messages.json
4. Right click on it and edit the file
5. Ensure that this section, does have the message element, if not add it, dont forget the comma at the end of the "description". The message should be the same as the package name as per your manifest.json file on the root of this folder.

"extName": {
"description": "Extension name",
"message": "com.b4a.Example"
}

6. Save the file

Load your app as an extension for Google Chrome like this
  1. Open your extensions page in Chrome by going to Menu > More Tools > Extensions
  2. Enable Developer mode in the top right corner, if it is not already enabled.
  3. Select "Load unpacked extension."
  4. Choose the folder containing the package as in step 3.
If all goes well your app should be on the Chrome App Launcher.

Hoping someone finds this useful..

PS: on the Chrome Store, there is an app called twerk that does what you manually did with chromeos-apk [NAME OF APK], however rename your .apk to .zip

For other OS, see http://lifehacker.com/how-to-run-android-apps-inside-chrome-on-any-desktop-op-1637564101
 

Attachments

tdocs2

Well-Known Member
Licensed User
Mashiane,

Thank you.

Please take a look at this post on the advances in this area...

Best regards.

Sandy
 
Top