Skip to content

Instantly share code, notes, and snippets.

@russellbeattie
Created April 23, 2014 07:10
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save russellbeattie/11205288 to your computer and use it in GitHub Desktop.
Save russellbeattie/11205288 to your computer and use it in GitHub Desktop.
Enabling remote debugging in apps using Cordova targeting Amazon Fire OS
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