HelloPhoneGap1.0 Project updated for PhoneGap 1.1.0
I just updated the HelloPhoneGap1.0 out on github so that it works with PhoneGap 1.1.0, iOS5, and Xcode4 with the new project structure. Let me know if you see any issues…
Where to get the Code? (PhoneGap 1.1.0 Required)
You can get the entire source for my sample project “HelloPhoneGap1.0” from github here: https://github.com/hutley/HelloPhoneGap1.0
Thanks for this, finally got Childbrowser working!! 🙂
Do you have any suggestions how to get full screen childbrowser to Ipad.
Found a row in childbrowserviewcontroller.xib and with values
below working childbrowser is working fine in a portrait mode but there is some empty space in landscape mode.
{{0, 0}, {768, 1024}}
Change the ChildBrowser.xib file so that the contained widgets will auto-resizes appropriately.
Yes of course, got it working. Thanks 🙂
I was wondering is there a way to use native back button to get that really nice sliding effect? Currently when you click the back button it pushes a notification. How would I make it actually go back to a different page? Great work thank you for the most clear explaination on phonegap yet.
You can supply any javascript function you want as a callback – the nice sliding effect you are talking about is when a native view controller presents another view controller. In a PhoneGap app – you are running in a webview and all your pages are html and javascript. If you want nice animations I suggest a UI javascript framework like Sencha Touch.
Is there anyway you could create two view controllers to achieve those effects? Using just phonegap? I’m guessing this would be hard to achieve and a cumbersome solution but I just find js back buttons don’t have the same feel as native. Thanks for your clear explanation on the previous question.
You could write your own plugin to provide the functionality you want.
jquerymobile does transitions. http://jquerymobile.com/demos/1.0/docs/api/methods.html
$.mobile.changePage() with the “transition” property.
So its possible very cool I will need to learn xcode. Would you be able to build this? Do you do freelance work?
Before you do that I would take a look at the page transitions from sencha http://dev.sencha.com/deploy/touch/examples/kitchensink/ or jquery mobile. If they don’t meet your needs just post here and I will email you and we can discuss further.
Yes have been looking at both Sensha, Jquery Mobile for phonegap over the last 3months. Just not really happy with how the animation and feel works to me it really takes away from the app like experience. So they do not meet my needs. It would be nice if the plugin would allow switching between html pages. Beacuse we are using PHP server side $_SESSIONS it should just load the new HTML page via AJAX in the new controller window and have all the users relevant data for the controller view. We would need multiple controller views for the project.
I would love to know how run this XCode project. I’m currently using the NativeControls.js plugin, copied it in to the /PLUGINS directory – and still have no luck running it.
I have added the Key / Pair of “NativeControls” in the Plist and the.js to the /www directory. Everytime I start it – i get a warning about:
ERROR: Plugin ‘NativeControls’ not found, or is not a PGPlugin. Check your plugin mapping in PhoneGap.plist.
Any luck?
Are you trying to run my project or add the files to your own? If it’s mine it should just work. If its your own you need to have a PhoneGap project created and copy all the files in the plugins/NativeControls directory into your project. Then update the PhoneGap.plist and add the js to the www folder. You also need to include the appropriate scripts on your html files.
How to make auto-width plug-in nativetsontrols Navbar?
Now had to be done separately for ann iphone and ipad, I would be universal
I have checked in a version that changes the width of the NavBar and TabBar so it works on an ipad BUT it only handles portrait mode for now. I’ll work on the rotation when I have time at some point.
Now the whole width, but lost the title Navbar, and now both buttons on the left.
Tested for xcode 4.2 iphone sdk 4.0-4.3
Screenshot – http://imageshack.us/photo/my-images/854/ipadkp.png/
Looks fine when I run it. I tested on Xcode 4.2 with iOS 4.3 and 5.0.
Hi Hiedi,
Would you contact me via email to discuss building the plugin I am looking for?
Cheers,
Dan
Created a new project, it worked:)
Thank you!
I will wait for fix, change the orientation.
How do I specify the full path to the logo file in the navbar?
I placed the file in the folder Resources logo.png in the directory www.
None of these options work:
nativeControls.setNavBarLogo (‘logo.png’)
and
nativeControls.setNavBarLogo (‘file: / / logo.png’)
and
nativeControls.setNavBarLogo (‘file: / / www / logo.png’)
Where am I wrong?
Originally it is a url == “http://some.logo.somewhere/logo.png” BUT I just updated the plugin to handle files in the resource bundle and in the www folder. Update and enjoy.
Thank you very much!
It’s cool that you are so quickly react to the comments:)
It’s me again:)
I have two questions:
1. Committing “changing to a natvie NavigationBar” unmade? And I turned navbar, and Tabar not.
Screens – http://imageshack.us/g/339/screen1qed.png/
2. How do hideRightNavButton method? I need to sometimes hide the button.
The nativecontrols do not handle rotation right now. I do not have time to fix it at the moment. I did add methods for hide/show of the nav bar buttons. Upgrade and enjoy…
Nice 🙂
Nice thing. I’ve added custom background support for tabBar 🙂
So i forked ur repo and sent ya a pull request so everyone can use.
Maybe i’ll port that for navBar also.
hi.. Hiedi do you have any idea how to add audio record on iPhone using PhoneGap, I also gone through phonegap API but that solution is not working for me …can you please help ….
I haven’t tried it but see these docs – http://docs.phonegap.com/en/1.2.0/phonegap_media_media.md.html#Media if its not working for you then check the console for log messages.
Hi,
I’ve tested your project and it all works fine. When I create my own project and check if the nativecontrol is working, I can click on the button showTabBar but no tab bar shows up.
I added the plugin files to the project and also changed the PhoneGap.plist. I use phonegap 1.2.
Do you have more tips on this to get it work for me?
Make sure you add the nativecontrols.js to your page.
Heidi, could you detail a few of the gotcha configurations that would cause 1.1 to work in simulator 4.3 but fail in 5.0? Ive been digging around but can’t find the sweet spot.
There are many difference between 4.3 and 5.0. Can you be more specific as the error/issue that you are experiencing? Are there any messages in the console log?
Curious if you’ve experienced problems with Childbrowser and iOS5. I haven’t tried your HelloPhoneGap project, but I’ve done new installs of PG 1.1.0, 1.2.0, and 1.3.0 on iOS5, and created new projects each time (copying in my index.html, etc code). Whenever I add Childbrowser to these projects, inevitably I get the following error:
*** WebKit discarded an uncaught exception in the
webView:decidePolicyForNavigationAction:request:frame:decisionListener:
delegate: Application tried to present
modally an active controller .
Otherwise my app works fine. Phonegap fires, and my other functions (using jQTouch) and other plugins are ok.
I’ve posted the issue to Google Groups but haven’t heard from anyone there yet. Here’s the link with more details: http://groups.google.com/group/phonegap/browse_thread/thread/172745b8fc0eaace#
I’ve also posted to the phonegap-plugins Google Group. Any insights would be greatly appreciated!