Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update readme

  • Loading branch information...
commit ca0c8390c2e34c2f14d83341ec8e520f13353a86 1 parent 29767c6
@revolunet authored
Showing with 21 additions and 7 deletions.
  1. +13 −5 README.md
  2. +8 −2 init-contacts.js
View
18 README.md
@@ -2,12 +2,22 @@ Phonegap + Sencha demo
=====
-This is a sample android project with associated slides for the [2nd Phonegap Paris Meetup][1]
+This is a sample phonegap 1.6 project with slides for our presentation given at [2nd Phonegap Paris Meetup][1] the 12th April 2012. Proudly brought to you by the [revolunet team][2].
-There is a sample [Sencha Touch 2][4] app located in `exampleapp/assets/www` that loads contacts right from the phone and display them in a ListView and in a Carousel.
+We provide a sample [Sencha Touch 2][4] app that loads contacts right from the phone and display them in a ListView and in a Carousel.
+There is both an Android and a iOS sample Project.
-Android dev environnement setup
+This is a good start to setup a new phonegap+sencha MVC project.
+
+
+Features inside :
+---
+ - sample Phonegap projects for android/ios
+ - sample Sencha Touch 2 MVC application
+ - phonegap loads the contacts from the phone then fills a Sencha data store
+
+Basic Android dev environnement setup
---
*I don't use eclipse, just ant (see [android cmdline setup][2])*
@@ -21,8 +31,6 @@ Android dev environnement setup
-Proudly brought to you by [revolunet team][2]
-
[1]: http://www.meetup.com/PhoneGap-Paris/
[2]: http://revolunet.com
View
10 init-contacts.js
@@ -1,3 +1,9 @@
+//
+// sample contacts creation
+// WARNING: this file should only be used in a emulator, not on your phone
+// you could erase all of your contacts.
+//
+
var BASE_CONTACTS = [
{'displayName': 'Marie Testu', 'phoneNumber':'06 89 34 57 33', 'email': 'mtestu@hotmail.com', 'photoUrl': 'http://m4.licdn.com/mpr/mpr/shrink_100_100/p/4/000/145/015/1a4c5ed.jpg'},
{'displayName': 'Philippe Dubert', 'phoneNumber':'06 57 33 89 34', 'email': 'pdubert@gmail.com', 'photoUrl': 'http://media01.linkedin.com/mpr/mpr/shrink_60_60/p/2/000/015/017/174ca01.jpg'},
@@ -16,7 +22,7 @@ var BASE_CONTACTS = [
];
function delContacts() {
- // find all contacts and DELETE thems !
+ // WARNING: find all contacts and DELETE thems !
navigator.contacts.find(['displayName'], function(contacts) {
// delete all contacts !
for (var i=0; i<contacts.length;i++) contacts[i].remove();
@@ -39,5 +45,5 @@ function createContact(contactInfo) {
function createContacts() {
// create initial contact list
for (var i=0; i<BASE_CONTACTS.length;i++) createContact(BASE_CONTACTS[i]);
- navigator.notification.alert(BASE_CONTACTS.length + " contacts created");
+ navigator.notification.alert(BASE_CONTACTS.length + " contacts created");
}
Please sign in to comment.
Something went wrong with that request. Please try again.