Skip to content

Instantly share code, notes, and snippets.

@cfjedimaster
Created May 9, 2012 00:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cfjedimaster/2640834 to your computer and use it in GitHub Desktop.
Save cfjedimaster/2640834 to your computer and use it in GitHub Desktop.
Answered Questions (45)
--------------------------
1. Crystal McDonald: What would cause a default set up not to produce a www folder where you are creating an app for testing?
* Andrew Trice: If you are on iOS in Xcode, the folder gets created automaticlaly, but you have to add it to your project manually. Right click on the project, then select "Add Files"
2. Mikel: I ran across a interesting issue the other day. Is there a way to tell device functionality? I want to show phone numbers for devices that have that capability and not show them for other devices. I was going to make a "table" edition and a "phone" edition but some tablets have phone capabilities.
* Ray Camden: I think there are a couple of answers to this. One is to use what you would on the desktop - feature detection using JavaScript. You can also use the Device 'struct' you get via the PhoneGap api to detect ios versus Android for example. But in general, I'd lean towards JS feature detection.
* Andrew Trice: There is no phonegap API method to determine "can you make phonecalls", however you could create a native extension to expose such a method (if one doesn't already exist)
3. John S: i'm curious about the feasability of developing a magazine style app which shows the magazine in traditional print style format. Would this be possible by downloading .pdf files of the entire magazine issue to the Phone Gap applications and then displaying them inside the app?
* Andrew Trice: It is theoretically possible, but you will get letterboxing due to aspect ratio differences. I would use a responsive HTML design, and handle all of your content as HTML.
4. Mark Gregory: Hello! Very broad question, hopefully not too broad. I am at the starting line on mobile (with CF). Why Phone Gap over other JS/Mobile frameworks? What are the advantages?
* Ray Camden: Heh, well obviously I'm biased. I've found PG to be easy to use. I like its API. I like how simple it is to create apps. I like the Build service. I honestly don't have a lot of experience with other solutions. PG "works" for me and makes me productive. That's why I recommend it. (It's the same logic I'd use for server-side platform, JS framework, etc.)
5. Alejandro Montenegro: what are the main security issues to consider when developing phonegap apps that communicate with server side, example home banking
* Andrew Trice: More or less the same considerations that you would use in a mobile website. Make sure that service methods are encrypted via SSL, be careful about storing sensitive information on the local device. All apps are sandboxed by the operating system, but if someone has physical access to your device (steals your phone) they can always get to it.
6. elliot: Hello, thanks for taking the time to do this today. I'm making a podcast app (pulls in the rss xml feed). When I like to the audio using the Media element it waits for the file to completely download. Is there an optimal way to play a remote MP3? (i'd use the html5 audio tag, but i want the audio to play in the background). Thanks.
* Andrew Trice: You could use HTML5 audio on iOS (but only one file can play at a time). On Android 2.x and earlier, there is no HTML5 audio tag. I'm pretty sure that the PhoneGap media class plays once their is sufficient dat ain the buffer, as opposed to being loaded completely (however I may be wrong on this... I;'d have to look at the actual src code to doulbe check)
7. Crystal McDonald: I right clicked to add files and it didn't create the folder automatically so I was just wondering why it might have not worked.
* Andrew Trice: You have to try to run it once first, it will give an error message. The folder gets generated on the first attempt to run it. After the first attempt, add the www folder.
8. Tan: Is Phonegap looking into developing for Windows 8 yet?
* Ray Camden: Right now PG is _just_ for mobile development. Nothing has been said desktop. Don't forget you can build desktop apps with HTML/CSS using Adobe AIR. (People forget about the non-Flex/Flash version of AIR.)
9. Joseph Labrecque: Curious: What sort of mobile projects would you say PG is not well suited for, if any? Is the sky the limit or do we have some contraints to be aware of?
* Ray Camden: Personally if I were building a game, or something with high graphics requirements, I'd probably lean towards AIR. I guess it's more of a gut feeling per project. Like - I can see Evernote/Dropbox being great pG apps. Angry BIrds? Probably not.
10. Steve Smith: Is there an effective way to use the webview in iOS that provides the navigation bar functionality (such as childBrowser) that doesn't cut off all the functionality of PhoneGap / cordova? I notice whenever I direct a page through something like that it will stop recognizing and revert to pure HTML / JS only.
* Andrew Trice: No, there is no way to do that. ChildBrowser is a separate web view that does not have ties back into phonegap. What is your reasoning for this? You could include HTML-based content in a DIV inside of the same web view, and not have this issue.
11. Chad B: Ray had touched on this in a blog comment a month or so back. I've got a simple RSS app (lightly based off the tutorials) and my question is this: Is there any way to run the application as a service/in the background so that it can receive push notifications on a new post? (Android ICS, latest build pg)
* Ray Camden: Sorry - neither Andy or I have a good answer for this. There are native plugins for push notifications, but as I said, we haven't played with em yet. (But now I'm feeling like I need to. :)
12. Michael: Should I minify / obfuscate my source prior to deploying a build? I'd like to know if the source is viewable on the device.
* Ray Camden: I don't bother. If you are loading JS from the local PG app, there is no network benefit to minification. Have I done scientific studies - no - so I'm willing to be proven wrong. As to your second question, yes, from what I know PG apps can be 'broken apart', so it is something to keep in mind.
13. Alejandro Montenegro: what is the strategy to keep supporting new platforms/devices, best effort?
* Ray Camden:
14. Jeff Thurston: When will the release cycle settle down? We are building an app and want to standardize on PG release.
* Andrew Trice: The PhoneGap/Cordova roadmap is available here: http://wiki.apache.org/cordova/RoadmapProjects The team is aggressively working to bring consistency and stabilization across all platforms. The schedule is determined by the open source project, not just Adobe. More detail here: http://phonegap.com/2012/04/12/rolling-releases-how-apache-cordova-becomes-phonegap-and-why/
15. elliot: And the Media Class doesn't have a download progress variable that I can monitor right?
* Andrew Trice: Correct, it does not. However, if you are familiar with native coding, it wouldn't be difficult to grab the source and modify to what you need.
16. kim Rasmussen 2: Hi All, thanks for the time today.. I have just released my Version 1 of my PhoneGap /jQuery Mobile app on Android Market.. but are still struggeling with responsiveness of jQuery.. I have been looking on different optimizatizations idears, ands alternatives.. I like the Look of the jQueru Mobile apps the are just so slow to work with.. Has any of you found a better framework for UI's that is more responsive?
* Ray Camden: So I've seen JQM be a bit... non fast (grin) as well, but I know they have worked real hard on performance especially past the 1.0 release. I'd _strongly_ urge you to try with the latest if you have not. If you are still seeing sluggishness, maybe follow up with me directly.
17. Nathan Smith: This is just wishful thinking, but... Is there any chance of having a cross-platform version of WebKit embedded in PhoneGap? Meaning, not having to use IE9 rendering engine on Windows Phone, etc.
* Andrew Trice: Including a webkit engine is not on the project roadmap. However, with PhoneGap 1.7, at least you can now use touch events on win phone - i know that doesn't solve the browser rendering differences though.
18. Jeff Thurston: OLet me ask a different way, we have an app that is using Sencha Touch and PhoneGap that is slated for GA in July. Should we stay on Cordova 1.7 at this point or is 2.0 on the roadmap by that time?
* Ray Camden: This is just my personal experience - but I don't see why you wouldn't go with 1.7 now and post an update - IF you need to - for later releases.
19. Crystal McDonald: Hi Andrew, yes I have ran the program and received the error message. The folder does not automatically create. I have reinstalled, recreated and still nothing. Would there be another reason it would not recreate?
* Andrew Trice: do you have any error messages in your xcode project?
20. Crystal McDonald: I did control click to add the file. with no luck. sorry left that part out.
* Ray Camden:
21. elliot: Do you know if the native code for the Media Plugin tells it to wait for the file to be completely loaded? Or if that's an iOS requirement (If so, I could just also edit that so it plays sooner)
* Andrew Trice: looks like on android it could stream, but on iOS it is synchronus... i'd have to spend more time looking at it to determine if it could be truly streamed.
22. JoostH: We are working on a catalogue app using PG that gets/syncs external data using JSON and needs to store that locally (on ani os device) to access when offline. What local storage method would you suggest?
* Ray Camden: You have two very powerful options - WebSQL via the Database API (check the docs) and the File API. Most likely you want the database so you can do searches, atomic updates, etc. I've got multiple blog posts on this topic if you want examples (hit me up directly)
23. manya: No idea if anyone already asked this. Is Push Notification going to be available on Cordoba API?
* Andrew Trice: There are native plugins for push notifications available on github. This is not something that is currently scheduled in the project roadmap. You can view the roadmap at: http://wiki.apache.org/cordova/RoadmapProjects
24. Simon MacDonald: On Android the Media class needs to be refactored a bit to remove delays when you call play. It is on my global todo list but no timetable right now.
* Ray Camden:
25. Charles: iOS developer here for the past 3 years. What advice and resources would you have for HTML5, PhoneGap, etc. that would make getting into hybrid development much smoother?
* Ray Camden: That's kinda broad - best I can say is to hit up some of the excellent sites out there. Here is a short list - html5rocks.com, whichelement.com, diveintohtml5.info, html5doctor.com, canuiuse.com, www.adobe.com/devnet/html5.html, html5weekly.com, html.adobe.com. And lots and lots of blog reading. :)
26. Alejandro Montenegro: on Android you have the back button but not on iOS, what do you recommend for the UI with that issue?
* Andrew Trice: You need to have a button or navigational element that enables the user to go back. UI frameworks generally have this capability. jQuery Mobile has it, app-UI is based upon "navigators"- other frameworks have these concepts as well
27. elliot: You guys have any high-level "Do not do this or your app is definitely going to the Denied" recomendations for app store submissions?
* Andrew Trice: 1) follow UI guidelines - if it looks really out of place, it will get rejected
2) do not download code that will be executed from a server. apple has rules against dynamic code generation or downloading executable code. Try to only serve data/content/images/media from a server
28. Steve Smith: I saw 2.0 will cut the previous plugin methods, and the discussions I have read on the site relating to this issue were a little unclear about the game plan for how to still support external additions.. Has a plan been finalized or is it still in the works?
* Andrew Trice: I believe it is still in the works. When this is formalized, it will be clearly documented b/c it will be a pretty big impact, and all current open source plugins will need to be updated to the new architecture.
29. kim Rasmussen 2: I have been using build and actually my publiched APK on Market is a build - build app.. i have now started W7 and iPhone porting and have been getting odd "pghnegap_pool" messages.. I know that it has to do with the version of the JS, but have been searching the doc on Best practises on how to handle this.. I am on the latest 1.6.1 (build latest) and I read somewhere that frol 1.5 the .JS is shared.. But for Build would I need to rename the JS from Cordova-1.6.1.js to cordova.js ? But Build is Cool...
* Ray Camden: Kim, it was my understanding, and someone correct me if I'm wrong, that if you refernece "cordovoa.js" in the script tag, that the BUild service will do the proper replacements for you. If you aren't seeing that... um... let me know I suppose. It should "just work" afaik.
30. Steve Smith: I know right now it is a bit of a free-for-all with trying to get ready. Any advice for best practices or somewhere to track progress on what's currently being used or most likely?
* Ray Camden: Credit Andy: The 2.0 spec isn't settled yet - so no real answers on this one yet.
31. Steve Lantz: I really need push notifications, is there any chance I can use Apple Push Notification Service with PhoneGap?
* Andrew Trice: There are native plugins that you can use today for push notifications. https://github.com/phonegap/phonegap-plugins/tree/master/iOS/PushNotification
* Andrew Trice: Notifications are not scheduled on the Cordova roadmap at this point.
32. elliot: Are you able to download to the music library (in my case a podcast) through an iOS app? (i doubt PG can out of the box, but if iOS allows, it could be a plugin)
* Ray Camden: Actually the file api should make this possible. i dont know if iOS locks your app out of that folder, but the File API would be what you use.
33. Steve Smith: Is cordova taking over things such as the phonegap github? or will that stuff fade off and be replaced?
* Andrew Trice: The core SDK has already been moved over to teh Apache git repository at https://github.com/apache/ community driven plugins will remain at: https://github.com/phonegap/
34. Steve Lantz: is there any update on getting Phonegap ported to Kindle readers(not fire)?
* Andrew Trice: I have not seen this on the product roadmap, so I don't think there are any updates.
35. rd: geolocation shows full path of html file when asking if we want to allow it. Anybody know why and/or how to disable path?
* Andrew Trice: are you using in-browser gelolcation api, or phonegap api? PhoneGap api will ask for app name to have permission. in-browser JS api will show file name. See the FAQ at: http://wiki.phonegap.com/w/page/16494770/FAQ you must wait for the device ready event.
36. rd: any steps on how to upgrade phonegap to cordova in dreamweaver?
* Ray Camden: Unfortunately the answer is no. You will want to upgrade to 6. Does that mean you can't do PG work in DW 5.5? Heck no. You can still do it and upload your code to Build. It is a bit manual, but still works very well I think.
37. Mike Walker: Is there a plan to build out more support for front-facing cameras on devices? I know with the developing standards it's difficult but definitely would be very useful.
* Ray Camden: I believe there is no direct support for this yet - I did a quick search - and I can highly recommend the PhoneGap Google Group - and didn't see anything conclusive yet.I'd maybe check the plugins repo in the future.
38. Daniel: Is here a way to monitor the memory usage of a phonegap app? i'm developing an application with a lot of images in the DOM
* Andrew Trice: There is no API method for this, however the memory usage metrics can be accessed via native code. You would have to create a native plugin to access this information. This would be a great feature addition, and ill make a note about it.
* Andrew Trice: You could use the profiler from the web inspector in the iOS simulator, using iWebinspector, or you could use the debug tools in desktop chrome or safari to evaluate memory usage of your HTML/JS experience
* Andrew Trice: If you want device-memory usage, you'd need the plugin.
39. Daniel: for creating a native plugin: is this still the best article to get started? http://www.adobe.com/devnet/html5/articles/extending-phonegap-with-native-plugins-for-ios.html
* Andrew Trice: yes, however keep in mind that architecture is changing in 2.0. Also, there is a case sensitivity difference in Cordova vs cordova in the latest SDK. Otherwise that article is up to date.
40. wondermade: Related to Mike's question: Can you build a phonegap-based app that defaults the video capture to the front facing camera? (Can't quite tell from the docs / Google groups.)
* Ray Camden: As I said to Mike's - I don't think there is any official way of doing this now. Not saying it isn't possible - but I don't believe you can "out of the box" (very happy to be proven wrong however).
* Andrew Trice: You can access the front facing camera using the existing PhoneGap API, it just won't be the default option. You have to select it when the camera's UI is displayed.
41. elliot: Do you know of any good resources for example apps?
* Andrew Trice: http://phonegap.com/apps
* Andrew Trice: http://www.tricedesigns.com/2012/03/27/who-uses-phonegapapache-cordova/
42. Daniel: i've been looking in the prev questions but couldn't find it: what can we expect in version 2 of cordova?
* Ray Camden: check the RoadMap
43. Steve Smith: Will there be a place to download an archive of this? I think I missed that link ;)
* Ray Camden: Both of us will post the question export today sometime
44. oc: Is there any way to get information related to the performance of an app programmed using PhoneGap?
* Ray Camden: Oc - I don't know who asked this, but it was asked a bit earlier. Check the archive when we post it to our blogs.
45. oc: relted to Daniel's question, is there any performance related metric that can be obtained from phonegap?
* Andrew Trice: No, phonegap relies on the native web view. This uese native rendering engine and native JS engine. Each have different performanc metrics
Open Questions (1)
--------------------------
46. Steve Smith: Odd question, but PhoneGap to cordova... Was it just about case-sensitive platform support? Seems to have made a big ripple for a lot of updates, so I figured I would ask
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment