Yesterday I gave a presentation on PhoneGap. In that presentation I had a few samples that I'd like to share. This isn't anything too exciting, and doesn't cover as much as "Mega" project, but if you are looking for some small samples to play with, these may be of use. The examples cover:
- Camera
- Compass
- Contact Search
- General Device (shows basic device+connection info)
- Geolocation (also makes use of Google Static Maps)
- jQuery Mobile (super basic, mainly just shows how it looks)
All the projects may be found in the zip attached to this entry. Does it make sense for me to put these in Github?
Archived Comments
Yes, post the examples on GitHub
Will u upload the presentation slides
@Piyush - the slides were pretty simple, mainly me explaining what you would get at phonegap.com. I spent most of my time showing the code examples.
Thanks Ray. It is always great to have some good examples!
I've done some "Googling" but haven't found a really good solution yet. Have any of you had any luck configuring a splash screen and changing the icon for a app from the default icon?
For the splash screen, it is kinda documented, but not at PhoneGap, rather on Android's docs, which makes sense.
Do not take this for gospel truth, but it worked for me: Make your image, then drop it in res/drawable-*. Ie, a copy in each. I believe you are supposed to use different DPIs, but I didn't bother. Then, in your main activity Java file, do something like so:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl("file:///android_asset/www/index.html",700);
}
The 700 is the # of milliseconds to let the splash screen wait around.
Your example worked like a champ! Thanks!
My first app is built and running on my phone! Wow!! Thanks again.
Thank the PhoneGap folks. :)
Hello Ray,
Can you recommend any good solution (some model) for mobile site security which build with PhoneGap? I've done an lot of secured sites on CF and now just interesting how to rebuild some of them to mobile versions. I know I can use XHR requests to server's CFC and get results from there. But what after that? Store results into cookie scope is not looking so secure.
Any ideas?
If you make a call to a remote CFC and it uses the session scope to mark you as online, any future XHR requests from your PG app will _also_ have those session variables.
Thst's it. :) It's really that simple.