forked from github/cordova-android
Merge pull request #278 from infil00p/master
Modifying build.xml to use custom versions, adding ant files, and fixing HTC Logcat
This commit is contained in:
commit
75f3651376
@ -28,7 +28,6 @@
|
|||||||
|
|
||||||
Properties related to the SDK location or the project target should
|
Properties related to the SDK location or the project target should
|
||||||
be updated using the 'android' tool with the 'update' action.
|
be updated using the 'android' tool with the 'update' action.
|
||||||
|
|
||||||
This file is an integral part of the build system for your
|
This file is an integral part of the build system for your
|
||||||
application and should be checked into Version Control Systems.
|
application and should be checked into Version Control Systems.
|
||||||
|
|
||||||
@ -49,13 +48,13 @@
|
|||||||
application and should be checked into Version Control Systems. -->
|
application and should be checked into Version Control Systems. -->
|
||||||
<loadproperties srcFile="project.properties" />
|
<loadproperties srcFile="project.properties" />
|
||||||
|
|
||||||
<!-- quick check on sdk.dir -->
|
<!-- quick check on sdk.dir -->
|
||||||
<fail
|
<fail
|
||||||
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
|
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
|
||||||
unless="sdk.dir"
|
unless="sdk.dir"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- version-tag: custom -->
|
||||||
<!-- extension targets. Uncomment the ones where you want to do custom work
|
<!-- extension targets. Uncomment the ones where you want to do custom work
|
||||||
in between standard targets -->
|
in between standard targets -->
|
||||||
<!--
|
<!--
|
||||||
@ -89,8 +88,7 @@
|
|||||||
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
|
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
|
||||||
in order to avoid having your file be overridden by tools such as "android update project"
|
in order to avoid having your file be overridden by tools such as "android update project"
|
||||||
-->
|
-->
|
||||||
<!-- version-tag: 1 -->
|
<import file="${sdk.dir}/tools/ant/build.xml" />
|
||||||
<import file="${sdk.dir}/tools/ant/build.xml" />
|
|
||||||
|
|
||||||
|
|
||||||
<target name="check-javascript" depends="build-javascript">
|
<target name="check-javascript" depends="build-javascript">
|
||||||
@ -141,7 +139,8 @@
|
|||||||
<fileset file="assets/www/index.html" />
|
<fileset file="assets/www/index.html" />
|
||||||
<!-- <fileset file="../bin/templates/project/assets/www/index.html" /> -->
|
<!-- <fileset file="../bin/templates/project/assets/www/index.html" /> -->
|
||||||
</replaceregexp>
|
</replaceregexp>
|
||||||
<replaceregexp match="phonegapVersion = [\u0022].*[\u0022];" replace="phonegapVersion = ${dblQuote}${version}${dblQuote};" byline="true">
|
<!-- This is sketchy, but it works, ${dblQuote} does not -->
|
||||||
|
<replaceregexp match="phonegapVersion = [\u0022].*[\u0022];" replace='phonegapVersion = ${dblQuote}${version}${dblQuote};' byline="true">
|
||||||
<fileset file="src/com/phonegap/Device.java" />
|
<fileset file="src/com/phonegap/Device.java" />
|
||||||
</replaceregexp>
|
</replaceregexp>
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
import android.webkit.ConsoleMessage;
|
||||||
import android.webkit.GeolocationPermissions.Callback;
|
import android.webkit.GeolocationPermissions.Callback;
|
||||||
import android.webkit.JsPromptResult;
|
import android.webkit.JsPromptResult;
|
||||||
import android.webkit.JsResult;
|
import android.webkit.JsResult;
|
||||||
@ -277,6 +278,9 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
settings.setJavaScriptEnabled(true);
|
settings.setJavaScriptEnabled(true);
|
||||||
settings.setJavaScriptCanOpenWindowsAutomatically(true);
|
settings.setJavaScriptCanOpenWindowsAutomatically(true);
|
||||||
settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
|
settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
|
||||||
|
|
||||||
|
//Set the nav dump for HTC
|
||||||
|
settings.setNavDump(true);
|
||||||
|
|
||||||
// Enable database
|
// Enable database
|
||||||
settings.setDatabaseEnabled(true);
|
settings.setDatabaseEnabled(true);
|
||||||
@ -1102,9 +1106,15 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onConsoleMessage(String message, int lineNumber, String sourceID)
|
public void onConsoleMessage(String message, int lineNumber, String sourceID)
|
||||||
{
|
{
|
||||||
// This is a kludgy hack!!!!
|
|
||||||
LOG.d(TAG, "%s: Line %d : %s", sourceID, lineNumber, message);
|
LOG.d(TAG, "%s: Line %d : %s", sourceID, lineNumber, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onConsoleMessage(ConsoleMessage consoleMessage)
|
||||||
|
{
|
||||||
|
LOG.d(TAG, consoleMessage.message());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user