Links

Showing posts with label PhoneGap. Show all posts
Showing posts with label PhoneGap. Show all posts

New features introduced in Apple App Store

  1. Related searches
  2. Tending Searches
  3. Editor choice badge in App details
  4. Preview movie for app
  5. App bundle where developers can bundle same kinda apps and can sale the bundle saperately
  6. New iTunes Connect dashboard
  7. iTunes Analytics for Purchased, Visited, Active Users.. More like Google Play Store
  8. Apple TestFlight integrated in the iTunes store for Beta Releases of the App
  9. Now we can distribute app up-to 1000 users for testing with the help of Apple TestFlight
  10. Apple TestFlight can also collect and manage the Crash Reports as well

Web-Services recapitulate

Now days most of the apps are using WebServices and the good thing is we all know what it is :)

Just adding some notes from my side on things like SOAP, REST and ......., and what? is there anything else do we have in the name of WebService.. really?

Few days ago, a guy who have experience of more then a decade came to me and told me to integrate WebService in an app. I simply asked for WebService summary which I think an usual question while we start working on something. He said to take the reference from an existing website which he pretended that using the same. First I did't get what he wanted to tell but, his steps just gave me heart attack. He just went to Chrome, opened the Website, right clicked for the Inspect element option and while logging in to that website he monitored the Network and said look here is the WebServices just replicate it in your app. After his statement I thought is it worth to ask something anymore?




Okey, letz do a quick recap on what we know:

  1. Charles, Yet simplest tool to monitor a WebService request from an iOS and Mac environment
  2. Each and every resource request to an URI is not a WebService.
  3. One is SOAP and the rest is REST, why do extensive debate
  4. SOAP is XML based definitive object access WebService protocol made for rich guys :)
  5. OAUTH is a two tear authorization framework, ie 

iOS + WS 
  1. Avoid using 3rd party wrappers like ASIHTTP for networking without exploring them
  2. NSURLRequest + NSURLConnection are not an evil
  3. Use event driven APIs
  4. Reachability is our friend
  5. Don't put sync requests on main thread
  6. Your app UI should reflect network reality 
  7. Be prepared for speed latency and packet loss
  8. Be prepared for no network and host not reachable conditions
  9. Always code for insecure connection, use end to end security 
  10. Minimize use of network connections, keep in mind that we also have push notifications 

PHP + WS
  1. Always think above $_POST, $_GET, $_REQUEST, $_FILE they are just to help you 
  2. Use and read headers generously
  3. php://input thats what you need 
  4. Don't forget your buddy "MIME types"
  5. Be prepared for Trojan and Injunction
  6. PHP is more related to network, explore its low level possibilities
  7. Take authorization and content distribution seriously

JS + WS
  1. Don't misuse client network and resources :|
  2. Just enjoy with JSON, sometime XML and leave it all for server side :)

Blackberry 10 (qnx) PhoneGap Plugins

We have two ways to create plugins for our BlackBerry PhoneGap apps ie; PG-BB Native Java and BB WebWorks

Simple JS minification tool


ONLINE TOOL URL
http://closure-compiler.appspot.com/home



SAMPLE CODE
// ==ClosureCompiler==
// @compilation_level SIMPLE_OPTIMIZATIONS
// @output_file_name default.js

// ==/ClosureCompiler==

// ADD YOUR CODE HERE
function hello(name) {
alert('Hello, ' + name);
}
hello('New user');



TO INCLUDE EXTERNAL FILE
add following code with the full path to the files

// @code_url https://dl.dropbox.com/u/37581115/.js
// @code_url https://dl.dropbox.com/u/37581115/.js


My PhoneGap app not working on ICS

I am working on an phonegap android app since last few months, after the launch of ICS i am shocked that phonegap functions are not supported on it. After some logs and alerts i have found that the code i am using to switch phonegap.js for iOS and Android is incorrect we need to replace it with simple call.

Sencha Touch

Sencha Touch is a full mobile JS library, along with widgets, animations and all sort of utilities for mobile html5 development.

Prepopulate SQLite DataBase in PhoneGap Application

This is an old post, please refer:
https://github.com/brodysoft/Cordova-SQLitePlugin - a Cordova/PhoneGap plugin to open and use sqlite databases on Android/iOS/WP(8) with HTML5 Web SQL API

It is really hard to wait for too much time when a phonegap application runs for first time and create all its database stuff, which gives a really bad impression to the user who just downloaded the app for its iPhone or Android device. I have a little approach to save the long time taken for database creation at very first run of the app, that is; we should copy a Pre-Populated Database file to the native location of device.

Cross site AJAX request

For cross site AJAX request we need following headers in host site:


Access-Control-Allow-Origin : http://example1.com, http://example2.com, ..
( it is necessary to mention requesting sites reference for localhost we can use http://127.0.0.1 and to grant access to all sites we can also use * )
 
Access-Control-Allow-Headers : Header1, Header2, ..
(we need to mention the permissions for headers send by other site)

Access-Control-Allow-Methods : POST, OPTIONS, ..(we also need to mention Request methods supported by our site for other sites GET is by default open)

SOAP

SOAP is a simple and extensible schema(or format) of XML information exchange over HTTP, it is used for communication between applications. SOAP stands for Simple Object Access Protocol.
A SOAP XML should have an Envelope (that is root element of a SOAP message), Header, Body and Fault element that identifies the document is SOAP message.

Introduction to PhoneGap

What is PhoneGap?
It is a bridge platform between browser of a device and native control of device, it is based on advantage that every mobile operating system provides a Web View interface for its application like UIVewView in iOS.

Ripple Emulator

About Ripple Emulator

A browser plugin emulator to test and debug your HTML5 mobile applications for smartphone like Android, iOS, Blackberry.

It also supports multiple platforms like WAC, PhoneGap, WebWorks, Mobile Web, Opera and Vodafone.

Some of device features are also supported by Ripple Emulator, we can test Orientation, Accelerometer, Network Settings and Geo Location, apart that we can get the status of Audio and Video playback.  
All from within your Google Chrome browser and in a fraction of the time.