Emulator not finding java/javascript html program

by Thomas » Mon, 13 Apr 2009 12:14:22 GMT

Sponsored Links
 Hi Guys:
I've written a small javascript - html program
http://gpsmancer/android/amdroidgpstest.html to test linking to an
android platform.  With this I've written as small program that uses a
java  wv.loadUrl( " http://gpsmancer.com/android/androidgpstest.html" ;)
in a android java program. The idea is to provide GPS latitude and
longitude to an html form program.  When I run the app using the
emulator I get "Web page not available". If I go to the android
emulator web browser it finds the url without difficulty.  It has not
trouble finding other URLs as well.  My question: do I need to set
some sort of emulator setting or permission or does the emulator not
work with java/javascript/html?  For those that care about geocaching,
the game can be seen at  http://gmpmancer.com  . There are several
variations and I am attempting to extend the game to android.  I have
a netbook version working on my ASUS netbook running winXP but the
android platform seems to be a logical extension.  Some of the
versions work on IPhone, and various cellphones but in a crippled
Regards, Tom Birchmire


Other Threads

1. ApiDemos/Graphics/CamerPreview Nexus One force close

I did have this same problem.  The issue is that the Camera.open
method bombs out.

I created a camera wrapper class that does a bunch of initialization
to ensure that open works, then takePicture works, etc.  I found the
initialization code by looking through the Camera source code for
Google's main Camera app.

I think the code you need is:

        private synchronized void preOpen(Context context) {
        mPreferences =

    public static final String KEY_VERSION = "pref_version_key";
    public static final String KEY_RECORD_LOCATION =
    public static final String KEY_VIDEO_DURATION =
    public static final String KEY_JPEG_QUALITY =

    public static final int CURRENT_VERSION = 3;

    private static void upgradePreferences(SharedPreferences pref) {
        int version;
        try {
            version = pref.getInt(KEY_VERSION, 0);
        } catch (Exception ex) {
            version = 0;


        if (version == CURRENT_VERSION) return;

        SharedPreferences.Editor editor = pref.edit();
        if (version == 0) {
            // For old version, change 1 to 10 for video duration
            if (pref.getString(KEY_VIDEO_DURATION, "1").equals("1")) {
                editor.putString(KEY_VIDEO_DURATION, "10");
            version = 1;
        if (version == 1) {
            // Change jpeg quality {65,75,85} to
            String quality = pref.getString(KEY_JPEG_QUALITY, "85");
            if (quality.equals("65")) {
                quality = "normal";
            } else if (quality.equals("75")) {
                quality = "fine";
            } else {
                quality = "superfine";
            editor.putString(KEY_JPEG_QUALITY, quality);
            version = 2;
        if (version == 2) {
                    pref.getBoolean(KEY_RECORD_LOCATION, false)
                    ? "on"
                    : "off");
            version = 3;
        editor.putInt(KEY_VERSION, CURRENT_VERSION);

I can't imagine a reason this would be required, but after I added it,
Camera.open worked.  Strangely, later I commented out the call to
upgradePreferences and it still worked... I don't know if that's
because the critical thing is just acquiring the preferences, or
somehow one time initialization is enough.

I noticed also that rebooting my phone and making the Camera.open be
the very first thing I did also worked (without the preOpen call).

None of this behavior makes sense to me; I'm just reporting what I
saw, and what has continued to work for me.

BTW, you also have to startPreview before you can takePicture.



2. CoreException thrown by IProject.build

Hi Guys

I'm writing my own eclipse plug-in[1] that integrates with the Eclipse
Android Development Tools (ADT).

However, I'm getting a CoreException ("Project target not loaded
yet.")[2] thrown when I attempt to call IProject.build on an Android

    IProject project = importProject(...);
    project.build(IncrementalProjectBuilder.FULL_BUILD, monitor);

Should I be waiting for the project target to load before calling the
above? If so, what call should I use to poll the project target loading

[1] http://code.google.com/p/m2eclipse-android-integration/
[2] See attached stack trace.

Thanks in advance for any help you can give me...

Ricardo Gladwell <ricardo.gladw...@gmail.com>


3. (WTI) promo gt+mega diskon 500 rb+cicilan 0% 12 bln for Spica

4. code for capturing screenshot of android device

5. Is it possible to develop and upload Android 2.1 apps onto Motorola backflip?

6. How to warn user when back button is pressed to navigate out of my application?

7. Paging suhu android spica bandung