PhoneGap Limitations of Requesting Remote Images

Every application that handles SMS messages via free public web gateways needs to be able to retrieve remote images while sending various cookie information in the request header. Also, the gateways often require the “image request” to be made from the exact same IP address as the first page loading request was made as well as the sending request will be. This is generally not much of a problem for mobile applications using the native API but in PhoneGap several limitations occur. I found out there are three possible solutions to this – here’s a list of them including advantages and disadvantages of each.


Snippets for PhoneGap Developers in the Thesis

Hi everyone,
I’ve been thinking about what the czSMS bachelor’s thesis should contain apart from the descriptions of application’s source code and I came up with an idea. It should definitely contain parts of the application that can be re-used in everyone else’s PhoneGap creations. Here’s a list of what the snippets will be (more snippets might appear in the future as well).

  • Application localization system for PhoneGap: It’s kind of weird that PhoneGap API does not support any methods and storage for localized strings. My snippet will allow developers to easily detect phone’s locale and load the corresponding set of strings from a separate file.
  • Menu creator for PhoneGap: If you want to add a context menu for your PhoneGap application now, you need to write your own sub-program for it. My snippet will allow you to easily add menus (for Android and BlackBerry platforms accessible by pressing the physical “Menu” button) as well as its items (containing text, images, and “onClick” action).

Stay tuned for new ideas, more snippets are coming very soon!

How the Program Manages Multiple SMS Gateways

Every program these days should avoid code duplication and use modular architecture. czSMS uses modular architecture fir its SMS gateways. All files that PhoneGap uses are located in the assets/www/ directory of Eclipse projects. Inside this directory there are three gateway-specific files:

  • gateway-voda.js: for Vodafone gateway
  • gateway-o2.js: for O2
  • gateway-tmo.js: for T-Mobile

Since PhoneGap doesn’t allow including source files based on some criteria, every file has its main function with a unique name that sets the values of the entire application’s global variables – these variables share their name across entire czSMS application. This attitude can in the future allow for the fact that SMS gateways can be developed and maintained by different authors than the application core itself, which is great for every open source project.