PhoneGap Open Session transcript

https://outof.me

Today, Andy Trice, Ray Camden, and I did an online Q&A session around PhoneGap. You can find a transcript of this event here:

Answered Questions (78)
————————–
1. Steven Benjamin: How can I configure a splash screen, I am using PG 2.0.0 for Android.?
* Piotr Walczyszyn: You do it in Java code, here is snippet of my code:
public class MyGapActivity extends DroidGap
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
super.setIntegerProperty(“splashscreen”, R.drawable.splash);
super.loadUrl(“file:///android_asset/www/index-android.html”, 5000);
}
}

* Piotr Walczyszyn(privately): This line does the trick: super.setIntegerProperty(“splashscreen”, R.drawable.splash);

and you put your splash in drawable/{RES}/splash.png

2. Steven Benjamin: Is there a suggested proguard configuation for Phonegap 2.0.0 and Android?
* Piotr Walczyszyn(privately): What do you mean by proguard?

3. Steven Benjamin: Can you sugguest some tools / sites where I can learn about debugging my phonegap 2.0.0 app?
* Andrew Trice: emulate.phonegap.com is an in-browser phonegap emulator (in chrome) this gives you full access chrome developer tools and mimics the phonegap api. debug.phonegap.com gives you on-device debugging (although a bit more limited), http://www.iwebinspector.com/ gives you the ability to debug inside of the iOS simulator
* Andrew Trice: those links: http://emulate.phonegap.com http://debug.phonegap.com

4. Steven Benjamin: Is there way to push updates to a phonegap app after a user has installed it?
* Ray Camden: If you deploy an update as normal (ie to Android Play Store or iOS store), they will see the update as normal. If you want it more ‘in your face’, your app could ping a network service and respond with an alert of some sort to let them know.
* Andrew Trice: You cannot push updates “inside of the app” on iOS, or else apple will reject it. Any app that downloads code will be rejected. However, you can always use the app store for updates.

5. boobyWomack: on iOs you can do a one-liner for debugging too to invoke a remote Web Inspector, and do not forget Weinre.
* Piotr Walczyszyn(privately): The one-line is to add [NSClassFromString(@”WebView”) _enableRemoteInspector]; line in didFinishLaunchingWithOptions method in AppDelegate.m

And you can navigate from Safari to http://localhost:9999 port and it would lauch web inspector
* Piotr Walczyszyn: Reposting it to all:
The one-line is to add [NSClassFromString(@”WebView”) _enableRemoteInspector]; line in didFinishLaunchingWithOptions method in AppDelegate.m

And you can navigate from Safari to http://localhost:9999 port and it would lauch web inspector

6. boobyWomack: will PhoneGap be developing a better javascript debugging system? It seems to me it should ship with this from the off if possible! since javascript is the big draw of Phone Gap I think.
* Andrew Trice: Yes and no… PhoneGap is built upon system web views on all OSes. It will be limited to what the system web views expose. However, http://eumlate.phonegap.com gives you the ability to mimic all PhoneGap APIs in the desktop chrome browser, which has very good developer tools. You can also use remote debugging, but we won’t be creating our own JS engine.

7. Amanda: i’m using phonegap build inside dreamweaver 6. do you know of a way to disable the building of some of the platforms? Right now I’m only building for Android and it takes a long time for all of them to load.
* Ray Camden: Short answer is no. They have an API that allows for it – but you can’t do that via DW.

8. Robert Winterbottom: Hi everyone, I have a question about how Phonegap’s new Hydration feature, how does it get updated builds to my tester’s and do I have to do anything special to enable it?
* Ray Camden: Robert, when an end user starts the app, it checks for a new version and prompts them to install it. If they say yes, it happens for them.

9. Nathan Buth: I am having issues where I keep recieving encoding errors in my app. The Android version works perfectly but on iOS it gives me the errors. I will post small segments of the cde below to help.
* Andrew Trice: Do you have specific error messages? I’m not sure what you mean by “encoding errors”? What kind of app are you building? Is this audio/video related, or something else?

10. Tac: Is there a way to create a build and debug a JQueryMobile site (running under apache) and then deploy it on PhoneGap? In other words, I’d like a cordova2.0-apache.js library that exposes the same API
* Ray Camden: Tac, I will often run my PG apps first on a web server just to enable quicker tester. So you can definitely *start* there. You can then package it up for PG just fine. Just note that if you make use of any server side lang, like PHP or ColdFusion, that you can’t deploy those files into the PG app. (Although you can surely hit them via Ajax.)

11. Steven Benjamin: Q: I own the domain www.phonegap.co and I would like to to use it for a not-for-profit and no -charge site for posting phone gap video tutorials. Would this be permisable under the licensing guidelines?
* Andrew Trice: Steven, please send me an email about this to atrice@adobe.com

12. Mark Murphy: Do you know of any projects using CordovaWebView in a fragment?
* Andrew Trice: Off the top of my head, I don’t know of any. I’m not aware of a way to tell who uses which features.

13. Ryan Hanna / Sworkit: Has there been any testing with Phonegap builds and iOS 6? If so, anything we should be cautious of?
* Andrew Trice: Yes, but unfortunately we are restricted by the Apple developer NDA, so we can’t talk about it that much yet. PhoneGap 2.1 (which is coming very soon) will address a few of the issues. I will be posting more content about this on the PhoneGap blog soon.
* Andrew Trice: Prior to PhoneGap 2.1 there are a few quirks, but most apps will not see them. With PhoneGap 2.1 and later, those issues will be fixed. Here’s one of the bigger ones: https://issues.apache.org/jira/browse/CB-1219

14. David R: Does the PhoneGap cloud supports debug build?
* Ray Camden: Yes. You can see it in the settings of the app on the site.

15. Steven Benjamin: Proguard is the built in obsfucation program that is included with the ANDROID SDK for eclipse.
* Piotr Walczyszyn: I don’t know of any configuration that is official, found a config posted by someone from a PhoneGap community: https://groups.google.com/forum/?fromgroups=#!topic/phonegap/pxH4TV0adoI

16. Andrew: I’m editing my code directly with DW CS5 that doesn’t have any phonegap support, when the cordova docs talk about “permissions” for android, ios, etc… is there a place that i should manually assign those or does build.phonegap.com take care of all that automatically?
* Andrew Trice: They are managed inside of your config.xml file https://build.phonegap.com/docs/config-xml look under “PhoneGap API Features”
* Andrew Trice: (config.xml is required for PhoneGap build projects)

17. AurelioDeRosa: Is it possible to detect if GPS is active or not? If this is not possible (as I guess), will the developers add the possibility to the compatible OS as Android?
* Ray Camden: If you are asking – can I use geolocation but only if GPS versus other means – I believe the answer is no. You can *request* high accuracy when asking for location, but the device will use the *best* possibly, not *just* the best available if that makes sense. In the result object you get a key for accuracy though. You could use code to throw out results that are not accurate enough for you.

18. Robert Winterbottom: If i need to edit some options in the Android Manifest xml that I do not see options for in the config file for phonegap build, what’s the best way to do this, currently I am decompiling the apk, editing the manifest, recompiling, resigning, and zipaligning which seems like a lot of work to edit the manifest, in particular I am trying to edit supported screen sizes
* Ray Camden: Afaik, you are doing the only thing you can do. I think you would want to reach out to us (Adobe) about adding support in for what’s missing. Can you email me and I’ll try to forward it up the chain?

19. Wyatt: Is there a way to utilize android fragments in cordova other than to launch a new fragment activity as an intent from a plugin?
* Ray Camden: I don’t know what Android fragments are. I do know you can fire intents and listen for intents in Android/PG via a plugin. So if you just want to -start- the intent, you definitely can. I’ve got a blog post on that.

20. sheridon: Can you guys give us any heads up on Phonegap Qt or desktop use? We would absolutey love that for some internal depts (non-profit)
* Andrew Trice: There are phonegap ports for Windows 7 (see http://www.raymondcamden.com/index.cfm/2012/7/12/Windows-7-version-of-PhoneGapCordova ), and there will be one for Windows 8 as well. However, I am not familiar with QT

21. AurelioDeRosa: Yes, I asked for GPS only. I would like to user a method that allow me to detect if GPS is active, for example. So, will you add this feature in the next releases?
* Ray Camden: I do not know if this is something being added in the future. You may be able to do this via a plugin and writing Java code there. I’ll check into this though.

22. Chris Griffith [UGM/ACP]: You can also use my app to create and edit the config.xml file: http://aj-software.com/configap/ :)
* Andrew Trice: Thanks Chris!

23. Amanda: I want to save data locally to be uploaded to a server when network becomes available. i.e. when the phone connects to any kind of network, have the data uploaded. Is this possible with phonegap?
* Piotr Walczyszyn: yes it is possible, you can detect network status with PhoneGap: http://docs.phonegap.com/en/2.0.0/cordova_events_events.md.html#online

24. Andrew: is config.xml where i would put the permissions to allow geolocation for android devices and phonegap build? IEX: * Piotr Walczyszyn: you do it in config.xml with following entry:
* Piotr Walczyszyn: with you only configure a plugin but this is not enough to turn on the permission
* Piotr Walczyszyn: you can learn more about config.xml here: https://build.phonegap.com/docs/config-xml

25. StephenR: As an intermediate ColdFusion user, I was wondering what is the BEST way to send and retrieve database calls in a PG app? Most of the apps I have in mind are media based, bringing in, for example, all the tracks of a music album that I have detailed in the database. Thanks for answering all these questions guys.
* Ray Camden: I hate to say that “X” is the best. I’ll just talk about what has worked well for me. First off – I’d make use of CF’s built in ability to serve up JSON from CFCs. That makes your code somewhat simpler and allows for the best reuse imo. IN your specific example, I could imagine a case where the CFC returned an array of URLs for the media that you could then pass to PG’s “Media” API.

26. sheridon: Is there a “way”/method or manal we can use to port or help port PhoneGap to Mac OS X or Linux? Two depts use Ubuntu and Mac.
* Piotr Walczyszyn: Well PhoneGap is a distribution of open source Cordova project so you can do it on your own, there is was some intial work done on it for Mac but I don’t it is very active at this point: https://github.com/shazron/phonegap-mac

27. AurelioDeRosa: Thank you very much for the answer. How can I know if it will be added? Have I to wait?
* Ray Camden: You would have to watch the site. They always announce new updates/etc.

28. Wyatt: To follow up on my question, fragments are android’s concept of segmenting code to change how things are displayed in particular of if it is a phone or tablet. The issue with firing an intent to do this is that an intent gains the full screen as if it is an activity so something like a dialogFragment becoms useless. Android is moving away from dialogs and other of their design concepts in favor of fragments so support for it would be nice.
* Ray Camden: Wyatt – thank you for that explanation. That is pretty darn cool. Afaik we have no support for that at all. You could use a plugint to try to interact with it. Sorry I don’t have more for you there.

29. Nathan Buth: In app I am working on I have two spots whee I recieve encoding errors on iOS. Both of thse errors come after a window.resolveLocalFileSystemURI and access the file. I am curious on if there ae bugs with this in iOS because i works fine on Android.
* Andrew Trice: What kind of file is this happening with? An image, text, or something binary?

30. StephenR: Is pulling in CF rendered HTML via ajax a bad idea or just let’s flexible?
* Ray Camden: In general, your services should return data only. However, there are always exceptions. If the ‘conversion’ from data to HTML is super complex in JS and easier in CF, then I say make the *practical* decision and do it. (Just separate the code into two methods to keep em cleaner.) Also note that templating engines, like Handlebars, make it easier in client apps to do HTML from data.

31. Steven Benjamin: For Phonegap 2.0.0. on Android does the splash.png reside in the res/drawable-{(x)dpi}/ folders?
* Piotr Walczyszyn: Yes

32. sheridon: Is there a page(s) on the wiki or blog that has optimization tips for PhoneGap in general or the specific builds?
* Ray Camden: In general, these issues come down to the platform – for ex – Android having weaker support for so and so versus the embedded web view in iOS (or vice versa). So I’m not aware of a PG doc in that regards, but I’ve seen various blog posts. Some tips apply to all like using touch versus click, but that isn’t PG specific, it’s mobile specific.

33. Amanda: Thank you. I’m currently using the network feature with navigator.network.connection.type to detect if a connection is available when the user submits. Is that no longer used?
* Andrew Trice: navigator.network.connection.type is unfortunately sub-optimal, and doesn’t always report accurately. I normally attempt to make a request, and don’t let the user proceeed until it is successful (or store all data locally and have a manual synchronization routine)

34. Ryan Hanna: Which file in the LowLatencyAudio plugin would be a good place to start to allow someone to change the iOS native AV Audio Session Category?
* Andrew Trice: LowLatencyAudioAsset.m is the one you want.
* Andrew Trice: That is what is used when an asset is loaded via preloadAudio() if you are using preloadFx(), it uses AudioServicesCreateSystemSoundID (system sounds)

35. Steven Benjamin: For PG 2.0.0 on Android, I notice that xlargescreens is no longer in the androidManifest, My splash screen on my HTC OneX is not working, and I am thinking that may be the cause, is there a reason that is it no longer there?
* Piotr Walczyszyn: Don’t think there is a reason for that, currently I have hdpi, ldpi, mdpi and xhdpi resolutions in my project and it works on most of the devices

36. Tac: You mentioned Handlebars — how does that compare to understore? We’re leaning toward backbone as a framework, not sure what templating engine to use, but the more examples out there the better. I’ve read through the examples on http://coenraets.org/, but what I want is one solution that runs on PhoneGap AND within a desktop browser (for debugging simplicity)
* Ray Camden: Tac, speaking from *limited* experience, Handlebars is just templating, while Underscore is a utility library with lots of other features. So I’d say it just plain depends. 😉 Frankly – I’d say use what is best for your development style. I prefer the template style of Handlebars over every one I’ve seen – but that’s just me.

37. Nathan Buth: Well at th moment it is an empty directory I am using it to call a series of functions that will write in an xml file in one case. In the other it is to add an image file taken with the camera.
* Andrew Trice: See this message thread from the cordova mailing list: http://mail-archives.apache.org/mod_mbox/incubator-callback-dev/201205.mbox/%3CCAM1AYQDL-ZPu6jwUpU5Eb7L8f7nOdv+ecNvmDeKYW8U8tr4_wQ@mail.gmail.com%3E it looks like that is invoked when the URI doesn’t specify a protocol
* Andrew Trice: See this thread too: https://groups.google.com/forum/?fromgroups=#!topic/phonegap/f4bO6Mm3bgs
* Andrew Trice: (add file:// prefix)

38. Amanda: Oh so you would recommend attempting to connect to the server and then just having it save locally if not instead of checking the network connection? I will do that then. Is a manual sync the only way to sync? I was hoping to have the app sync with the server when network became available even if the app wasn’t open…Is that possible?
* Andrew Trice: I typically do this: (capture data, save locally, attempt to push to server) all in one process. If that is successful, delete the local copy. If not, save it to push later. You can automate it by just using a timer, or using “online” event http://docs.phonegap.com/en/1.2.0/phonegap_events_events.md.html#online

39. Shaun: I am about to try phonegap, is there a good tutorial size that you would recommend? I have experience developing for the android, but thought I would try something different.
* Ray Camden: Personally – I’d just do the guide for your platform (Android) and get the default (empty) app running on your device. Then just starting writing your HTML/JS. :) THere are a butt load of blog entries out there on various examples of how to do so and so with PG.

40. sheridon: Can you provide us with any information on using PhoneGap for the not-so-famous platforms such as: 1. Google TV; 2. Amazon; 3. Barnes & Noble Nook?
* Andrew Trice: Nook and Amazon Kindle fire are no probelm “out of the box”. The developer process for google tv is restricted from what I hear, but I haven’t tried it myself.

41. MarkB: Is it possible to run an entire app that is served from an external source (i.e., a web server) through PhoneGap and keep it in the DroidGap Activity without using plugins like ChildBrowser (whenever I click a link in PG w/o CB it launches an Intent into the browser)? If so, do you know of any good resources or projects that would help?
* Ray Camden: You can do it in Android with this trick: http://gregsramblings.com/2011/10/12/stupid-phonegap-tricks-loading-external-content/. Not sure if you can do it with iOS, but if you do it, it will get rejected by Apple. Not an issue though if you are doing Enterprise deployment.

42. sheridon: Are there plans to support Blackberry OS 10 and any issues with the BB Playbook deployments?
* Andrew Trice: Yes, it is supported. RIM has contributors to the PhoneGap/Cordova project who will continue to evolve the support. See more detail here: http://devblog.blackberry.com/2012/05/blackberry-10-webworks-sdk/

From that post (from RIM): We are striving to bring BlackBerry WebWorks and Cordova closer together, and are actively part of the Cordova open source project providing contributions.
* Andrew Trice: However, I am not aware of exact specifics of what is supported by RIM.

43. berman eyal: what is the best javascript framework for using with PG?
* Andrew Trice: you can use any of them. PhoneGap is not prescriptive of architecture choice. Many people are successful with jQuery, Backbone.js (_.js), Sencha, jQuery Mobile, etc… If you are familiar and comfortable with one in particular, you can keep using it.

44. Steven Benjamin: I have the splash screen configurations exactly as previously posted… It does work for PG 1.8.0 but not for PG 2.0.0
* Piotr Walczyszyn: do you have in config.xml
* Piotr Walczyszyn: ?

45. Steven Benjamin: Piotr – I found the problem… The super.loadUrl was missing the delay time.
* Piotr Walczyszyn: Happy to hear that :)

46. Robert Winterbottom: Are there any advantages to using PhoneGap’s storage api and writing to a database compared against HTML5’s local Storage?
* Ray Camden: Robert, it isn’t better or worse – it is different. LocalStorage is good for key/value pairs. Ie, favoritecolor: red. WebSQL is good for content at a larger scale, and for stuff you have to search. Short answer is – use the feature that matches the type of data you are storing.

47. David R: Just curious.. Titanium vs PhoneGap – which one is best?
* Piotr Walczyszyn: If you really look into it deeper these are completely two different approaches, so you can’t really compare it. With PhoneGap you do HTML5/CSS3/JS development where with Titanium you only use JS as a programing language which gets compiled to native code.

48. Station 8: I was considering going to the AppMobi development environment using Phonegap. What I am trying to do is get away from having to develop on a Mac for iOS apps. Does anyone have any experience with this?
* Andrew Trice: You can use PhoneGap build (http://build.phonegap.com) for free to develop iOS apps without being on a mac.

49. Amanda: Ray, what do you mean by “content at a larger scale”? Sorry for not knowing
* Ray Camden: Well, obviously it isn’t cut and dry. I use LocalStorage for data that is simple. THings like config settings, or preferences. Like, favcolor: blue or lastSearch:foo. I use WebSQL for ad hoc data that can grow to any size. Like perhaps free form text notes that user enters.

50. Shaun: This may be a stupid question, but are there any issues with support when using html5 and css3 when developing for PG?
* Andrew Trice: it depends on the target device/OS. For example, Android 2.x doesn’t support SVG or

51. berman eyal: i want to learento create plugin, what plugin is a necesary plugin?
* Piotr Walczyszyn: You need plugins when out-of-the-box functionality is missing something or current plugins which you can find here https://github.com/phonegap/phonegap-plugins don’t do what you need. Here is docs how to create plugins: http://docs.phonegap.com/en/2.0.0/guide_plugin-development_index.md.html#Plugin%20Development%20Guide

52. Amanda: OK. We are using the local storage api to store form data temporarily and then pushing it to an SQL database with coldfusion. I want the app to be able to grow without getting bogged down. Does this sound optimal or would there be a better route? We have discussed couchdb and sqlite, etc
* Ray Camden: I think using LocaleStorage to store the form makes perfect sense. It’s one form – probably just 5-6 fields.

53. berman eyal: how to implement push notification for android?
* Piotr Walczyszyn: Well you can do as you would do with standard Android development, you can also use http://urbanairship.com/
* Piotr Walczyszyn: there is also a ready plugin for you: https://github.com/shaders/phonegap-cordova-push-notifications

54. David R: How do I call native PG functions through Javascript?
* Andrew Trice: There is “out of the box” functionality exposed through the PhoneGap API. See details here: http://docs.phonegap.com/en/2.0.0/index.html
If you want to integrate with custom native code, you can create whats known as “native plugins”, see detail for creating those here: http://docs.phonegap.com/en/2.0.0/guide_plugin-development_index.md.html#Plugin%20Development%20Guide There are also a bunch of open source native plugins that you can use/reference here: https://github.com/phonegap/phonegap-plugins

55. sheridon: Is there any matrix of what’s supported on B&N Nook or Amazon Kindle like you have with the other “main” platforms?
* Ray Camden: for that sheridon you need to check with the product sites. for ex, nook doesn’t support gps. that’s not something PG would normally document. make sense?

56. sheridon: And also, any emulators you know of for those devices?
* Andrew Trice: For Kindle, it’s just the Kindle Fire device (you have to enter a code for it to be recognized). For Nook, download the Nook development kit: https://nookdeveloper.barnesandnoble.com/tools-services/nook-tablet-sdk.html
* Andrew Trice: kindle fire emuilator guide: https://developer.amazon.com/sdk/fire/emulator-guide.html

57. Nathan Buth: Is there a way to make phonegap 2.0 use the front facing camera of a device like the Nexus 7 that has no rear facing camera?
* Ray Camden: Nathan, it should “just work” – ie, it will get the only camera it has access to.

58. Mikel: Any suggestions on the best way to tell what type of device that you’re on? Such as phone vs tablet so you can know which features you have available for use?
* Ray Camden: There is a Device API in the docs. It tells you – well – the device. 😉 You can also use JS to check things like screen size too.
* Andrew Trice: you can also use JS to test CSS media queries to make a determination programmatically. see: https://github.com/paulirish/matchMedia.js/

59. Preston: Any suggestions on snappiest JS/PG Framework/Tools?
* Andrew Trice: It depends on the developer and their preferences. Some people like jQuery, some people like Sencha, some people like no frameworks at all. One of the challenges with HTML development in general is that there are hundreds of frameworks, and thousands of ways of approaching a problem. We try not to be prescriptive in tech/architure inside of your phonegap experience. All HTML frameworks will work.

60. sheridon: Any apps using PG shipped on iPad that you can share?
* Andrew Trice: Lots :) see the showcase here: http://phonegap.com/app

61. Preston: PG seems dramtically slower in apps then when testing in browsers. I hear this is because of the lack of hardware acceleration in apps? is this something to just wait for or are there work-arounds?
* Piotr Walczyszyn: You can make really perfomant apps with PhoneGap, one issue is that on some platforms WebView component that is used by PhoneGap is restricted to use older/slower JavaScript viruatl machines.

* Piotr Walczyszyn: You can have hardware acceleration in PhoneGap apps also, and you enforce with same techniques as in browser like for example: translateZ(0) etc

62. tony: what are the difference between application done by phonegap vs native applicatinon done by obj c and if there thing can’it done by phongap?
* Ray Camden: Tony – it’s a big question. Obviously if you *know* native dev, it may be best for you. If you don’t and know HTML already, then PG is a great way to get on device. Even better, it allows you to go on *all* the devices at once. As for things that can’t be done in PG, in general, you can use the Plugin API to – well – plug in those holes.
* Andrew Trice: It’s also important to understand that PhoneGap’s UI rendering is based upon a web view. You can create any html experience for your app, but don’t expect things like 3D games coming to PhoneGap quite yet. You can read more about “phonegap ui” here: http://phonegap.com/2012/05/02/phonegap-explained-visually/

63. Shaun: Do I have to use Eclipse or can I use dreamweaver?
* Piotr Walczyszyn: You can use any editor you want, notepad, vi, Eclipse anything…

64. MarkB: [Android] Any recommendations for handling page transitions (e.g., a “loading” dialog of sorts) when moving between two different URLs?
* Piotr Walczyszyn: You can use jQuery Mobile for that, also you can use my framework called BackStack: https://pwalczyszyn.github.com/backstack

65. Spencer: Is there a way to cancel a PhoneGap plugin call that is already in progress? For instance if the app is waiting for data from a Bluetooth device, can the user cancel this action and kill the original request to the plugin?
* Andrew Trice: Out of the box, there is no way to do this. However, you can add functionality to your native plugin that will manage this for you (queue pending requests, kill pending requests). This would have to be managed in the native code layer.

66. tony: can Iadd phone gap application into appstore?
* Andrew Trice: Yes

67. Amanda: Andrew, how do you handle the data on your fresh food app? is the information bundled with the app or is it pulling from a server? if a server, what kind of db?
* Andrew Trice: it is bundled. It’s just a REALLY big JS array, and I’m doing client side filtering. I embedded it b/c I wanted it to work even when offline.

* Andrew Trice: To create the array, i imported the data from the FDA (excel export) into a MySQL database, did some minor data transforms, then used ColdFusion to generate the JS string. Once I exported it, its a “plain-old” JS array. To publish new data, I have to release a new version of the app. Luckily, the FDA only publishes their data once a year.

68. Preston: Is jquery a dependacy of BackStack?
* Piotr Walczyszyn: Well BackStack is dependent on Backbone and Backbone is dependent on jQuery or Zepto

69. MarkB: As a clarification to my earlier question, my content is to be served from an external web server and the resulting HTML will use HREF links to move between pages. Is it possible to have some sort of “loading” dialog that persists between the unloading of the first page and the loading of the second? (forgive my ignorance of Backbone/Backstack if it does this, my brief overlook of it seemed to focus on AJAX or dynamically loaded content)
* Ray Camden: There are a couple of ways you could handle this. One possibly simple way would be a jQuery event handler for anchor/click events in general. You could automatically display a ‘loading’ type div that would go away when the page loads. Not sure if that helps, but it’s definitely possible to do something while waiting for remote content to load.

70. Tac: Andrew: Wouldn’t storing the food data in a SQLite database be better? At least better for your readers, who would use it as an example!
* Andrew Trice: Take a look at this example from Ray: http://www.raymondcamden.com/index.cfm/2012/7/27/Guest-Blog-Post-Shipping-a-populated-SQLite-DB-with-PhoneGap I just went for the simple approach since the data is read-only.

71. Tac: Also, if you were to expand on the Fresh Food app, I’d vote for integrating an Open Source Places API, so you could find Fresh Food close to where y ou were at the time
* Andrew Trice: good idea, thanks!

72. Preston: Is there uglify or compile code when using BackBone/BackStack? I wouldn
* Piotr Walczyszyn: there is a BackStack minified version here: https://github.com/pwalczyszyn/backstack/blob/master/backstack-min.js
you can also find one for backbone: http://backbonejs.org/backbone-min.js

73. Preston: ‘t think closure complier would work but would you know of any that do
* Piotr Walczyszyn:
* Piotr Walczyszyn: Yeah closure compiler should work

74. Preston: Is there a way to uglify or compile code when using BackBone/BackStack?
* Andrew Trice: You can minify or uglify JS code, but since it is interpreted, not compiled, so true “compilation” is not an option, just obfuscation.

75. jared: My team has proven they can use phonegap on android and switch over to native code to do things that are not possible in phonegap like PDF annotation, ect. We are very comfortable on android but little experience with iOS. Does anyone know that it is possilbe on iOS to switch back and forth between phonegap and native XCODE?
* Piotr Walczyszyn: On iOS as on Android you can extend your PhoneGap application with native plugins which are written in native code.
* Piotr Walczyszyn: So answering your question yest it is possible and it is done similar way.

76. jared: Do you have any recommendations for a good cross platform PDF sdk? Looking at branchfire’s
* Andrew Trice: What do you mean? Normally just linking to a pdf works. Or, are you talking about creating pdfs?

77. jared: Open the PDF manipulate like add comments, draw, highlight ect.
* Piotr Walczyszyn: Don’t have a good one but branchfire looks decent and it should work for both.

78. Preston: BackStack doesn’t include iScroll4 as a dependency. This is included in App-UI, does this mean that mobile lists scrolling is handled differently?
* Andrew Trice: BackStack doesn’t have scrolling built in. You can use iOS’s default scrolling, or use iScroll.

* Piotr Walczyszyn:
* Piotr Walczyszyn: I also successfully used overthrow library with BackStack: http://filamentgroup.com/lab/overthrow/

Open Questions (7)
————————–
79. boobyWomack: I cannot get the one-liner to work though :)
80. boobyWomack: thanks Piotr
81. boobyWomack: thanks andrew, I hadn’t come across the emulator before but I am very new to this. It sounds great!
82. Nathan Buth: I am having issues where I keep recieving encoding errors in my app. The Android version works perfectly but on iOS it gives me the errors. I will post small segments of the code below to help. The two window.resolveLocalFileSystemURI lines seem to not receive POSTDIR_ABS. Normally I would think it just is not in scope, but it works fine on Android. Any idea on why it is not working? Here is a link to the code. https://docs.google.com/document/d/1MjPA5PGlsDxw8xYDwEllVC7dhTx2J6WhAyRpKGhON-I/edit
83. Shaun: site… sorry
84. Preston: Webapps once in phonegap seem slower, mistyped a little
85. Preston: is jQuery a dependency of BackStack



One comment

https://outof.me

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>