Add social sharing icons to your app


I wanted to be able to share selected content in my app to several social media places, and not merely by copy/paste to an email client. Now my app can share contents of a <textarea> field to Facebook, Google+, Google Drive, Dropbox, a memo app, email, and so on. It was easier to do than I thought. Here is how I did it for Android.

This assumes you already have a Cordova project built and Android platform added. (Steps will be slightly different for iOS. I’ll add those steps to this page when I’m ready.)

Resource:
https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin

My current environment:
Mac OS X El Capitan 10.11.6
cordova -v: 6.3.1
cordova platform ?: android 5.1.1 Continue reading

Advertisements

Using PhoneGap 3.0 CLI on Mac OS X to Build iOS and Android Projects


At the time this was written PhoneGap Build does not support PG 3.0. These instructions assume Cordova PhoneGap is being used, not Build.

I highly recommend following the latest version of PhoneGap or Cordova. For instance, try these pages:

iOS: https://iphonedevlog.wordpress.com/2014/06/24/using-cordova-3-5-cli-on-mac-os-x-mavericks-to-build-ios-apps/

Android: https://iphonedevlog.wordpress.com/2014/06/20/using-cordova-3-5-cli-on-mac-os-x-mavericks-to-build-android-apps/

In this article, you will use CLI to build iOS and Android projects:

  • Install Cordova
  • Create a project with all necessary www folders and files
  • Add iOS and Android platform version folders and files
  • Build an Android debug apk for installation on a device for previewing
  • Build an Android project and view on a browser for previewing
  • Add the InAppBrowser and Splashscreen plugins
  • Update icons and splash screens for each platform
  • Update the config.xml, AndroidManifest.xml, and index.html files
  • Customize content for a particular platform
  • Finalize a product apk for Google Play upload, including keys and certificates

Continue reading

Installing ChildBrowser with Cordova/PhoneGap 1.7.0 (iOS, Mac OSX Lion)


In order to install the latest Cordova PhoneGap 1.7.0 version on my Mac Mini, I needed to upgrade to OSX Lion, then upgrade to Xcode 4.3.2 (both via the Mac App Store). After their installation, I downloaded PhoneGap 1.7.0 from the button at http://www.phonegap.com. Once it downloaded, I double-clicked on the Cordova-1.7.0.dmg file found in my new Downloads/phonegap-phonegap-475bfd2/lib/ios folder.

This is how I recreated my old PhoneGap 1.0.0 project to implement PhoneGap 1.7.0 and ChildBrowser.

NOTE: The ChildBrowser plugin was upgraded when PhoneGap went to Cordova. These notes will not work with Cordova versions of PhoneGap.  Continue reading

Book review: PhoneGap Beginner’s Guide, by Andrew Lunny


PhoneGap Beginner’s Guide, by Andrew Lunny

Packt Publishing, https://www.packtpub.com/

I’m reading the PDF version of this book, which displayed very nicely on Adobe Reader.

This book covers a lot of material (emphasis on “a lot”). This review will cover the breadth of this book’s content. It starts you at the beginning, with downloading PhoneGap and the Software Development Kits (SDKs) you’ll need to create and install applications for each of the mobile phone frameworks (Xcode for iPhone, Eclipse for Android, and Blackberry Webworks). We are introduced immediately to Git, ant, and Ruby, so we can start using them in our workflow.

Continue reading

Installing ChildBrowser into Xcode 4 with PhoneGap 1.0 (Mac OS X, Snow Leopard)


You’ll need the ChildBrowser plugin with PhoneGap in order to return to the app after clicking on an external link. A Done button will appear under the web page, allowing you to exit the web page and return to the app. Very convenient. I’ve had to search and experiment for two weeks before I could piece all the correct steps together. If you landed here early, you can do it all within an hour!

UPDATE 6/5/2012: For PhoneGap-Cordova 1.7.0, use these steps to install ChildBrowser:
https://iphonedevlog.wordpress.com/2012/06/05/installing-childbrowser-with-cordovaphonegap-1-7-0/

UPDATE 3/21/2012: For PhoneGap-Cordova 1.5, use these steps to install ChildBrowser: http://blog.digitalbackcountry.com/2012/03/installing-the-childbrowser-plugin-for-ios-with-phonegapcordova-1-5/

UP

Continue reading