Created
April 23, 2014 07:10
-
-
Save russellbeattie/11205288 to your computer and use it in GitHub Desktop.
Enabling remote debugging in apps using Cordova targeting Amazon Fire OS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.helloworld; | |
import android.os.Bundle; | |
import org.apache.cordova.*; | |
public class HelloActivity extends CordovaActivity | |
{ | |
@Override | |
public void onCreate(Bundle savedInstanceState) | |
{ | |
super.onCreate(savedInstanceState); | |
super.init(); | |
super.getFactory().enableDeveloperToolsUnix(this.getPackageName() + ".devtools"); | |
/* | |
To use, run this on the command line (needs Android SDK): | |
adb forward tcp:9222 localabstract:com.example.helloworld.devtools | |
Then, open this URL: | |
http://localhost:9222 in your browser | |
*/ | |
// Set by <content src="index.html" /> in config.xml | |
super.loadUrl(Config.getStartUrl()); | |
//super.loadUrl("file:///android_asset/www/index.html"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment