So now investigating PhoneGap - using 0.8.2
I've loaded up the environment and built the demo app, deployed to
Android emulator. I recognise not everything works, due to it being an
emulator, but Beep causes it to quit the app.
When I look behind the scenes to see why beep doesn't work, it looks
like the call to DroidGap.beep(count); is causing the crash. When I
look further I can't find an implementation of beep in the
DroidGap.java, infact a lot of things seem to be missing.
I will continue to investigate, and see if 0.8.3 or 0.9.0 have more
implementations for DroidGap.beep and the other missing stuff.
But...
Do you have any good example code for PhoneGap+Android apps?
Is there some good documentation of the APIs, what is implemented,
what isn't?
Any help would be much appreciated!
Krs
Chris
Which version of Android are you targeting? We are aware of problems
with Android 2.0+ but are hard-pressed to be able to resolve them due
to us not being able to get an Android 2.0 device (thus is the curse
of Canada).
Have a look at my repository: http://github.com/filmaj/phonegap-android,
fork or download the latest source from it and give that a shot. The
new build script should make things easier too (check out the readme
for instructions).
Hope that helps,
Fil Maj
Web Software Engineer
Nitobi
But when I run and deploy, what comes up in the emulator is a mobile
version of the PhoneGap website...
If you look at standalone.java in the native code, there is this bit
of code:
try {
f = c.getField("url");
i = f.getInt(f);
uri = this.getResources().getString(i);
} catch (Exception e)
{
uri = "http://www.phonegap.com";
}
Looks something is triggering the exception and forcing the URL to
point to phonegap.com. Do you have a 'url' property in your res/values/
strings.xml that points to the initial URL?
Edit: Looks like a commit to the repository recently removed that
entry by default from the strings.xml. Add this to your strings.xml:
<string name="url">file:///android_asset/www/index.html</string>
That should point, by default, to the index.html present in the www
directory.
The only things that aren't working are the
getlocation,platform,version,uuid and get phones contacts.
I am writing my app in java right now but would rather use something
like this to deploy accross platforms.
any idea when a 2.0.1 or even 2.1 compatible version might be
available?
Roy
That got it working again.
I'm targetting 1.6 at the moment, using the emulator only - we're
buying a device asap.
I notice your demo wants to work in 2.0, as I get errors, one of which
mentioning "Eclair" if I try to use 1.6.
However the Platform, Version and UUID still don't get populated.
Also, when the redirection to the PhoneGap website happened, I noticed
the featured PG apps. But they all appear to be iPhone apps, none are
Android.
Is there any decent documentation on the API?
I know from using Titanium, there is documentation on what all the
calls are, how to use them, sample code.
But PhoneGap seems to be missing this.
bixbarton: we hear you, documentation is lacking and so is sample
code. We are doing our best to address this issue. Nitobi has a new
hire (Steve, you may seem him around here!) who is spearheading the
documentation work and wiki clean up.
In general, for Android 2.0+ support, Nitobi just ordered a couple of
Nexus One's, which we expect in the office sometime within the next
week. Once we have those babies, we can really get down to having a
proper and working version of PhoneGap for Android 2.0+. Can't wait to
get my hands on that thing :)
As for it not working on 1.6, I know for sure that my repository does
on my Google G1. Are you sure the build script ran properly and
without any errors? It may be that the JavaScript files are not
getting concatenated into a fresh phonegap.js, which is required to
have your PhoneGap Android app working.
--
You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
For more info on PhoneGap or to download the code go to www.phonegap.com
But I've not had much success getting it to build on Windows.
I've installed ANT. What do I need to do next?