Статьи

Журналы из открытого сеанса PhoneGap

Спасибо всем (особенно команде PhoneGap!), Которые пришли на открытое заседание, которое мы с Холли провели сегодня. У нас была толпа большого размера и очень интересный набор вопросов. Между мной и Холли и другими участниками PhoneGap мы смогли охватить почти все. Темпы ускорились к концу, но у нас было жесткое время, поэтому мы не могли долго ждать. Мы определенно планируем повторить это в ближайшее время. Я использую Gists для журналов. Во-первых, это журнал вопросов и ответов: 

Answered Questions (26)
--------------------------
1. Ray Camden: Testing for holly
* Holly Schinsky: Testing is working 🙂

2. Nikhil Juneja: Phonegap recently aanounced the Enterprise program
* Holly Schinsky: @Nikhil, yes, it's a new offering from Adobe for Enterprise developers looking to use our enterprise offerings like Adobe Experience Manager (AEM or CQ), Adobe Analytics and more in their mobile apps, taking advantage of the content already available there. 
* Holly Schinsky: @nikhil - check out http://enterprise.adobe.com if you haven't already. There will be a lot more to come on this in the future...

3. Gary: Is there a way when opening the app to make the splash screen stay up longer to avoid a white screen from displaying
* Ray Camden: I think you want to diable hide. I blogged about this here where I made the SS last longer and took it away via JS. Let me know (via chat) if this doesn't help. http://www.raymondcamden.com/index.cfm/2013/4/23/Note-about-PhoneGap-Build-and-Splash-Screens

4. Alex: A phone gap / web view question - If you are building an app one challenge with a webview app is that all the logic (e..g search ordering) is visible to users (if they wish to). Are there any ways (now or in the future) to secure a webview app from prying eyes? 
* Ray Camden: The short answer is no - you can't hide the source you ship w/ PG/Cordova. You can put stuff on the server, as you said, but think of it like any web app. Folks *can* get to the source. 
* Holly Schinsky: Sorry @Nikhil it's http://enterprise.phonegap.com/

5. Stefan: i get some trouble with the newest plugins of camera and file, with camera 0.2.4 and file plugin 1.0.2 my code works fine. Where can i post my code, maybe you will found my error?
* Ray Camden: I'm going to rewirte your Q a bit, hope that is ok. I think it coudl be said, "if I find an issue with plugin X, what should I do". Remember that these plugins all have their own Github repos. So you have a place to file issues, as well as do PRs if you can submit a fix as well. 🙂

6. Martin: Is it possible for a phonegap application to send and/or receive data while closed? (e.g. when internet connection is restored)
* Holly Schinsky: @Martin - do you mean using something like push notifications?
* Holly Schinsky: @Martin - you can definitely use a push notification service to send your messages, and the intermediate server will hold on to them and retry until the message can be received by the target device.

7. Martin: (...) If the users had to fx repport when they started and stopped a job out in nowhere, and dot want them to manually open the app and upload when again connected
* Holly Schinsky: Wanted to answer here with what @brianleroux had mentioned in Chat. Use background services as plugins... possibly http://plugins.cordova.io/#/package/com.red_folder.phonegap.plugin.backgroundservice.

8. Nikhil Juneja: Unable to access http://enterprise.adobe.com/
* Ray Camden: It is enterprise.adobe.com. 🙂
* Holly Schinsky: It is http://enterprise.phonegap.com/
* Ray Camden: oops - I answered with the right thing in my head, the figners messed up. 🙂

9. greg marines: I'm new to phonegap and have installed node.js  cordovia and phonegap and built the hello world app in each. I've been looking on the phonegap doc's site to get an understanding of when I would choose to build a Cordovia app vs a PhoneGap app. If I'm planning on using phonegap build, is there a reason one would be preferred over the other? 
* Ray Camden: You can do the same with both CLIs, the syntax is just different. Also, PG CLI makes it easier to push to PGB via command line. With that in mind, I'd probably use the PG CLI instead. 

10. Alberto 2: We are looking to build a mobile app to process credit card sales and integrate with our web app. A key need is to integrate with a card reader.  I have googled around with little success.  Is this functionality available in PhoneGap?  If so, can you please point me in the right direction on an approach? Thanks.
* Ray Camden: Keep in mind that anything PG can't do with the core plugins, you can write your own plugin code for it. So the general answer is, if native code on the phone supports X, you can make PG support it via a plugin. Instead of googling around, be sure to check plugins.phonegap.com. It was recently updated and is a LOT easier to use. 
* Ray Camden: Sorry, make that plugins.cordova.io

11. Nikhil Juneja: My question is again related to the enterprise program. I have been working in SAP, and released an enterprise app for a customer on Phonegap last year Nov. My Question is there a preferred partner status/recognition that a company can apply for 
* Holly Schinsky: @Nikhil, yes we are definitely open to partnering. Contact Brian Leroux about this - [email protected] - he will hook you up with what you need 🙂

12. Gary: Is it possible on IOS to have the keyboard come up when you display a pop up so that the user doesn't have to place his finger into the text box to get the keyboard to show up. 
* Ray Camden: I found this on Stackoverflow - I assume it works. 🙂  http://stackoverflow.com/questions/12140484/programmatically-show-soft-keyboard-on-iphone-in-a-phonegap-application
* Ray Camden: From Shazron Abdullah: Gary: preference KeyboardDisplayRequiresUserAction set to false. then focus() on the text element

13. Alberto 2: Got it.  Thanks.  Are you aware of any plug-ins that accomplish this?
* Ray Camden: Off the top of my head no - check the site (note I fixed the url). 
* Holly Schinsky: http://plugins.cordova.io/#/search?search=keyboard
* Holly Schinsky: https://github.com/petehunt/react-touch

14. David: Will phonegap support building Cortana?
* Shazron Abdullah: We're in the process of getting 8.1 support. Not sure when the Cortana APIs are going to be released, but when they are, we would definitely explore it

15. David: Will phonegap allow developers to build html5 apps for xbox?
* Ray Camden: Via Brian Leroux - the answer is yes.

16. alberto: What is the advantage of using AngularJS and PG?
* Ray Camden: Holly may chime in as well as she has done a LOT more w/ Angular. As someone new to it, I just find it to be a darn good framework for organizing my application. I can spend less time worrying about "where do I put so and so logic or view" and just plain do it. That's the same benefit of frameworks in general, so it really isn't PG specific I suppose. Again, Holly will chime in too. 🙂
* Holly Schinsky: AngularJS is just a nice framework choice for faster development due to having to write less boilerplate type code, built-in handling for things like two-way binding (awesome for data-driven apps) and testability. I personally like to use it for mobile apps too because I can use Ionic to style my mobile apps quickly and make them look pro fast though I'm not a designer. Ionic is built on angular, see ionicframework.com... There are a lot of AngularJS directives already written to do things you may run across often as well, which makes overall dev't easier compared to some other framework choices.

17. Nikhil Juneja: Any tips or any particular features that should be included to get the App featured on the Phonegap.com website
* Colene Chow: First step is to submit it to the PhoneGap app directory: http://phonegap.com/app/submit. Once it's been submitted, the team reviews it and will approve it for the site. If it's been picked to be featured, the team will follow up with the submitter to discuss.

18. David: When you get 8.1 support , will xbox support be included at that time?
* Shazron Abdullah: Not sure, but my hunch is, no it will not be included

19. @robmuh: Alberto, have you heard any stylus options for ionicframework (other than sass)
* Holly Schinsky: Does this thread help? http://forum.ionicframework.com/t/converting-scss-to-stylus/2277

20. Greg: Do we need to now manage PG versions, and Plugin versions?  Just had a major File API issue due to the plugin updating.
* Shazron Abdullah: Greg. that was a developer error, they didn't update the dependency. It should be rectified by now, or in the next Plugins Release

21. Greg: still not sure what the difference/benefit is for PhoneGap vs Cordova - also the documentation on the PG site seems to lack this explanation.
* Holly Schinsky: http://phonegap.com/2012/03/19/phonegap-cordova-and-what%E2%80%99s-in-a-name/

22. Alfredo Ramirez: Does anyone why PhoneGap Developer App isn´t available for some tablets? Thanks.
* Ray Camden: I don't have an answer for that specifically, but I can follow up with the team to find out why. It could be simply a typo in the Android store settings.
* Holly Schinsky: Which tablets?

23. Greg: @shazron Abdullah gotcha, so no need to manage plugin versions?
* Shazron Abdullah: No you don't have to. However, there might be breaking changes if a major version is updated. ie from 0.x to 1.x to 2.x. Check the plugin page first.

24. Marc: Does phonegap support Amazon Fire tablet?
* Shazron Abdullah: Yes we support FireOS

25. Marc: Would phonegap be providing support for Amazon Fire TV?
* Holly Schinsky: If it runs on FireOS then yes.

26. Alfredo Ramirez: I've a Polaroid PMID702DC running Android 4.1.1 and when doing a search in Google Play it isn't listed.
* Holly Schinsky: I will add to follow up!

Open Questions (8)
--------------------------
27. Nikhil Juneja: can you throw some light on that 
28. Gary: Thanks Ray
29. Hit0: obfuscate the code
30. alberto: how would you secure a PG app? 
31. David: Will phonegap allow developers to build html5 apps for xbox?
32. Alberto 2: Thanks guys.  I searched there does not appear to be one.
33. Diana: What is the problem with global variables? and If i use them, do i have to take care at smth specific?
34. Greg: Does the PG CLI get updated as well?  Wondering this as PG is up to 3.4 but in the docs for 3.3 and 3.4 it says to use the Cordova utility, not the PG one.

А вот и журнал чата. Это немного более свободная форма, но здесь есть и хорошие самородки.

Ray Camden:Hit0 - you are a bit early
  Ray Camden:hey folks, we will get started in 9 minutes
  Fiurboy::)
  Holly Schinsky:Welcome everyone 🙂
  Nikhil Juneja:hello
  alex 2:hi everyone
  Ray Camden:hello
  Ray Camden:we will start up in a few minutes
  Nikhil Juneja:no worries
  Martin:Yea 🙂
  Ray Camden:OK RELEASE THE HOUHDS!
  Ray Camden:(or questions)
  Ray Camden:hounds even - sorry
  Ray Camden:to be clear, you guys see the Q and A pod to the right, right?
  Holly Schinsky:Anyone have a question we can try to help with? Enter in the Q&A pod to the right 🙂
  Ray Camden:Don't be afraid. Holly doesn't bite. And I just had lunch. 
  Nikhil Juneja::)
  Alex:what kind of topics would you like questions on?
  Ray Camden:i deleted your second q nikhil
  Ray Camden:holly is on it
  Ray Camden:alex - this is up to you guys
  Ray Camden:we're here as experts
  Ray Camden:(i hate that word)
  Hit0:ö
  Hit0:hello 
  brianleroux:ola
  Hit0:hola
  brianleroux:=)
  Ray Camden:crap, now i cant make up answers
  Michael Brooks:hi!
  Judah:I'm came on just for the Star Wars Q&A
  Ray Camden:folks, please use Chat pod for thanks, or crticisms of answers 🙂
  brianleroux:another splash screen tip: have your index.html ONLY load css/js to show a splash screen and then control load logic yourself
  Hit0:What's this?
  Ray Camden:Alex, are you asking about hiding source in general?
  brianleroux:so: code the splash screen twice
  brianleroux:once native / once in your webview
  Alex:yeah hiding source (can put some code in an endpoint on a server, but if you want the app to work offline, you have to pretty much do everything in the app)
  Hit0:localstorage
  Nikhil Juneja:ok
  Ray Camden:alex: answered
  Hit0:obfuscate the code
  Shazron Abdullah:Alex: uglifyjs (obfuscate)
  brianleroux:protip http://www.jsfuck.com/
  Ray Camden:hit0 - pls do not add comments in the QA pod, do so here.
  Shazron Abdullah:the cool thing about uglifyjs is, it can generate a source map. So if you want to debug your uglified js, you can (and of course, not include the source map in production)
  Hit0:0k
  Ray Camden:@alberto: secure in what way?
  brianleroux:@martin: you can also code background services as plugins.
  brianleroux:but that requires you to traverse into native land
  brianleroux:we've discussed JS based background workers…
  Ray Camden:@bl - i coulda sworn there was a good plugin for that lately
  Martin:Yea 🙁 i would love to stary HTML / JS
  brianleroux:it is a very tricky problem 
  Martin:stay*
  brianleroux:ya me too man
  brianleroux:lol
  Ray Camden:This *may* be it, but I swear I saw as impler one: http://plugins.cordova.io/#/package/com.red_folder.phonegap.plugin.backgroundservice
  Martin:only for Android though, right?
  greg marines:I'm new to phonegap and have installed node.js  cordovia and phonegap and built the hello world app in each. I've been looking on the phonegap doc's site to get an understanding of when I would choose to build a Cordovia app vs a PhoneGap app. If I'm planning on using phonegap build, is there a reason one would be preferred over the other? 
  Nikhil Juneja:ok thanks
  Shazron Abdullah:Martin: yes, with new iOS 7 features about background fech and remote notifs. Prob need a plugin, but we have this issue: https://issues.apache.org/jira/browse/CB-4846
  Ray Camden:that one there - yeah. again though - i thought i saw something else
  csantanapr:Hi Guys 🙂
  Shazron Abdullah:Hi Carlos!
  Ray Camden:greg, that is a good q, do you mind posting it in the QA pod?
  Ray Camden:we are going to publish those later
  greg marines:Sure
  Ray Camden:and @alberto - still waiting on clarification
  brianleroux:hey carlos!
  brianleroux:ideally phonegap and cordova are interchangable
  brianleroux:cordova is lower level
  brianleroux:phonegap more sugar
  brianleroux:so you can use both on the same project
  alberto:@Ray, I need to develop an app that sends money transfer, I know that I need to use https, but do you have any other recomendations?
  brianleroux:should always remain the case
  Ray Camden:albert, i accidentally deleted your q cuz i thought your second q was providing more detail. i'm sorry. if you want to ask the generic security one again, that is cool
  David:1) Will phonegap support building Cortana? 2) Will phonegap allow developers to build html5 apps for xbox?
  brianleroux:yes
  Ray Camden:david, please ask your questions in the QA pod
  Ray Camden:and one at a time please
  David:ok
  jbavari:Ray - the plugins site for Phonegap (Build) is https://build.phonegap.com/plugins 
  jbavari:The cordova Plugins site is - http://plugins.cordova.io/#/
  Ray Camden:uhuh... sorry - context for this?
  jbavari:Your answer you stated it was plugins.phonegap.com (wrong)
  Ray Camden:oh shoot 
  brianleroux:http://plugins.cordova.io/#/search?search=keyboard
  Ray Camden:i'll correct
  Nikhil Juneja:Thanks Holly, will contact Brian
  Ray Camden:@brian - you answered David about COrtana, right, and it was Yes?
  Shazron Abdullah:Gary: preference KeyboardDisplayRequiresUserAction set to false. then focus() on the text element
  Ray Camden:shaz, stealing this to add to the answer text
  Shazron Abdullah:Ray: that answer does not require the Keyboard plugin, it's core to iOS
  Hayk:Hello. Will there be a video stream?
  Ray Camden:No, just questions and answers. You missed my audio at the beginning - and you didnt miss much 🙂
  Holly Schinsky:@Hayk, no video
  Ray Camden:Holly and I will post the QA text later.
  Ray Camden:shaz - ok - so the SO answer is out of date?
  brianleroux:@alberto: give ReactJS a try too. This demo runs buttery smooth on most phonegap targets https://github.com/petehunt/react-touch
  Ray Camden:@alberto: deleted your comment from QA pod. So if there is not one, you may have to write one
  Ray Camden:david, deleted your dupe
  csantanapr:Need to set the configuration setting for KeyboardDisplayRequiresUserAction ref=  http://docs.phonegap.com/en/3.4.0/guide_platforms_ios_config.md.html#iOS%20Configuration 
  Holly Schinsky:@David, did you see brianleroux's response earlier about apps for xbox? The answer was yes...
  Alberto 2:Holly Schinsky: I think you meant that link for the other alberto
  Ray Camden:i wanted brian to confirm that before i edited it
  Holly Schinsky:@Alberto 2 - SORRY! 
  Alberto 2:no worries... I thought you found a plug-in for card reader;)
  alberto:@brian tks
  Nikhil Juneja:Card.io can be used to read credit card numbers
  brianleroux:sorry Ray confirm which? I tuned out there =P
  Ray Camden:bl, see question about html5 apps for xbox
  brianleroux:oh!
  brianleroux:yes that is all on the way
  Ray Camden:notice it isn't wii u, since that isn't a real video game platform
  Ray Camden:thx
  Holly Schinsky:@Alberto 2 - Sorry to get your hopes up 😉 will try to locate one though! 
  Alberto 2:@Nikhil - Thanks.  I found them, but i need to be able to send track data
  brianleroux:ray: we did talk to nintendo and it is totally technicallly feasible
  brianleroux:just need a person to own it
  Nikhil Juneja:send track data, can you pls elaborate
  Ray Camden:oh heh - sorry - was making a lame joke about it being a subpar system. running argument w/ my eldest boy 🙂
  brianleroux:adding nintendo and xbox both would be a rad way to get involved in cordova HINT HINT ppl
  brianleroux:oh lol
  brianleroux:if it has a web browser we'll phonegap it 😉
  jbavari:Phonegap for xbox kinect plz
  Michael:Sorry way late to this. Did you talk about Cordova 3.4 and plugin issues? I seem to be having a bunch Mach-0 errors
  Ray Camden:michael, see the QA pod to the right, and no, i dont think it was discussed. do you have a specific example?
  Michael:Well the GA plugin on Build is the one I used. Shazron said that it wasn't set up to support 64 bit
  Michael:I can't build and update my app in store
  Michael:I thought oh I'll remove it
  Ray Camden:that sounds like something you would need ot bring up with that plugin author though  - right?
  Alberto 2:@Nikhil - the data contained on the magnetic strip is called the track data.  It is needed to be sent for card present transactions (as opposed to card not present transactions)
  Michael:Now I have tons of errors. Haha
  Alberto 2:@Nikhil - the track data contains more than just the card number
  Nikhil Juneja:there are variuos mobiel readers availbale like Ingencio and Unimag, Plugins can be written for that to accomplish the functionality 
  Michael:Tried, no reply.
  Michael:Nobody here is having iOS issues with 3.4?
  Ray Camden:@michael - at the end of the day, it is either their responsibility to respond, or you have to fork/fix yourself. :\
  Michael:ok
  Alberto 2:@Nikhil - Thanks.  I was aware, but I was hoping someone had already done the work 😉
  Shazron Abdullah:Michael: what was their response when you filed the issue?
  Michael:I thought Build plugins that are on the build plugins site might get attention quicker
  Nikhil Juneja:I did a prototype for Android for a customer 🙂 last month 
  Nikhil Juneja:for Ingenico for Android Platform
  Michael:Oh hey Shazron. No response. There seems to be discussion that the plugin development looks dead.
  Shazron Abdullah:Michael: can you point me to the link
  brianleroux:gotta bail out but this was cool: thx for organizing Ray and Holly
  Ray Camden:thx for helping bl!
  Holly Schinsky:Thanks Brian!
  Michael:yes let me get it
  Ray Camden:@Diana: by global vars, do you mean global javascript vars? and what do you mean by smth ?
  Chris:Can we get a better tutorial/example for the new .pgbomit support?
  Michael:https://build.phonegap.com/plugins
  Ray Camden:@Chris: sounds like you want a blog post on it?
  Chris:@Ray yeah. I am being lazy
  Michael:Just an FYI. My boss is going to a large public sector conference and presenting our App made with Phonegap.
  Michael:Kind of cool
  Ray Camden:@Chris: I'll add it to my notes below for follow up - Holly and I both blog like craxy
  csantanapr:@Crhis like this one ? http://www.joshmorony.com/using-phonegap-builds-pgbomit-to-drastically-reduce-file-size/
  Shazron Abdullah:Hmm yeah PGB plugins are in a limbo state right now, stay tuned. But did you file an issue at https://github.com/phonegap-build/GAPlugin/issue
  Holly Schinsky:@Chris - ditto
  Ray Camden:boom - im done - thanks csantanapr 😉
  Alberto 2:@Nikhil - what about iOS?  do you need plugins for each platform?
  Nikhil Juneja:yes
  Michael:yes i did shazron
  Nikhil Juneja:it needs to natively achieved
  Michael:Ray can you or Holly email people when these are happening?
  Ray Camden:@michael: sorry, when what are happening?
  Michael:these connect sessions
  Ray Camden:I blogged it, as did Holly, and it was Tweeted quite a bit 🙂
  Ray Camden:my blog has a subscribe option. when you subscribe, a kitten gets a treat. 
  Enrique Dominguez::)
  Ray Camden:@michael: I'd recommend following @phonegap
  Chris:And Ray get's a Stone IPA
  csantanapr:@Michael setup for twitter notifications for @phonegap at least that's how I got reminded 🙂
  Alberto 2:@Nikhil - Got it.  Thanks.  I may need help.  Interested?
  Michael:ok thanks
  Nikhil Juneja:sure, we can connect on Linkedin
  Shazron Abdullah:@Michael I'll try to fix it
  Colene Chow:Following @phonegap is the best way to stay up to date with what's going on 
  Michael:Thanks Shazron
  Ray Camden:there is also a community phonegap blog, has multiple sources: http://phonegap.com/blog/
  Alberto 2:@Nikhil - Great, I will reach out to you when we are ready to get started.  Thanks
  Chris:When will the Build forum email issue be addressed?
  Nikhil Juneja:great
  Shazron Abdullah:@Chris: not sure what you are talking about
  Kris:Did you know that the PhoneGap Apps page is broken (http://phonegap.com/app/) it cannot page beyond page 1 (you only ever see the first page).
  Greg:still not sure what the difference/benefit is for PhoneGap vs Cordova - also the documentation on the PG site seems to lack this explanation
  Ray Camden:@Kris: I can confirm that. @Colene - you aware?
  Michael:Have you noticed that when you remove a platform you have to manually go in and remove .DS_Store?
  csantanapr:There is a typo on the url shared on the A http://phonegap.com/app/submit. dot at the end
  Ray Camden:@Greg - can you add that as a q please
  Alberto 2:@Nikhil - There are many with your name.  which on is you?
  Chris:@Shazron the PhoneGap Build @ getstatification is send emails for every post
  Kris:Also is there any way to update your listing in the Phonegap Apps page (add a platform for example)?
  Bruce Lefebvre:@Greg see this post from Brian on the subject: http://phonegap.com/2012/03/19/phonegap-cordova-and-what%E2%80%99s-in-a-name/
  Nikhil Juneja:uk.linkedin.com/pub/nikhil-juneja/12/34/69a/
  Ray Camden:btw folks - we are going to have to end in about 5 minutes. the hour went FAST
  Ray Camden:its evident we need to do more of these. agreed?
  Chris:yes
  Enrique Dominguez:yes
  Michael:yes more
  Ray Camden:consider it done 😉
  Chris:Need a mind meld to make sure my ConfiGAP app is still making proper config.xml files for PhoneGap Build. hint hint
  Shazron Abdullah:@Chris not sure, what is your userid
  Chris:I am not the only one with the issue from the forum
  Chris:@shazron will you ping offline on it
  Shazron Abdullah:ok
  Ray Camden:Ok folks... that is it
  Ray Camden:next time I think we will schedule it for 1.5 hours - seems like folks REALLY ramped up the last 30 minutes
  Nikhil Juneja:Thanks Phonegap Team
  Nikhil Juneja:Phonegap Rocks!!!!
  Colene Chow:Thanks for setting this up Ray and Holly 🙂
  Ray Camden:thanks colene, shaz, and brian for helping us 🙂
  greg marines:Thanks Ray
  csantanapr:Thanks everyone
  Ray Camden:folks, I'll be sharing the QA transcript on my own blog later today - have to be out of office for about 2 hours
  Ray Camden:I'll send to Holly as well for her blog
  Ray Camden:thank you ALL for sharing your questions!
  Shazron Abdullah:This was fun. Thank you all! bye
  Michael:thank you all
  Ray Camden:Im closing the meeting room in 30 seconds 🙂
  Holly Schinsky:Thanks guys!!! Until next time 🙂
  Greg:Thanks!