Showing posts with label phonegap. Show all posts
Showing posts with label phonegap. Show all posts

PhoneGap Build - Facebook Connect (Part 3)

PhoneGap Build - Facebook Connect (Part 3)

After helping many people with Part 2 there is the time to update the guide. If using PG > 2.9 you have to slightly change your config.xml for PhoneGap's build serviceThe correct syntax now is the following:

PhoneGap - Remote error logging (incl. uncaught script errors)

Catching and logging runtime errors, like script errors, in PhoneGap can be a challenge. There are several possibilities to write logs and to handle errors with different advantages and disadvantages.

First, local error logging means to create a functionality to send data to a place where someone cares about. Also this will spam the device with a text file or database, occupies memory and the question "when to send where?" has to be solved.

PhoneGap 2.5 - FileTransfer options filename issue

One short missing documentation hint concerning the filename. If using Camera.PictureSourceType.SAVEDPHOTOALBUM you have, at least on Android, to distinguish for FileUploadOptions. If using CAMERA as source type with Camera.DestinationType.FILE_URI the options.filename is not needed for transferring correctly. Check following code snippet:

PhoneGap build, hydration & require.js

Newer versions of PhoneGap support lazy loading of javascript, > 2.4 iOs is working as well. To load injected js files (like phonegap.js and plugins) from the build service with requirejs and hydration enabled, you'll have to include the /data/data/XXX/hydra_app/ directory in paths config (replace XXX with your widget id in config.xml) The starting slash will bypass the baseUrl parameter:

jQuery Mobile - Panel height with big content

To have a nice menu in my PhoneGap application, I decided to use jQuery Mobile 1.3 panels. Because of loading content dynamically, I had some problems with scrolling.

If my dynamically loaded content was higher than the menu, the panel scroll didn't fit. The scroll behavior is dependent on the page scroll (nicely described in jQuery Mobile's issue tracker: "Make panel and page content scroll independently"). But I have found a solution based on the panel events and css overflow & height properties, testet only on Android > 4 so far.

Phonegap - Real persistent storage module (incl jQuery deferred example)

There are several possibilities to store persistent data for a mobile app in Phonegap. But because you cannot be not sure that native HTML capabilities, e.g. localStorage is really stored permanently (see discussion on GoogleGroups), I decided to share my little RequireJS module prototype. It uses JSON and the mobile filesystem which enables also the possibility to use the data even after the app was completely deleted and reinstalled.

Howto: PhoneGap & Youtube (API)

Just a quick win... if your target is to show Youtube videos,  full screen, inside a PhoneGap mobile app... just use Youtube's HTML5 embedding possibilities in combination with PhoneGap's InAppBrowser:

PhoneGap Build - Facebook Connect (Part 2)

After several inquiries, in addition of the links provided in Part 1 here is some sample code for Facebook SSO in a PhoneGap environment (using build.phonegap.com and jQuery Mobile 1.3 for user interface). The connect worked for me currently only on Android devices, but no longer on iOs (using PG version 2.3.0). One obstacle is certainly that I have no Apple device for development, local builds or debugging, only Android.

PhoneGap Build API - Ant deploy helper script

After starting to develop a mobile app based on PhoneGap and its build service, I decided to automate the deployment via REST. Here is my little ant script. Feel free to adopt, extend, comment and / or share.

PhoneGap Build - Facebook Connect (Part 1)

I am currently developing a mobile app / client based on the frameworks; PhoneGap and jQueryMobile. My current implementation uses Cordova / PhoneGap  Version 2.2.0 and the build service provided by Adobe.

Because the app is connected to a social website, it uses the Facebook OAuth capabilities for easy single sign on (as on web version too). There came up several issues during integration of the Facebook Connect Plugin into my beta version. For saving the web from redundancy, I am documenting the issues here, by linking:

The story continues, for sample code checkout Part 2