Corona – Cross Platform Mobile Development Platform

0
Share it now!

Corona SDK – Cross Platform Mobile Development Platform

Corona is one of the solution for developing cross platform apps for building on IOS and Android.Corona is famous and easiest for building game apps but you can also create other.Corona SDK is associated with fantastic tools from Kwik, a Photoshop-based tool for creating beautiful eBooks, to Corona Project Manager, a time-saving IDE.
Corona SdK gives advantage of calling any native C-based or Java library in your arsenal.Take advantage of OpenGL, OpenAL, Box2D physics and third party services including Facebook Connect, Game Center, Google Maps.

Why Corona is a fast and easy development tool?

  • Corona-powered apps run at 30 fps in as little as 300k, and the graphics and animation engine fully leverages OpenGL hardware acceleration.
  • Creates products with high-performance multimedia, graphically rich applications and games for the iPhone and android.
  • With Corona, you can quickly create applications in a very short time.
  • No Objective-C/Cocoa required, and no C++.

What is different in Corona SDK?

  • Corona executable binaries are 100% Objective-C/C++ and it uses Xcode to complile.
  • Write one code and publish on android and iphone .
  • No need of running simulator everytime you just have to refresh the code after the changes are made and it reflects on simulator.
  • With Corona you can develop apps on Windows also but you need mac just to publish it.
  • It uses Lua programming language.

What are the limitations of Corona SDK?

  • It does not support maximum third party libs so you cannot monetize the apps with Admob nor you can develop custom UI controls.
  • It does not support local and push notifications.
  • Important features like playlist and photo access is not supported.

System Requirements:
Mac OS X:
Mac OS X 10.7 or later; 10.8 or later recommended (see notes below)
Intel-based Mac
Apple’s iOS SDK and Xcode to create iOS device builds

Windows:
Windows 8, Windows 7, Vista, or XP
1 GHz processor (recommended)
76 MB of disk space
1 GB of RAM (recommended)
OpenGL 1.3 or higher (available in most modern Windows systems)
Corona is available with inclusive editors like:

Free:
Eclipse, using the Lua Eclipse plugin.
LuaEdit, LuaEdit is an IDE/Debugger/Script Editor designed for the version 5.1 of Lua.
NotePad++, a free source code editor which supports several programming languages, including Lua.
TextWrangler, a powerful general purpose text editor and Unix and server administrator’s tool.
Commercial:
TextMate, Available for Mac OS X only.
BBedit, a leading professional HTML and text editor for the Macintosh.
Decoda, a professional development environment for debugging Lua scripts in your applications.

Application-level architecture:

1.Life Cycle:It consists of initial setup such as defining functions, registering for events, drawing images, etc. via the code in main.lua.
2.Global Runtime Object:This object’s principal job is to register events that have no specific target on screen such as enterFrame or system events. See
3.Sandbox:This means that your application has limited access to files, memory, network resources, etc. Practically speaking, your files — application images, data, preferences, etc. — are stored in a location that no other application can access. The paths to these files are unique to your application. Corona provides you with APIs to generate these paths.
4.Application Events:
Termination:When the user hits the device’s “home” button, the application quits. Registering the applicationExit event allows you to save any unsaved data, save the state of the application, or perform cleanup tasks such as deleting temporary files.
Interruptions:To handle events interruption like phone call,message you can listen to applicationSuspend and applicationResume events and handle them as needed.

Corona Project Configuration:
1.Basic Structure
2.Dynamic Scaling:
Since most apps are developed for multiple devices and screen resolutions, Corona features dynamic scaling. This allows you to use a common set of screen coordinates while Corona automatically scales text, vector objects, and images to different resolutions depending on the device.

3.Content Properties
4. Runtime Error:
In the Corona Simulator, there is a setting under Preferences called Show Runtime Errors which defaults to on. This global setting triggers pop-up error messages while running an app in the Simulator. If you don’t like this feature or if it doesn’t fit your workflow, you can turn it off.
5. Frame Rate(fps)
6.Dynamic image Selection
7.App licensing
8.Analytics(launchpad):
Corona SDK Analytics is a free service given to all Corona SDK developers. You can view data about your published apps, including the number of sessions, the number of unique users, and session lengths. Session data is displayed in graphs broken up by device type (iPhone, iPad, iPod touch, and Android) and for device types combined.

9.Anti-Aliasing
Anti-aliasing caused incorrect rendering issues on certain vector objects. Thus, the antialias key     within the content table should be removed.

Corona Cloud:
Corona cloud is a cross-platform social gaming network that brings multiplayer support, leaderboards and achievements, chat and push notifications to a mobile gaming app through a single RESTful API.

Corona SDK Architecture

Features that developers can integrate into their mobile apps:

  • Multiplayer support used to help strengthen user engagement and retention
  • Leader-boards and achievements are those customized data sets that can be used to help make games a bit more competitive
  • Chat functionality is a great option to get people talking to the manufacturers or other players in real-time
  • Push notifications allows users to engage, communicate, and retrain users
  • Analytics, social integration, cloud sync
Be a fan

Icenium – Cross Platform Mobile Development Tool

0
Share it now!

Icenium – Cross Platform Mobile Development Tool

Icenium is a cross platform mobile development tool with Integrated Cloud Environment (ICE) that eliminates the complexity associated with cross-platform mobile development. With icenium we learn how to create hybrid mobile apps by developing a single code project to publishing it as separate apps to Google Play or Apple App Store – Icenium facilitates the entire app development process.Icenium is developed by Telerik.

Advantage of Icenium:

1:For all the other mobile development tools like Microsoft Visual Studio, Eclipse and NetBeans IDE i.e. integrated development environments (IDE) serves as a basic but Icenium brings all mobile development to the cloud  turning SDKs, compilers, testing, debugging, digital certification into cloud services so that developers can build apps on any device and in any development environment — untethered to a physical place or specific platform.

2:Icenium enables you to use your skills in HTML, CSS and JavaScript to develop.It also includes built in support for jQuery Mobile as well as Kendo UI Telerik’s own JavaScript widget library.
3:Apache Cordova is used to build application and to leverage device APIs, including those for camera, accelerometer, geolocation, etc. Developers also have access to GitHub and other URL-based Git repositories were they can find sample code and example of Icenium built applications. Integrated Cloud Environment  version  allows code to be stored and versioned in the cloud, making it accessible anywhere, anytime.
4:Icenium provides graphical view to the  i.e integrated simulation environment for seeing how an app looks on a device without having to deploy it. Icenium LiveSync, helps to see the changes made in real-time in the integrated device simulator and across all connected devices without having to recompile for every change on each device like all others will require.

Fig1

Versions of the development environment:
1.Icenium Graphite:
Windows-based
development environment

It provides a modern code-editing environment with statement completion, refactoring, code navigation and version control, making application development faster and easier. Integrated real-time code analysis detects potential errors in developers’ code as they type enabling them to identify problems early on and get more done quickly.

Graphite capabilities, like:
Real-time code analysis
Error detection
Code navigation
Refactoring
Version control
Integrated device simulation
Kendo UI Mobile & jQuery templates
Icenium LiveSync

Supported operating system:
Windows 8
Windows 7
Windows Vista SP1 or later
Windows XP SP3

Minimum requirments:
Always run a single instance of Graphite. If you attempt to run multiple instances of Graphite, you might experience issues with the consumption of hardware resources.

CPU:dual-core 1.8GHz
Memory: 1GB RAM
Free disk space: 100 MB
Internet connection bandwidth: 1 Mbps
Software Required:Microsoft .NET Framework 4 Client Profile

fig:2

2. Icenium Mist:
HTML 5 based environment that runs in browse
Icenium Mist is a browser-based development environment that enables you to develop your app from almost anywhere using only a web browser.Mist delivers a lightweight editing experience featuring many of the capabilities found in Icenium Graphite, making it indispensable in situations where you are not close to your desk. powerful features:

  • Integrated device simulation
  • App publishing wizard
  • Version control
  • Code navigation
  • Kendo UI Mobile & jQuery templates

*** Real-time error detection,Icenium LiveSync,Debug on device is not available with Icenium Mist.

Supported operating system:
Full support (Code Editor, Simulator, and Debugger): Google Chrome on Windows
Mac OS X,
Safari on Mac OS X
Limited support (Code Editor only): Mozilla Firefox on Windows and Mac OS X, Internet Explorer on Windows

fig:3

3.Icenium Ion:
Icenium Ion makes deploying and testing your apps on any iOS device a snap, by eliminating the need to provision them. Simply install Ion (available in the AppStore), scan the QR code and when you run a project,in seconds the app is installed and running inside Ion with on demand Livesync.

4.Icenium Everlive:
Icenium Everlive preview enables developers to build and manage mobile apps in significantly faster, easier and more scalable way. Everlive services speed up development time by providing your app with data and files storage, user management, cloud code execution and email notifications. Everlive backend services work seamlessly with Icenium allowing you to integrate them in your app today.

features:

  • Data in the Cloud
  • Code in the Cloud
  • Users in the Cloud
  • Easy to use Portal

Benefits:

  • Easy and secure development
  • Faster and more scalable apps
  • Simple Pricing

Simulators and Devices:

(fig 4)

Icenium Ion App for the iPhone
(fig 5)

FOLDER STRUCTURE:
(fig 6)

Simulators and Devices:
Icenium Ion App for the iPhone

FOLDER STRUCTURE:

Be a fan

Xamarin Mono Touch Cross Platform Mobile Development Platform

0
Share it now!

Xamarin Mono Touch Cross Platform Mobile Development Platform

Monotouch is a free and open source project led by XAMARIN to create an ECMA standard compliant .NET Framework compatible set of tools including among others, a C# compiler and a Common Language Runtime. The stated purpose of MONO is not only to be able to run Microsoft .NET applications cross platform but also to bring better development tools to linux developers.

Mono can be run on away software systems including android ( and also other LINUX distributions). BSD, OSX, Windows, Solaris and some for game consoles such as PlayStation 3, Wii and Xbox360 .

FRAME WORK ARCHITECTURE

The major components of Mono include:

  • Code Execution Engine
  • Class Libraries
    • Base Class Library
    • .NET Compatibility Class Libraries
    • Mono specific class libraries:
    • Cross platform class libraries for both Mono and .NET (Gtk#, Mono.Cecil, Mono.CSharp, Text.Templating)
    • Unix-specific class libraries (POSIX, Filessystem in Userspace (FUSE), curses)
    • Platform-specific class libraries (bindings for: Mac, iOS, Android, MeeGo)
      • CLI Assemblies
      • CLI Metadata
  • Mono’s Common Language Runtime
  • Compatible with the ECMA Common Language Infrastructure /.NET Common Language Runtime
  • Mono-specific enhancements:
  • Mono.SIMD support
  • Mono co-routines and continuations.
    • Mono-specific enhancements
    • Native Interop services and COM interop
    • Security – Transparent Code Framework

GETTING STARTED

Here is the First program to print HELLO IPHONE in Monotouch.

Once you’ve run through the Xamarin.iOS Installation, you’re ready to create your first iOS application. This article is the third in a series of Getting Started tutorials and walks through creating a basic Xamarin.iOS application for iPhone. Along the way, we’ll take a look at the Xamarin.iOS IDE of choice, Xamarin Studio, then cover creating user interfaces with Xcode 4 and Interface Builder (IB). We’ll look at connecting the work that we did in Interface Builder and making it available to your code in Xamarin.iOS. Next, we’ll briefly go over how to use Xamarin.iOS with Visual Studio, and cover some key differences between these two environments. Finally, you’ll deploy your application and test it. This article is aimed at developers who are familiar with C# and .NET, but who have never before built a Xamarin.iOS application.

1. Overview

Using Xamarin.iOS, you can create native iOS applications by using the same UI controls that you would if you were writing the application in Objective-c and X-code, except you have the flexibility and elegance of a modern language (C#), the power of the .NET Base Class Library (BCL), and a first-class IDE (Xamarin Studio) at your fingertips.

Additionally, Xamarin.iOS integrates directly with Xcode so that you can use the integrated Interface Builder (IB) to create your application’s user interface.

Note: Xamarin.iOS for Visual Studio does not currently support Interface Builder integration. If you are developing for iOS in Visual Studio, you will need to switch over to your Mac to use Interface Builder.

In this tutorial, we’re going to walk through creating a simple application from start to finish. We’ll cover the following items:

  • ·Xamarin Studio (formerly MonoDevelop) – Introduction to the Xamarin IDE (Xamarin Studio) and how to create Xamarin.iOS applications with it.
  • ·Anatomy of a Xamarin.iOS Application – What a Xamarin.iOS application consists of.
  • ·Xcode’s Interface Builder (Xamarin Studio only) – How to use Xcode’s Interface Builder to define your application’s user interface (UI).
  • ·Outlets and Actions (Xamarin Studio only) – How to use Outlets and Actions to wire up controls in the UI.
  • ·Visual Studio – Things to keep in mind when developing for iOS in Visual Studio (see the full tutorial here).
  • ·Deployment – How to deploy your application to the iOS device simulator, as well as to a real device like an iPhone.

The following is a screenshot of the application that we’re going to build, running in the iOS simulator:

2. Requirements

You’ll need to have the latest iOS SDK with Xcode 4 or higher installed, as well as the Mono Runtime, and Xamarin.iOS.

In order to get the iOS SDK, you need to be a member of Apple’s iOS Developer Program.

Because you’ll need the iOS SDK, you’ll also need an Apple Mac computer running OS X Lion or higher.

.

3. Introduction to Xamarin Studio

Nearly all Xamarin.iOS tutorials are based on using Xamarin Studio as the Integrated Development Environment (IDE) of choice. Recently, Xamarin also provided support for Xamarin.iOS development in Visual Studio with the release of Xamarin.iOS for Visual Studio. It’s possible to develop for Xamarin.iOS without using Xamarin Studio or Visual Studio, but both are integrated with Xamarin.iOS in sophisticated ways that make development tremendously easier.

Xamarin Studio is a free, open-source IDE, and is very similar to other IDEs such as Eclipse or Visual Studio. This section will focus on iOS development in Xamarin Studio. You can find information on Visual Studio development in a later section.

Let’s begin by launching your IDE of choice. You can find it in either your Applications directory, or via a Spotlight search for “Xamarin Studio.”

Xamarin Studio should open up and look something like the following:

3.1. Creating a new Xamarin.iOS iPhone Project

From the home screen of your IDE, start a new solution:

In Xamarin Studio, choose C# > iOS > iPhone in the left-hand pane, and then, in the center pane, selectSingle View Application template from the center pane. This will create a new Xamarin.iOS iPhone application that has a single screen.

Let’s name it HelloWorld_iPhone. Choose a location where you’d like the solution to reside, and click OK.

Xamarin Studio will create a new Xamarin.iOS application and solution that looks something like the following:

This should be pretty familiar territory if you’ve used an IDE before. There is a Solution Explorer “pad” that shows all the files in the solution, and a code editor pad that allows you to view and edit the selected file.

Xamarin Studio uses Solutions and Projects, the exact same way that Visual Studio does. A solution is a container that can hold one or more projects; projects can include applications, supporting libraries, test applications, etc. In this case, Xamarin Studio has created both a solution and an application project for you. If you wanted to, you could create code library projects that the application project uses, just as you would if you were building a standard .NET application.

3.2. The Project

The files in the project:

  • ·Main.cs – This contains the main entry point of the application.
  • ·AppDelegate.cs – This file contains the main application class that is responsible for listening to events from the operating system.
  • ·HelloWorld_iPhoneViewController.cs – This contains the class that controls the life cycle of our main screen.
  • ·HelloWorld_iPhoneViewController.designer.cs – This file contains plumbing code that helps you integrate with the main screen’s user interface.
  • ·HelloWorld_iPhoneViewController.xib – This is the UI for the main screen. Xib files (also referred to as Nibs for legacy reasons) are XML files that define views.
  • ·Info.plist – This file contains application properties such as the application name, icons, etc.

Let’s take a quick look through some of these files. We’ll explore them in more detail later, and in other tutorials, but it’s a good idea to understand their basics now.

3.2.1. Main.cs

The Main.cs file is very simple. It contains a static Main method which creates a new Xamarin.iOS application instance and passes the name of the class that will handle OS events, which in our case is the AppDelegate class:

using System;

using System.Collections.Generic;

using System.Linq;

using MonoTouch.Foundation;

using MonoTouch.UIKit;

namespace HelloWorld_iPhone

{

public class Application

{

static void Main (string[] args)

{

UIApplication.Main (args, null, “AppDelegate”);

}

}

}

3.2.2. AppDelegate.cs

The AppDelegate.cs file contains our AppDelegate class, which is responsible for creating our window and listening to OS events:

using System;

using System.Collections.Generic;

using System.Linq;

using MonoTouch.Foundation;

using MonoTouch.UIKit;

namespace HelloWorld_iPhone

{

[Register ("AppDelegate")]

public partial class AppDelegate : UIApplicationDelegate

{

UIWindow window;

HelloWorld_iPhoneViewController viewController;

// This method is invoked when the application has loaded

// its UI and is ready to run

public override bool FinishedLaunching (UIApplication app, NSDictionary options)

{

window = new UIWindow (UIScreen.MainScreen.Bounds);

viewController = new HelloWorld_iPhoneViewController

(“HelloWorld_iPhoneViewController”, null);

window.RootViewController = viewController;

window.MakeKeyAndVisible ();

return true;

}

}

}

First, let’s take a look at the two class-level variable declarations:

UIWindow window;

HelloWorld_iPhoneViewController viewController;

The UIWindow declaration represents the actual application window. The second declaration is of type HelloWorld_iPhoneViewController, which is responsible for displaying a view in our window. In iOS applications, you only ever have one window, but you can have many screens. Each screen is actually a view, and it has a view controller that is responsible for the view’s life cycle, such as showing the view.

This pattern is known as the Model View Controller (MVC) pattern. We’ll examine this in more depth in the next tutorial, when we create an application with multiple screens.

Next, we have the FinishedLaunching method. This method runs after the application has been instantiated, and it’s responsible for actually creating the application window and beginning the process of displaying the view in it. It’s important to note that this method has 10 seconds to return; otherwise iOS will terminate the application. Therefore, you should keep this method as simple and spare as possible.

The first line of this method actually creates the window at the exact size of the screen:

window = new UIWindow (UIScreen.MainScreen.Bounds);

Next, the code creates a new view controller, and tells the window that it’s the top most (root) view controller (and it is therefore the main screen):

viewController = new HelloWorld_iPhoneViewController(“HelloWorld_iPhoneViewController”, null);

window.RootViewController = viewController;

window.MakeKeyAndVisible ();

return true;

The MakeKey portion of this method is inherited from the OS X programming model in which you need to tell the OS which window should have focus in a multiple window environment.

3.2.3. HelloWorld_iPhoneViewController.cs

As we’ve already seen, the HelloWorld_iPhoneViewController class is our main view controller. That means it’s responsible for the life cycle of the main view (screen). We’re going to examine this in detail later, so we can skip any more detail about it for now, other than to point out that it has several view life cycle events that are important, including ViewDidLoad, ViewDidUnload, and others:

using MonoTouch.UIKit;

using System.Drawing;

using System;

using MonoTouch.Foundation;

namespace HelloWorld_iPhone

{

public partial class HelloWorld_iPhoneViewController : UIViewController

{

public HelloWorld_iPhoneViewController (string nibName, NSBundle bundle)

: base (nibName, bundle)

{

}

public override void DidReceiveMemoryWarning ()

{

// Releases the view if it doesn’t have a superview.

base.DidReceiveMemoryWarning ();

// Release any cached data, images, etc that aren’t

// in use.

}

public override void ViewDidLoad ()

{

base.ViewDidLoad ();

//any additional setup after loading the view,

//typically from a nib.

}

// ViewDidUnload and ShouldAutorotateToInterfaceOrientation are deprecated in iOS 6.

// The code below is no longer necessary and can be removed.

// A future version of Xamarin Studio will remove them from the template.

/*public override void ViewDidUnload ()

{

base.ViewDidUnload ();

// Release any retained subviews of the main view.

// e.g. this.myOutlet = null;

}

public override bool ShouldAutorotateToInterfaceOrientation

(UIInterfaceOrientation toInterfaceOrientation)

{

// Return true for supported orientations

return (toInterfaceOrientation != UIInterfaceOrientation.PortraitUpsideDown);

}*/

}

}

3.2.4. HelloWorld_iPhoneViewController.Designer.cs

The designer file for our HelloWorld_iPhoneViewController class is empty right now, but it will be automatically populated by Xamarin Studio as we create our UI:

// This file has been generated automatically by Xamarin Studio to store outlets and

// actions made in the Xcode designer. If it is removed, they will be lost.

// Manual changes to this file may not be handled correctly.

using MonoTouch.Foundation;

namespace HelloWorld_iPhone

{

[Register ("HelloWorld_iPhoneViewController")]

partial class HelloWorld_iPhoneViewController

{

}

}

Now that we have created our Xamarin.iOS application and we have a basic understanding of its components.

4. Introduction to Xcode 4 and Interface Developer

As part of Xcode, Apple has created a tool called Interface Builder (IB), which allows you to create your UI visually in a designer. Xamarin.iOS integrates fluently with IB, allowing you to create your UI with the same tools that Objective-C users do.

It’s important to note that you don’t have to use IB to create your UI; you can also build it programmatically, which we’ll explore in a later tutorial.

Let’s go ahead and walk through how to use IB to define our UI. Double-click on the HelloWorld_iPhoneViewController.xib file in Xamarin Studio. This should launch Xcode and look something like the following:

If Xcode doesn’t open up, you can right-click on the file and choose Open With : Xcode.

4.1. Components of Xcode

When you open a Xib in Xcode from Xamarin Studio, Xcode opens with the Navigator Area on the left and theEditor Area on the right:

When a .xib file is open, the Editor Area is actually IB.

In previous versions of Xcode, IB was a separate application. Apple is still working out some of the integration issues with this new combined version.

Right now, IB isn’t terribly useful until we show the Utilities Area. To display the Utilities Area, click the far-right button in the View section of the toolbar:

The Utilities Area should now display, exposing tools that will help us create our UI:

The Utility Area is mostly empty because nothing is selected; however, if you select a control (or the main view), it will populate. The Utility Area is further broken down into two sub-areas, Inspector Tabs and Library Tabs:

In the Library Tabs Area, you can find controls and objects to place into the designer. The Inspector Tabs are kind of like property pages, where you can examine and edit control instances in the designer.

There are 6 different Inspector Tabs, as shown in the following illustration:

From left-to-right, these tabs are:

  • ·File Inspector – New in Interface Builder 4, the File Inspector shows file information, such as the file name and location of the Xib file that is being edited.
  • ·Quick Help – Also new in Interface Builder 4, the Quick Help tab is part of Xcode 4’s redesigned help system. It provides contextual help based on what is selected in Xcode.
  • ·Identity Inspector – The Identity Inspector provides information about the selected control/view.
  • ·Attributes Inspector – The Attributes Inspector allows you to customize various attributes of the selected control/view.
  • ·Size Inspector – The Size Inspector allows you to control the size and resizing behavior of the selected control/view.
  • ·Connections Inspector – The Connections Inspector shows the Outlet and Action connections of the selected controls. We’ll examine Outlets and Actions in just a moment.

4.2. Creating the Interface

To create this UI:

  1. Drag three buttons and a label to the designer from the third tab of the Library.
  2. To resize the controls, select them and then pull on their resize handles.
  3. Double-click on the buttons to set their title text.
  4. Make the label nearly as wide as the view. This will let us update the label with text when the buttons are clicked.

As you’re resizing and moving controls around, you’ll notice that IB gives you helpful snap hints that are based onApple’s Human Interface Guidelines (HIG). These guidelines will help you create high quality applications that will have a familiar look and feel for iOS users.

While we have IB open, let’s look at one other useful area, the Document Inspector. The Document Inspector is on the left and can be expanded by clicking the > arrow button at the bottom of the area:

The Document Inspector shows you all of the items in a tree and allows you to select from them:

If you have a complicated UI, this can be a great alternative to using the designer window.

4.3. Adding Outlets and Actions to the UI

Xamarin Studio created a file called HelloWorld_iPhoneViewController.h as part of the Xcode project it generated to use the designer. This .h file is a stub file that Xamarin Studio created to mirror the Designer.cs file. This is where we’ll use Xcode to define our Outlets and Actions. Xamarin Studio will then synchronize the changes to this file with the designer file.

4.3.1. Outlets + Actions Defined

So what are Outlets and Actions? In traditional .NET UI programming, a control in the UI is automatically exposed as a property when it’s added. Things work differently in iOS (and in OS X programming, for that matter). Simply adding a control to a view doesn’t make it accessible to code. In order to access our controls from code, Apple gives us two options:

  • ·Outlets – Outlets are analogous to properties. If you wire up a control to an Outlet, it’s exposed to your code via a property, so you can do things like attach event handlers, call methods on it, etc.
  • ·Actions – Actions are analogous to the command pattern in WPF. For example, when an Action is performed on a control, say a button click, the control will automatically call a method in your code. Actions are powerful and convenient because you can wire up many controls to the same Action.

In Xcode 4, Apple has added a new way to create Outlets and Actions directly in code via Control-dragging. More specifically, this means that in order to create an Outlet or Action, you choose which control element you’d like to add an Outlet or Action, hold down the Control button on the keyboard, and drag that control directly into your code.

For Xamarin.iOS developers, this means that you drag into the Objective-C stub files that correspond to the C# file where you want to create the Outlet or Action.

In order to facilitate this, Xcode 4 introduced a split-view in the Editor Area called the Assistant Editor that allows two files to be visible at once (the .xib file in the Interface Builder designer, and the code file in the code editor).

In order to view the Assistant Editor split screen, click the middle button of the Editor choice buttons in the toolbar:

Xcode will then show the designer and .h at once:

Now we can start wiring up our Outlets and Actions.

4.3.2. Adding an Outlet

In order to create the Outlet, use the following procedure:

  1. Determine for which control you want an Outlet.
  2. Hold down the Control key on the keyboard, and then drag from the control to an empty space in your code file after the @interface definition.

You can drag from the Document Inspector as well, which can be helpful if you have a complicated UI with nested controls.

A popover will then show, giving you the option to choose either Outlet or Action. Choose Outlet and name it btnClickMe:

Click Connect after you’ve filled out the form, and Xcode will insert the appropriate code in the .h file:

Save the file, and then go back to Xamarin Studio. If you open the .designer.cs file that corresponds to the .h file that was just modified in Xcode, you’ll see your new Outlet exposed as a property:

As you can see, Xamarin Studio listens for changes to the .h file, and then automatically synchronizes those changes in the respective Designer.cs file to expose them to your application.

We need to create one more Outlet for our label, so switch back over to Xcode. Create the label’s Outlet the same way you did the button’s Outlet and name it lblOutput. The .h file should have the following Outlets now defined:

@property (nonatomic, retain) IBOutlet UIButton *btnClickMe;

@property (nonatomic, retain) IBOutlet UILabel *lblOutput;

We’re going to use these in our Xamarin.iOS application in just a bit, but while we’re in Xcode, let’s wire up the two Action buttons to an Action.

4.3.3. Adding an Action

Creating an Action is done the same way as creating an Outlet. Control-drag from the control into the code, as you did before:

This time, though, choose Action as the Connection type in the popover menu:

Name the Action and select on which event you’d like the Action to be called. In this case, we’re going to use Touch Up Inside.

We use the TouchUpInside event because it doesn’t get fired until the user releases the button with their finger. This allows the user to cancel an accidental touch by sliding their finger off the button before releasing it. At first it may seem more logical to use TouchDownInside; however, this will raise the event as soon as a button is touched, and doesn’t allow for cancellation.

You can also strongly-type the type controls that can call this Action by changing the Type from id to a particular control type. If you don’t strongly type it, you’ll have to cast the sender object to its appropriate type when you want to use it, as we’ll see in a moment. If you do strongly type this control, then only that one type of control can call this Action.

You may want to wire up multiple items to the same action (which is the entire point of using an Action, as opposed to an Outlet). In our UI, we have two Action buttons so that we can illustrate this at work.

To wire up a control to an existing Action, instead of Control-dragging to a blank space in the code, you Control-drag to an existing Action declaration in code:

In this case, we Control-Dragged from the Connections Inspector, which allowed us to select the event on which we wanted to call the Action, but we could have just as easily Control-dragged from the control in the designer or in the Document Inspector.

Once your Actions and Outlets are wired up, the final declarations in the .h file should be:

@property (nonatomic, retain) IBOutlet UIButton *btnClickMe;

@property (nonatomic, retain) IBOutlet UILabel *lblOutput;

- (IBAction)actnButtonClick:(id)sender;

Now that we have them wired up, let’s save the files and switch back to Xamarin Studio to actually do something interesting with them.

Note: It probably took a long time to create the UI, Outlets, and Actions for our first application, and it may seem like a lot of work, but we’ve introduced a lot of new concepts and we’ve spent a lot of time covering new ground. Once you’ve practiced awhile working with IB, this interface and all its Outlets and Actions can be created in just a couple of minutes.

5. Writing the Code

OK, now that we’re back in Xamarin Studio and our UI is all created, let’s take a quick look at our Designer.cs file:

using MonoTouch.Foundation;

namespace HelloWorld_iPhone

{

[Register ("HelloWorld_iPhoneViewController")]

partial class HelloWorld_iPhoneViewController

{

[Outlet]

MonoTouch.UIKit.UIButton btnClickMe { get; set; }

[Outlet]

MonoTouch.UIKit.UILabel lblOutput { get; set; }

[Action ("actnButtonClick:")]

partial void actnButtonClick (MonoTouch.Foundation.NSObject sender);

}

}

As you can see, both our Outlets and our Action (called by two different controls) have been synchronized. Let’s write some code that uses our Outlets.

5.1. Wiring the Outlets

In our application, every time the first button is clicked, we’re going to update our label to show how many times the button has been clicked. In order to accomplish this, we need to do two things. First, we need to create a class-level variable in our HelloWorld_iPhoneViewController class to track the number of clicks that have happened:

public partial class HelloWorld_iPhoneViewController : UIViewController

{

protected int _numberOfTimesClicked = 0;

â¦

}

Next, in our ViewDidLoad event, we’re going to wire up the btnClickMe control’s TouchUpInside event to update our label:

public override void ViewDidLoad ()

{

base.ViewDidLoad ();

//any additional setup after loading the view, typically from a nib.

//—- wire up our click me button

this.btnClickMe.TouchUpInside += (sender, e) => {

this._numberOfTimesClicked++;

this.lblOutput.Text = “Clicked [" +

this._numberOfTimesClicked.ToString() + "] times!”;

};

}

Here we increment our click count, and then set the Text property of the lblOutput control to be some text that specifies the number of clicks.

This is possible because both our btnClickMe button and our lblOutput label are exposed via Outlets and so we can access them as we would a normal control that is exposed as a property.

Next, let’s configure our Action.

5.2. Wiring the Action

Our Action is actually already wired up as an empty partial method in the designer class. We simply need to add implementation to it.

If you type “partial” in the controller class, Xamarin Studio will help us out with auto-complete and will fill out the entire method signature. In the method, we’re going to update the label to show the title of the button that was clicked that called the Action:

/// <summary>

/// This is our common action handler. Two buttons call this via an action method.

/// </summary>

partial void actnButtonClick (MonoTouch.Foundation.NSObject sender)

{

this.lblOutput.Text = “Action button ” +  ((UIButton)sender).CurrentTitle + ” clicked.”;

}

That’s it! We’ve created our first Xamarin.iOS application, so now it’s time to run it and test it!

6. Using Visual Studio for Xamarin.iOS Development

Open up Visual Studio. It should looks like this (we are using Visual Studio 2012 here):

To create a new project, go to File > New. Then, under Templates, select Visual C# > iOS > iPhone, and then choose HelloWorld Application. Name it Hello,_iPhone.

It should look something like this:

You should be able to continue to testing, deploying and debugging your Hello World application in Visual Studio!

7. Testing the Application (in Xamarin Studio and Visual Studio)

It’s time to build and run our application; to see it in action and make sure it runs as expected. We can build and run all in one step, or we can build it without running it.

Let’s build it first, just to learn how to build without deploying. Whenever you build the application, you build for a particular target, such as the Device Simulator, or the Actual Device. So the first thing we’re going to do is make sure that we’re targeting the simulator. In the build toolbar, make sure that <span class=”UIItem”>Debug|iPhoneSimulator</span> is selected:

Then, either press â+B, or, from the Build menu, choose Build All. If there are no errors, you’ll see a Build Succeeded message in the status bar. If there are errors, review your procedure and make sure that you’ve followed the steps correctly. Start by confirming that your code (both in Xcode and in Xamarin Studio, or just Visual Studio) matches the code in the tutorial.

7.1. Deploying to the Device Simulator

To run the application in the Device Simulator, you have three options:

  • ·Press ⌘+Enter (F5 in Visual Studio)
  • ·From the Run menu, choose Debug (Debug – Start Debugging in Visual Studio)
  • ·Click the Play/Start button in the toolbar.

The simulator should launch and the application will run and if you click the first button a few times, you should see something like following:

Clicking one of the Action buttons should give you something similar to the following:

Congrats, you’ve now built and run your very first Xamarin.iOS application for the iPhone!

7.1.1. Choosing Which Device to Simulate

By default, the Device Simulator will simulate the standard resolution iPhone (iPhone 3GS and older). However, you can also simulate an iPhone with the Retina Display (iPhone 4+), as well as the iPad.

To change your simulator target, choose one of the following from the Project : iPhone Simulator Target menu:

  • ·Default – Default launches the iPhone simulator with the regular resolution (320×480) display. This resolution matches the iPhone 3GS and older phones.
  • ·iPhone Simulator – Use this setting if you want to run the application using the iPhone simulator with the Retina Display resolution (640×960). Note: if you want to use the Retina Display iPhone Simulator, in addition to setting this target, you must first launch the simulator and then change it to the Retina Display by selectingHardware > Device > iPhone (Retina) in the menu. This is, unfortunately, the way Apple designed it, and this same behavior exists even if you’re using Xcode and writing in Objective-C.
  • ·iPad Simulator – This setting will launch the iPhone simulator at the iPad resolution (1024×768).

7.2. Deploying to the Device

Deploying and testing your application in the Device Simulator is great, but the simulator is just that, a simulator. As such, it doesn’t always behave the same way an actual device does. Because of this, it’s critical to test your application on a real device early and often.

In order to be able to deploy to a device, you need a properly provisioned device and a non-evaluation version of Xamarin.iOS (the evaluation version only allows deploying to the simulator). Follow the instructions in the Mac OS X Developer Library to make sure your device is provisioned correctly.

Once your device is provisioned, deploying to the device is as simple as deploying to the simulator. Make sure your device is plugged in, and then change the build target in the build toolbar to either Debug|iPhone or Release|iPhone and deploy via run, as you did before for the simulator.

7.3. Debugging

Xamarin.iOS has sophisticated debugging capabilities in both the simulator and the device. For more information, check out the Debugging Tutorial.

8. Application Name, Icons and Startup Image

iOS applications use a special XML file called a Property List (.plist) file, named Info.plist (and found in the root of the project), that contains settings and descriptions about the application.

8.1. Editing the Info.plist File

You can edit this file in several different ways. Because it’s just an XML file, it can be edited by hand in a text editor, but the easiest way to edit it is to use the .plist editor that is built into Xamarin Studio. This editor can either be invoked directly by double-clicking on the Info.plist file itself, or by double-clicking on the project and choosing iPhone Application:

Whether you access the .plist editor directly or via the Project Options dialog, it looks the same.

8.2. Application Name Setting

The first setting in the editor file is the Application Name. Let’s set it to Hello, iPhone, and run our application. Now, when we click on the Home button, we see our properly named application:

Now let’s take a look at setting the application icons.

8.3. Icons

Application icons are also specified in the Info.plist file and can be configured in the same dialog in which we configured our application name:

If you hover over each of the icon blocks, a tooltip will show you what size is needed for each icon. You can also refer to the following table:

Icon Use Size (in pixels)
Application Icon Standard: 57×57

Retina Display: 114×114

Spotlight and Settings Standard: 29×29

Retina Display: 58×58

iTunes Image 1024×1024

To configure an icon, click on one of the icon blocks and browse to the icon location. After you’ve chosen your icons, they should show up in the editor:

We can do the same thing in Visual Studio:

We don’t have to worry about applying the glassy effect or rounding the corners of our icons, iOS does that for us.

When we run our application now, we will see our custom icons show up:

For more information about creating icons, see Apple’s documentation at Custom Icon and Image Creation Guidelines.

8.4. Startup Image

You can provide a splash screen image that iOS will display while your application is launching by adding that screen image file to the root of the project. The following table describes the size and name parameters of the file for regular iPhones (3Gs and older) and for iPhones with the Retina Display (4G and newer):

Device Size (in pixels) File Name
iPhone 320×480 Default.png
iPhone w/Retina Display 640×960 Default @2x.png
iPhone 5 640×1136 Default-568h@2x.png

The “@2x” suffix specifies that the image is twice the resolution density and iOS will automatically load images with the @2x suffix on Retina Display devices when an image without that suffix is specified.

Note that the device has a case-sensitive file system, but the iOS simulator by default does not (unless you’ve formatted your hard drive as case-sensitive). This means that if the file case is incorrect (note the leading capital), the image will work correctly on the simulator, but not on the device.

To specify a loading screen image, simply add the files to the Resources folder by right-clicking on the project and choosing <span class= “UIItem”>Add : Add Files</span>. When you’re done, they should show up in the Solution Navigator:

Now, when you launch the application, your loading screen will be displayed as the application is loading:

Be a fan

Introduction to IBM Worklight

0
Share it now!

Introduction to IBM Worklight-

Mobile applications have become an integral part of our business lives and our personal lives. As such, they are used by many organizations in nearly all sectors to extend their reach and engage their customers, partners, and employees on the go. The rapid adoption of mobile, fueled by the growing market share of smartphone devices, is expected by many to continue increasing in proportion and become one of the main channels that users will use to perform routine daily tasks, access information, and conduct business transactions.

Because there are elements of mobile application development that differ significantly from traditional enterprise application development, organizations embarking on a comprehensive mobile strategy need to plan ahead and make sure all necessary stakeholders understand the high level process required for developing mobile applications. To offer some guidance, this article presents an overview of the eight major steps involved in developing, deploying, and publishing applications for mobile platforms, such as iOS and Android, using the IBM® Worklight™ mobile development platform.

1. Discovery process

Step one begins with understanding your mobile business requirements and defining your enterprise mobile strategy. The discovery phase plays an important role in the overall mobile application development lifecycle. It sets the mobile visions and strategy by analyzing your mobile challenges, goals, and constraints.

For example, you need to identify the types of mobile applications you need to develop, which could be mobile web, native, hybrid, or a combination of these. You also have to decide which mobile platforms to support; for example, iOS, Android, Blackberry, Windows® Phone, and so on. Figure 1 highlights the areas you need to consider when defining a mobile strategy.

The other outcome of the discovery phase is to identify the key mobile presence and application enablement use cases for the business. These use cases or application ideas should be conceptualized into prototypes, wireframes, and mobile application storyboards.

2. Become a registered developer on the supported mobile platforms

In order to be able to deploy or publish your application via the various mobile app stores (such as Apple’s App Store or Google Play), all mobile platforms require an organization or individual to be a registered developer. Only registered developers can submit applications to a platform’s associated app store. Therefore, you need to register to these platform programs in the early stage of your development lifecycle.

  • iOS: To test an application on a real iOS device or to prepare your app for app store release, you need to enroll in Apple’s iOS Developer Platform as either an individual developer or as a company. There is a fee associated with this registration.
  • Android: Before you can publish an Android application to Google Play, you or your organization needs to set up a Google Play account. This is a three-step process, which includes creating a developer profile, agreeing to the Developer Distribution Agreement, and paying a registration fee using Google Checkout.
  • Blackberry: To publish a Blackberry application to Blackberry App World, you first need to have a vendor account. Developers without a vendor account are not be able to submit applications for publication to BlackBerry App World.
  • Windows Phone: Similarly, you must be a registered Windows Phone developer to submit your applications to the Windows Phone Marketplace. Registration can be completed at the Microsoft App Hub.

3. Prepare Worklight mobile application development environment

Proper setup of your Worklight development environment is a vital step in the develoing and testing of mobile applications. In a nutshell, you will install Eclipse and IBM Worklight Studio as your development IDE for Worklight mobile applications. Supported mobile platform SDKs will have to be installed as well. Optionally, you might also wish to set up a team development environment for source control management.

Worklight Studio is an Eclipse-based IDE; you need to install Eclipse on your workstation first before installing Worklight Studio. Worklight Studio is supported on Windows, Mac OS, and Linux® operating systems. If you plan to develop Worklight applications for iOS environments, you can do so on any of these operating systems. However, due to restrictions set by Apple, you can only compile an iOS project on a Mac OS machine.

  1. Installing Eclipse

The current version of Worklight Studio requires Eclipse Indigo (3.7.2). You can download Eclipse IDE at no cost.

  1. Installing IBM Worklight Studio

You can install IBM Worklight Studio after Eclipse has been installed. There are three editions of Worklight Studio available: Developer (which is available for download at no cost to get you started), Consumer, and Enterprise. Worklight Studio can be installed from Eclipse Marketplace, or using IBM Installation Manager, or as an Eclipse plugin. For installation details, see the IBM Worklight product library.

  1. Installing mobile SDKs

If you plan to develop hybrid or native mobile applications with Worklight, you need to install and configure the SDKs (and development IDEs) for the associated supported mobile platforms. The procedures might vary, depending on the platform, but here are steps you are likely to encounter with some of the popular mobile platforms.

  • iOS: You must download Xcode, which is an Apple IDE for developing iOS and Mac applications. You can use Xcode to manage your testing devices, use an iPhone or iPad simulator, and install applications on an iPhone or iPad device.
  • Android: You must install theAndroid SDK and  Android Development Tools. The Android SDK provides the tools and APIs that are required to develop applications on the Android platform by using the Java™ programming language. The ADT plug-in for Eclipse is an integrated environment in which you can build rich Android applications.
  • BlackBerry: WebWorks application development requires that you download and install Blackberry Ripple Emulator, Blackberry WebWorks SDK, and Blackberry Simulator.
  • Windows Phone: You must download and install Microsoft Visual Studio 2010/2012 and Window Phone SDK. You must also download and install Zune software in your development environment to run your

5. Unit testing in the development environment

Plan on unit testing mobile applications early and frequently during development. This is simply because mobile testing is challenging, given the wide range of possible devices and platforms for even a single application. Below are some testing methods and tools you can use for your Worklight applications in the development environment. IBM Worklight Studio comes with an embedded test server that simplifies unit testing.

  1. a. Mobile browser simulator and app preview

IBM Worklight Server provides an app preview service that enables you to simulate mobile web artifacts in a desktop web browser. App preview also enables the simulation of Worklight client APIs. App preview is available from the Worklight Studio test server console.

In the Worklight Studio development environment, you can preview and test your mobile application using the mobile browser simulator. The simulator contains a frame that emulates a target device. You can switch the frame to emulate different screen resolutions, form factors, and orientations for Android, iPad, iPhone, Blackberry, and other mobile devices. This preview is available only when the com.ibm.imp.worklight.simulation.ui plug-in is enabled. The Apache Cordova API simulation user interface is packaged with the mobile browser simulator. Through the Cordova API, many device-specific features (such as geolocation, compass, battery, and so on) can be simulated.

Unit testing your application with the mobile browser simulator provides the convenience of not requiring the installation of the native SDK from the device vendor. It also has fast application refreshing performance, which makes the repetitive testing more efficient. But the UI simulation does not always exactly match the actual UI appearance on the physical device being emulated, especially with regard to the spacing of text and other elements. Therefore, this type of unit testing is most suitable for early stage UI testing of the overall frame and widget positions. It is also an efficient tool for testing logic flowing in the mobile application.

While testing within the desktop web browser environment, you have access to various popular debugger tools, such as the built-in debugger tool from Chrome and Firebug from Firefox. These tools let you set breakpoints in your JavaScript, view the CSS rules applied to the generated HTML code, and view the network traffic between your local application and the server. It is also highly recommended to use webkit-based browsers, such as Chrome and Safari. Another useful mobile web app debugging tool, Weinre, which is an open source tool, is also worth considering.

  1. b. Mobile SDK simulator

This type of unit testing involves a nativemobile SDK simulator. When a Worklight-generated native project for a mobile platform is started (either through Worklight Studio or the vendor development tool), a native OS window will pop up which runs the simulator with the latest mobile application code. In contrast to the mobile browser simulator, which tries to simulate the characteristics of many devices, a mobile SDK simulator provides a simulated UI that is nearly identical to that of the actual device. However, the application performance, such as the response time to touch, will be slightly different from the real device. This is due to the different computing power between the real device and the development workstation. For the most realistic user experience test, you must test your applications on actual mobile devices.

  1. c. Actual device

The ultimate test for mobile applications, this type of test must be performed on the targeted devices to make sure the application UI and performance are consistent across all targeted devices. You must make sure the real device stays on the same wireless network as the development workstation so it can access the embedded Worklight test server within Worklight Studio.

  1. When an Android device is connected to the computer via a USB cable, the Eclipse ADT plug-in automatically recognizes it and attempts to deploy applications onto it.

For an Android device whose driver is not listed (such as Kindle Fire), the .apk file built into the Worklight-generated native Android project can be dropped to the device through the USB connection. You can use the device’s installation utility to install the apk file on the device.

  1. To deploy an iOS application onto a real iOS device, you must have a provisioning profile, which you receive when you enroll in the Apple iOS Developer Program. Normally, you start with a development provisioning profile that enables Xcode to recognize the connected iOS device through a USB cable and install the application onto it. In a later phase (such as integration test phase or production), you will transition to a distribution provisioning profile that permits you to build, archive, and package the application into an .ipa file with proper signature,

6. Integration testing in remote Worklight server environment

To test your mobile application with full back end enterprise system integration, the application needs to be installed in an integration or QA environment that is readily available for any authorized testers.

IBM Worklight Server is only available in the Worklight consumer and Enterprise edition.

  1. Prepare the integration environment

Integration and QA testing are typically performed in a remote Worklight server environment. IBM Worklight Server uses a database for storing push notification information, statistics for reporting and analytics, and storing metadata required by the server at run time. Therefore, the preparation of the environment requires both a Worklight server setup and a database setup.

IBM Worklight Server installation is performed through the IBM Installation Manager. (If you are connected to the Internet during the installation, IBM Installation Manager can download any latest fixpacks for you.) The server installation wizard automatically configures an application server and a database, resulting in a fully functional IBM Worklight Server. You must choose which database and application server to use. Database options include:

  • IBM DB2 V9.7 or later
  • MySQL v5.1 or later
  • Oracle v11g or later
  • Apache Derby (included in the installation image, for testing purpose only)

Application server options include:

  • WebSphere Application Server Liberty Profile V8.5 or later (included in the installation image)
  • WebSphere Application Server V7.0 or later
  • Apache Tomcat v7 or later

See Worklight Administration Guide for detailed installation instructions.

  1. b. Prepare Worklight project for deployment

There are usually some configuration differences between the local development environment and the integration environment. Before building the project for the integration environment, these configurations need to be adjusted to reflect the remote environment settings. Typical settings that need to be adjusted include:

  1. worklightServerRootURL, which should reflect protocol, host, port, and context setting on the remote Worklight Server.

Database type, JDBC URL, username and password.

Any other additional properties which might be different, such as security features.

When you have made all the required modifications to the configuration of your Worklight project, you can build your application, adapter, or both. This task creates a WAR file that can be used to deploy project configuration to a remote server. The Worklight application and JavaScript-based adapter code are packaged into .wlapp and .adapter files, respectively.

  1. c. Deploy Worklight application and adapter to the integration environment

The generated WAR file can be deployed to the remote integration server by following the standard enterprise application installation procedure on the selected application server. After the WAR file has been deployed, you can open Worklight console in a browser by navigating to http://your-remote-server:server-port/<context-root-name>/console. Within the console, you can upload and deploy the generated .wlapp and .adapter files directly from your Worklight project directory. Your mobile application is now ready to be tested in the integration environment.

  1. d. Test in the integration/QA environment

You can use the three types of testing methods and tools described in step 5 to test your mobile application deployed to the integration environment. However, because the mobile browser simulator is not available on the remote Worklight Server, there is no device-specific display when previewing the different environments of the mobile application on the Worklight console; all environments are previewed as a mobile web application. Therefore, this type of testing is not often used in the integration test.

Whether using mobile SDK simulators or actual mobile devices, the authorized testers will need the native packaging file (.apk or .ipa file) to initially install the mobile application. These native packaging files can be distributed manually or through the application center included with the Worklight product.

In the later iterations of testing, if the mobile application does not have native code updates, there is no need to install new .apk or .ipa files on the device. Through the direct update feature of Worklight Server, the new version of the application will be automatically downloaded to the device when the application is resumed or started again on the device.

If there is a need to point to different remote servers, the server root URL can be updated right on the device or simulator:

  1. Android: the settings can be accessed by pressing the Menu key while the app is running.
  2. iOS: the settings can be accessed in iOS general settings under the application entry.

7. Deploying to production

For the Worklight server side component, deployment to the production environment will be very similar to the deployment to the integration environment. The manual build process can be replaced by an Ant script for a more streamlined build process. (See Worklight Administration Guide.)

Notice that several Worklight Servers are set up in a cluster environment, sharing the same database. When a .wlapp or .adapter file is deployed on one of the servers in a cluster, it is automatically synchronized to other servers. This is also true when deleting the application or adapter from a server in the cluster. The .war file, however, is a part of the application server customization; it must, therefore, be deployed manually to each server in the cluster.

While the Worklight mobile application is being deployed to the production environment, the native application package should be assembled and published for distributing to the public. For iOS devices, the publishing process will usually take a longer time because of Apple’s review and approval process for its App Store. Therefore, be sure to start the native package submission with enough lead time.

For Android devices, there is no review and approval process, so publishing is pretty quick.

See Resources for platform publishing guidelines.

The following link provides the guideline for the Apple’s publishing process: https://developer.apple.com/appstore/guidelines.html The following link provides the guideline for the publishing process: http://developer.android.com/distribute/googleplay/publish/preparing.html

8. Manage the Worklight mobile application

Worklight mobile application management consists of two parts:

  • The native package managed through the platform app store.
  • The application web resources, which are packaged and deployed through the Worklight console.

For the native package update management, each app store has its own guidelines (see Resources). For the Worklight application web resources management, there are quite a few nice Worklight features that enable you to control application versions with users.

  • Direct update: Pushing app updates to mobile devices

Using direct update, organizations can update the web content of their deployed HTML5 and hybrid applications directly from the Worklight Server upon application startup. When the application connects to the Worklight Server, it detects the new update automatically and starts downloading the newly deployed resources after receiving confirmation from the user. This option is available for iPhone, iPad, and Android apps.

Locking an app: Preventing redeployment of web resources for an app

If you want to prevent developers or administrators from mistakenly updating an application, you can lock it in the Worklight console. This option is available for iPhone, iPad, and Android apps.

  • Denying access to older app versions

It is sometimes useful to deny a user access to a specific application version due to phase-out policy or security issues present in the older version. On the console, you can deny access to a specific version of the application on a specific mobile operating system and provide a custom message to the user. Along with the message, you can also specify a URL for the new version of the app (usually in the applicable app store). The user receives the message and is forced to close the app, or upgrade to the latest version.

  • Displaying a notification message on app startup

Similarly, you can set a notification message that is displayed for the user when the application starts, but does not cause the application to exit. This type of message is useful when you want to notify application users with temporary messages, such as a planned system down time.

  • Controlling authenticity testing for an app

When an application first connects to the Worklight Server, the server tests the authenticity of the application. This test helps to protect applications against some malware and repackaging attacks. This option is available for iPhone, iPad, and Android apps. You needs to configure the application to enable authenticity .

Conclusion

This article described the fundamental steps involved in developing cross-platform mobile applications using the IBM mobile application development platform. It also described many of the specific challenges that face mobile application developers in general, and introduced various features of the IBM Worklight product that specifically address these challenges. Hopefully, this snapshot of the mobile application development process will not only help you properly plan your mobile strategy, but accelerate it as well.

Resources

Learn

  • IBM Worklight product information.
  • IBM Worklight 5.0 Administrative (PDF)
  • IBM Worklight 5.0 Developer Reference Guide (PDF)
  • iOS Developer Program
  • Google Play Developer Console
  • Vendor Portal for BlackBerry App World
  • Windows Phone Dev Center
  • Apple App Review quidelines
  • Publishing Checklist for Google Play.
  • IBM developer Works WebSphere.

Get products and technologies

  • IBM Worklight Developer Edition
  • Eclipse Indigo Sr2 Packages
  • Xcode4
  • Android SDK
  • ADT Plugin
  • Windows Phone SDK 7.1 and 7.1.1 Update
  • Zune
  • Google USB Driver
Be a fan

Open Source Libraries to Speed Up Your Android Development

0
Share it now!

Open Source Libraries to Speed Up Your Android Development:

If your favorite library is not listed please add it here.

1. AdWhirl:
AdWhirl is a free, open source tool that helps you make more money from your iPhone or Android app. It enables you to serve ads in your app from any number of ad networks as well as your own house ads. By using multiple networks, you can determine which perform best for you and optimize accordingly to maximize your revenue and fill all your inventory.

2. ActiveRecord for Android:
ORM to simplify use of SQLite with Java Objects

3. Android Form Edit Text:
Android form edit text is an extension of EditText that brings data validation facilities to the edittext.
4. Android Image Cache:
An image download-and-cacher that also knows how to efficiently generate and retrieve thumbnails of various sizes.
Features
Easily integrates into content-provider backed applications, providing an adapter that can read local and web URLs from a cursor
automatic generation and caching of multiple sizes of images based on one downloaded asset
provides a disk cache as well as a memory cache designed to work with your existing setup: no extending a custom application or activity needed cursor adapter supports multiple image fields for each ImageView; skips fields that are null or empty
cursor adapter has an automatic progress bar when loading the cursor

5. Android MapView Ballons:
Allows to annotate map overlay items with a simple information balloon when using Google Maps

6. Android RSS Library:
android-rss is a lightweight open-source (Apache 2.0) library to read parts of RSS 2.0 feeds. The library uses (Level 1) APIs such as android.net.Uri. The design features stream parsing with SAX. As a result, the memory footprint tends to be smaller compared to an equivalent DOM-based solution.

7. android-json-rpc:
This open source library aims to help the implementation of JSON-RPC clients in android applications. The library provides a simple API to perform JSON-RPC calls from an android device.
8. android-wheel:
Android Picker widget like a wheel

9. AndroidDataFramework:
Library to create and manage databases through xml resources.
10. AndroidQuery:

Android-Query (AQuery) is a light-weight library for doing asynchronous tasks andmanipulating UI elements in Android. Our goal is to make Android coding simpler, easier, and more fun.

Features include: Less Code, AJAX Callback, Image Loading, List Item Optimization, XML Parsing, Chaining, Non-intrusive, and more.

11. AndroidSideMenu:

AndroidSideMenu lets you create side (slide\drawer, whatever you call it) menuwithout special effort.

Why this one is better than others? Because it works much faster (thanks to caching), so it’s doesn’t matter how complex your layouts are.

Note that this library doesn’t provide tools for creating menu itself, you are free to put inside menu whatever you want (ListView? LinearLayout? RelativeLayout? ImageView? …)

12. Angle:

Angle is aimed to be a way to develop 2D games using OpenGL ES on Android providingas much speed as possible. The engine is entirely coded in java so you can overload every object for your convenience.

13. aSmack (XMMP):
Smack library (XMPP) with heavy patches for Android.

14. Bluetooth (<2.0):
Bluetooth library for devices with Android < 2.0

15. Calculon:
Calculon is a testing DSL for Google Android. It allows you to write functional story based tests.

16. cloak:
Open source 2D game framework for Android

17. Cocos2D Android:
2D game engine base on cocos2d-iphone.

18. Crouton:
Context sensitive notifications for Android

19. Deacon -

A Push Notifications / C2DM library for Android and Java applications
Deacon is a free and open-source Java push notifications library for Android and Java applications. It acts as a client to the Meteor COMET web server. Deacon was created with the goal to bring a solid push notification platform to Android, and
to enable developers to push-enable their apps without being dependent on anyone else’s servers.

20. Droidcouch:
Library to access a CouchDB server

21. DrupalCloud:
Library to communicate with Drupal services.

22. eyes-free:
The TTS library for Android (Text-To-Speach)

23. Facebook SDK for Android:
Library with activities to connect with Facebook

24. Jason Fry Android Tools:
Library with SwipeView, PageControl and OverScrollDisabler

25. jMonkey Engine (JME3D, JME2D):
Leading java based 3D game engine that also supports Android.

26. juicygames:
A video game framework for rapid game prototyping, partly modeled after Britt Hannah’s article Object-Oriented Game Design.

27. libgdx:
GDX is a simple Android game development framework that allows rapid prototyping on your desktop PC/Mac guaranteeing the same behaviour on your Android devices.

28. OAuth:
An OAuth Library/application for Android which uses Content Providers in order to store OAuth data

29. Open NFC API:
Open NFC is an open source stack implementing the NFC functionnalities, it consists of documentation and SDK add-on to enable RFID communication on Android.

30. open-social-java-client:
The OpenSocial Java Client Library enables you to work with OpenSocial data on your server, in the language of your choice. Includes description for android.

31. Reactive Android:
UI library for enterprise development
- DataGrid
- Layout Manager
- Binding

32. Resting Library:
Resting, a lightweight REST framework in Java, can be used to invoke a RESTful web service and convert the response into custom Java objects from the client application. Because of it’s simplicity, resting is suitable for Android and other handheld devices.

Goals of resting

  • Expose simple get(), post(), put() and delete() methods to consume REST services
  • Support for all the commonly used MIME types like JSON, XML and YAML
  • Enable both HTTP and HTTPS (SSL) invocation of RESTful web services
  • Provide request signing
  • Support for arbitrarily complex marshalling and unmarshalling of data during transformation
  • Support for custom representation of collections in REST request
  • Lightweight, simple and fast. Ideal for Android.

If your favorite library is not listed please add it here.

Be a fan

Deploymate helps iOS developers detect unavailable API calls

0
Share it now!

Deploymate helps developers detect unavailable API calls

With every new iOS & Mac OSX SDK released, Apple introduces new set of APIs available for developers to use. But there’s a small problem. When a developer wants to compile an app that is supposed to run on older OS versions, Xcode will alow them to use new APIs that are not available in that OS version. Xcode also doesn’t warn developers about that causing the app to nicely crash when run on older OS. So far the only solution for this problem was simply… manual testing.

Deploymate aims to solve this problem by statically analyzing Xcode projects and source files to find such API usage and warn the developer before it’s too late.

Analysis – Deploymate is based on Clang/LLVM compiler and utilizes this technology to detect Cocoa and Cocoa Touch API usage in Xcode projects. With its powerful scanner, developers can run analysis on their code and quickly find API usage that may cause problems in their apps.

Results – The scan results are shown in a compact overview offering a quick glance over found problems. Digging deeper, developers can find all problematic entries in Deploymate’s sidebar grouped by source files, similarly to already familiar Xcode interface.

Examine – All API calls need some context before the developer can decide if they really mean trouble or not. Deploymate features a built-in syntax highlighted source code viewer showing source code context for all found issues.

Fix it – Deploymate offers a simple integration with Xcode allowing all source files to be opened with Xcode when needed. Also, for huge source files it always comes in handy that specific problems will select the exact source file line when opened in Xcode.

With all these features, Deploymate is a very easy to use yet powerful tool that every iOS & Mac developer should have handy. Deploymate is available for download today as a limited evaluation version and a full license can be purchased for an introductory price of only $9.99. Download now from Deploymate website

Be a fan

Haptic Feedback for Mobile Devices

0
Share it now!

Haptic Feedback for Mobile Devices


Haptic Library for Android SDK

Haptic Library enables application developers and OEM manufacturers to add tactile feedback into mobile devices. Tactile effects provide more interactive user interface, increase virtual reality, and enrich user experience. Arasan Electronics offers precise and power-efficient effects using actuators embedded into Android based mobile devices. Using these effects, it is possible to create a kickback effect of a weapon in a shooter game, bump effect in a race game, confirming or declining effect in a pop-up menu and so on. With this library, wide range of solutions is offered to create haptic effects and integrate them throughout the mobile games, advertising apps, commerce apps, and enterprise apps.

What is Haptic Feedback?

The sense of touch provides additional information about the world around us and informs characteristics of an object such as texture, softness, elasticity, viscosity and so on. During interaction with physical environment, sense of touch provides dynamic feedback as a powerful modality.

Haptic technology, study of sense of touch, is an understanding sharing engineering and psychophysical advances. Haptic feedback is an essential supporting modality in our daily physical interactions and provides to user by using force, motion, vibration and electrostatic methods. Depending on application, these methods are already applied many areas from entertainment to medicine providing haptic feedback.

Basically, think about touch screen devices, they have no tactile feedback by itself, nothing but a smooth surface. When a key/button is selected, OEM manufacturers offered short duration of vibration as a simple haptic feedback.

Why Vibration as Haptic Feedback?

Vibration provides tactile information to user with minimal cost and complexity and human skin is sensitive for wide range of vibrations. Mobile device users have already been familiar with vibration and this fact is an advantage for rapid adaptation. Also, human palm and fingers are one of the most sensitive parts of the human body so high spatial resolution is available to create immersive tactile effects.

Haptic Library

Currently, Android SDK does not support the use of frequency as a feedback parameter but intensity and timing still play a significant role to design meaningful haptic effects. In this library, 3 intensity levels of vibration is offered to developers for two reasons; first, not to disturb user from high intensity vibrations and second power consumption. Stock Android SDK actuates the vibration motor in max performance but Haptic Library can change the intensity of vibration as developers desired. Intensity levels also normalized for different mobile device manufacturers because every manufacturer uses various vibration actuators with different characters. Consequently, the effects are standardized as much as possible.
Using Arasan Electronics’ Haptic Library, developers can easily adapt tactile effects into desired scenes and actions in their applications. Haptic Library offers 42 vibration effects in 3 intensity levels for most popular game categories such as action games, first person shooter games, racing games, general apps and even for education apps. The effects are designed for various actions as:

Action Games:

- Punch

- Hundred Punches

- Back Kick

- Jump

- Single Hit

- Combo

- Chophop

-Jump & Slash

Racing Game:

- Bumps

- Drift

- Pass Cars

- Jump

- Shift Change

- Reaching Max

- Checkpoint

- Texture

- Nitro

First Person Shooter Game:

Weapons:

- Pistol

- Heavy Machinegun

- Rifle

- Shotgun

-Machine Gun

Explosions:

- Grenade

- Airstrike Machine Gun

- Air Strike Bombs

- Bazooka

Education:

-Gas Pressure

- Heartbeat

- Spring

- Standing Wave

Haptic Library is now available on the Google Play Store and soon Windows Phone! More detailed description for integration of this library will be published in following posts. Feel free to contact for any question or request.

Google Play Store Download Link

Be a fan

Open Source Libraries to Speed Up Your iOS Development

0
Share it now!

1. cocos2d - cocos2d for iPhone is another 2d game framework built atop OpenGL. cocos2d for iPhone is a framework for building 2D games, demos, and other graphical/interactive applications. It is based on the cocos2d design: it uses the same concepts, but instead of using python it uses objective-c.
cocos2d for iPhone is:
Easy to use: it uses a familiar API, and comes with lots of examples
Fast: it uses the OpenGL ES best practices and optimized data structures
Flexible: it is easy to extend, easy to integrate with 3rd party libraries
Free: is open source, compatible both with closed and open source games
Community supported: cocos2d has an active, big and friendly community (forum, IRC)
AppStore approved: More than 2500 AppStore games already use it, including many best seller games.

cocos2d for iPhone supports: iPod Touch, iPhone, iPad and OS X

2. Core Plot – Core Plot is a plotting framework for OS X and iOS. It provides 2D visualization of data, and is tightly integrated with Apple technologies like Core Animation, Core Data, and Cocoa Bindings.

3. Dropbox API – Add Dropbox support to your apps. It’s the engine that powers our iPhone and Android apps and thousands of third-party Dropbox-enabled apps.

4. ShareKit - It adds sharing capabilities to your app. Allow users to share URLs, images, text and files with services like Facebook, Delicious, Instapaper, Twitter, and more.

5. OmniGroup - It has a set of open source frameworks for handling a wide range of tasks, including string scanning, regular expressions, data storage, preferences panels, and networking. OmniBase provides a series of debugging aids for class allocation and initialization, an alternative assertions mechanism, several Objective-C runtime manipulation aids, and a very reliable, cross-platform implementation of +load (called +didLoad).

6. Three20 - It offers several new UI view controllers such as a photo browser, launcher, and internet-aware tables. Three20 is a open source Objective-C library used by dozens of well-known brands in the App Store, including Facebook, Posterous, Pulse, Meetup.com, and SCVNGR.
Three20 provides powerful view controllers such as the Launcher, the popular Photo Browser, and internet-aware tables.
The library is modular, meaning you choose which elements of the library to include in your app. This modular design allows Three20 to be one of the only Objective-C frameworks that encourages what are called ‘extensions’ from the community.

7. Nimbus - It offers many of the same features of Three20, with the goal of being better documented and easier to use.
Nimbus is a toolkit for experienced iOS software designers. It provides well-documented, modular components that solve a number of common iOS software requirements. This includes: a rich text label with hyperlinks; a web view controller; a simple approach to table models, radio groups, and table actions; standardized interapp communication, and powerful debugging tools, amongst many other features.

8. Sparrow - It is a lightweight game development library layered over OpenGL. Sparrow does not cost a dime. Download and use it right away — no strings attached. And because it is Open Source, you’re always in control: step through the code and learn from its internals. Everything is well documented and easy to understand. Drop your in-house engine and focus on your games!

9. ZXing iOS Barcode Scanning Library:
ZXing (pronounced “zebra crossing”) is an open-source, multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages. Their focus is on using the built-in camera on mobile phones to scan and decode barcodes
on the device, without communicating with a server. However the project can be used to encode and decode barcodes on desktops and servers as well. They currently support these formats:
UPC-A and UPC-E, EAN-8 and EAN-13, Code 39 , Code 93, Code 128, ITF ,  Codabar, RSS-14 (all variants), RSS Expanded (most variants), QR Code

10. ZBar bar code reader
ZBar is an open source software suite for reading bar codes from various sources,  such as video streams, image files and raw intensity sensors. It supports many popular symbologies (types of bar codes) including EAN-13/UPC-A, UPC-E, EAN-8, Code
128, Code 39, Interleaved 2 of 5 and QR Code.
The flexible, layered implementation facilitates bar code scanning and decoding for any application: use it stand-alone with the included GUI and command line programs, easily integrate a bar code scanning widget into your Qt, GTK+ or PyGTK GUI application, leverage one of the script or programming interfaces (Python, Perl, C++) …all the way down to a streamlined C library suitable for embedded use.
ZBar is licensed under the GNU LGPL 2.1 to enable development of both open source and commercial projects.

11. LiteQR
Lite QR Reader in Objective C ported from zxing

12. Scandit Barcode Scanner SDK
Scandit is accurate and amazingly fast. It provides a great user experience.
Furthermore, Scandit provides great support as a partner.

13. An XMPP Framework in Objective-C for Mac and iOS
An XMPP Framework in Objective-C for the Mac / iOS development community.
XMPPFramework provides a core implementation of RFC-3920 (the xmpp standard), along with the tools needed to read & write XML. It comes with multiple popular extensions (XEP’s), all built atop a modular architecture, allowing you to plug-in any code needed for the job. Additionally the framework is massively parallel and thread-safe. Structured using GCD, this framework performs well regardless of whether it’s being run on an old iPhone, or on a 12-core Mac Pro

Be a fan

Introduction to Kony Mobile App development platform

0
Share it now!

Introduction to Kony Mobile App development platform

The Kony mobile application is the most powerful of all mobile development application. The Kony platform takes the cost and complexity out of building, maintaining and deploying mobile applications and lets you reach the widest possible range of users, across all mobile channels and operating systems. The application follows a basic rule “Write once and Run Everywhere”. This means that you need to work only on only one platform and it runs on every mobile devices and operating systems. All coding is done on KonyOne Platform.

What is KonyOne Platform?

The KonyOne Platform provides your application, a smart and flexible end to end software solutions for developing, deploying and managing mobile applications across every native devices such as tabs, desktops, and thousands of mobile devices. The biggest advantage of this platform is that it takes care of problems associated with supporting myriad if different devices, screen sizes, browsers, languages. It also takes care of dynamic up gradation which most of the platforms require time to time.

**It mainly comprises of KonyOne Studio, KonyOne server and Sync server. Mobile app manager can be used with the KonyOne ptatform or any 3rd party development tools.


**There is no programming language as such used in Kony. It works on graphical drag and drop.

What is KonyOne Studio?

KonyOne Studio is a visually oreinted integrated development envoirnment (IDE), with full flexibility  to script as little or as much as they prefer based on specific needs of each application. With built in-channel support, KonyOne studio eleminatees the need for seperate teams- each developing in a silo and ar a significant cost. The need to staff for team Android,team Apple, team blackberry etc. Simply goes away. Instead, your designers and developers can focus on on important UX elements and truly optimize the mobile experience across as many channels as the business needs. In KonyOne Studio, develpers desugn their UI, define the services the application needs and then connect the UI to the services.

Design:

Drag and drop widget placement, wireframing, and simple drop-down menus are your primary tools for the design phase. Create layout of your forms, configure your widget properties and use QuickPreview to see how they’ll look on your target emulators.

QuickPreview-instantly see your designs on device emulators for quick UI reviews, removing the need to build the whole app.

Cross-Channel Widgets-users expect and demand, a fully native look and feel in their devices-notan approximation or generic equivalent with KonyOneButton Platform, a calendar widget for eample, is realized as a 100% native calendar in iOS, a 100% native calendar in androd, etc. At build time. For native apps, users expect nothing less than a fully native experience.

Channel-specific Configurability-each channel has uniquw capabilities- whether assigining a ‘glow’ effect to an ios button or animating Windows Phone from header during a transition. These can all be accessed by simple drop-down menus in studio.

Skins & Themes- the font, color and other UI elements of widgets in your application can be defined by a skin, in both their normal and focus states. Skins can be applied for all widgets or on a per channel basis and can be applied at run time to give users a personalized experience-your Gold status consumers, for example, can have their own UX.

Drag & Drop Form Designer-  access to a rich palette of cross-channel UI widgets. Each widget can be customized via simple drop-down lists for any unique attributes of the native operating systems or web browsers, based on capabilities and deployment type.

Integrated Emulators- accessible from inside Studio with a single click, test your designs instantly using QuickPreview or review the full, connected application on your target channel emulators.

Inline Debugger- available for both local and remotely running code-this enabled developers to set breakpoints, suspend and step-through their code and examine variable content on the fly.

Code Profiler- a build and runtime analysis of code to ensure the mobile application released to test and production has become appropriately optimized.

Context Help- with all kony documentation content contextualized to the widget and widget dialog level, developers and designers can access hyper-relevant help when they need it.

Internationalization (I18N) Support – KonyOne supports full internationalization functionality. Developers define their supported locals, assign a default locale and then the I18N key sand values for the app are defined either directly in Studio or programmatically via an API. Keys for all the widgets in the app are similarly defined. Kony apps have been deployed in over 60 countries and in over 20 languages to date.

Foreign Function Interface (FFI) – from inside of Studio access any services, methods and functions written in a different programming language. Use this integration UI, for example, to access native OS SDK features and functionality not yet exposed through Studio’s visual design metaphor. Other common uses of FFI include those for barcode scanning, augmented reality, NFC functions, Pen-based features – or embedding 3rd party UI widgets or games inside your application.

SERVICES

Once you’ve designed your UI, you can define the services you want to connect it to, and how you want to consume and exchange data. Studio’s visual design makes this easy. Services can also be fully customized with dedicated pre- and post-processor flows with configurable security, and can also be constructed in a series as composite services where internal parameter passing and logic is fully configurable.

DEVELOPER TOOLS

Simple Scripting – for both cross-channel and channel-specific business logic, Studio provides developers with the choice or JavaScript or Lua as scripting languages. Code is entered directly within Studio as reusable modular code ‘snippets’, or defined in-line with event flows. Studio also provides a Lua-to-JavaScript conversion utility, giving developers complete flexibility to code in their preferred language.

Code Assist – Studio provides developers with a world-class contextual ‘autocomplete’ experience, which covers all scripting code syntax such as methods, variables, functions and namespaces as well as application-level context such as widgets and widget properties.

Importantly, since KonyOne Studio publishes services to KonyOne Server, the abstraction of service from application means that developers are not only free to reuse the same services across different applications, but if the service type changes or is improved in future (say from HTML scraping to web services), there is no need to republish their apps.

Service Definition/Publishing – Studio’s code-free services definition UI offers developers a wide selection of connectivity options. Web services, REST, JSON, Java connectors and a full-featured HTML Scraper are all presented to the developer in a unified interface. Pre- and post-processor logic with various security options can be assigned, and to optimize the end-to-end performance and UX only data relevant to the service is mapped to be consumed.

3rd Party Connectors & Adapters – KonyOne Platform offers dedicated connectivity to ERP systems such as those from SAP (via built-in JCO connectors), Oracle/Siebel and Microsoft, as well as direct database access (JDBC/ODBC) and a partnership with iWay, which provides over 300 off-the-shelf adapters for backend system connectivity. Additionally, Studio’s Enterprise Browser enables the discovery and utilization of data, methods and services from inside of the IDE.

Service Simulator – developers often need to test their services against a backend that is either offline, overloaded, or is inaccessible for security or other reasons. Studio’s Service Simulator enables the recording of scenarios on a per-service basis which the simulator can then use as a proxy for being actually connected.

Be a fan

Introduction to Samsung bada mobile app development

0
Share it now!

Introduction to Samsung bada mobile app development

Bada is Samsung mobile operating system for smartphones and tablets. “bada” is a Korean word that means “ocean” and “seashore”. Bada  allows you to create feature-rich applications for bada devices using C++, flash, and Web programming.

Features:

1) Integration of service APIs into the platform- Services include social networking, buddy lists that allow users to share real-time information with their friends, shopping and commerce APIs, location and points of interest, and even weather services. All are included out-of-the box and can be integrated into any third-party application.

2) bada is more Than Just Another Smartphone OS- It contains a C++ class library as a framework layer, there are two more layers that provide features for controlling the device and accessing services, and a mobile operating system (OS) kernel. The bada API nicely abstracts from these layers and opens up the various functionalities to developers. bada is therefore (strictly speaking) not a mobile OS at all. Rather, it is a platform that includes the enhanced version of selected components of Samsung’s proprietary (and proven) middleware with a clean and well-structured C++ class library, supported by a commercial, mobile RTOS kernel.

3) bada is Open- bada APIs are open to all which means it is open source. bada ships a free SDK, with open and free developer sign-up, and with publishing that is open to all via the Samsung Apps store. No, that doesn’t mean that bada is open-source – it just means that bada phones are open to third-party software, and any developer can be a third-party. At the time of writing, not every bada API is open to third-party developers; and in fact, some of the most interesting APIs are open only to partner developers. But this is an evolving position. In time, restrictions will be relaxed to make bada even more open when compared to other mobile platforms.

4) bada is Native- bada is written in C++ on top of C/C++ middleware, and bada apps are written in C++. bada apps run in a native OS process, with access to native OS threading. bada also supports Flash and WebKit runtimes, and integrates Flash and WebKit support into its native APIs allowing inter-operation and multiple language code.

5) bada is Neat- bada introduces some new, cool, network-based service APIs and integrates  them seamlessly into the platform. These include buddy and social networking, location, and commerce and store APIs, which all interact with the bada. Server to enable your app to track and exchange – for example – location data, including retrieving landmarks based on mobile location, and to swap instant messages and location data with the user’s buddies. You can set up an online store and use bada’s commerce APIs to interface your app with your store.

6) The bada ecosystem.

At one end of the chain are the developers or application providers who want  to develop applications. At the other end are the users or customers who want to use mobile apps. Along this chain Samsung provides three core building blocks that foster the bada ecosystem. Central to it is the bada platform, which is the execution environment deployed on mobile handsets. This platform not only covers the mobile part but also allows seamless access to the bada Server as you will find out later in Chapter 5. Powerful and well-abstracted APIs are exposed as an open SDK to developers. In addition to that, the left block in. Figure 1.1 covers a large number and variety of technical support resources, such as training material, tutorials, sample code, tech blogs, videos, and the API reference documentation. The right block is the application store Samsung Apps that allows you to certify and publish your apps. Once your app is ready for publication, you can decide if – via the store – you want to sell your app or give it away for free, or however else you want to become rich and famous.

7) bada Architecture

The BADA architecture consists of the following four layers –

Kernel

The BADA kernel contains either the real-time operating system or the Linux kernel.

Device

This layer is responsible for the core functions of the mobile device platform that are provided by the device operating system, graphics and multimedia functionalities and communication components. These functions include telephony, security, graphics and event & window management.

Service

This layer contains the service oriented functions that are provided by application engines and server assisted components. The application engines provided by the service layer include Contact and Messaging engines. The server assisted features are provided by REST-ful (SOAP and KSOAP comprised together to form RESTful web-service) web-service components that interconnect with the service components of the BADA server. The service layer enables applications to manage data that is stored on remote servers, such as geographic information and user presence information. Access to the server-assisted features is possible through APIs on the Framework layer.

Framework

This layer contains C++ and web frameworks of BADA. The C++ framework consists of the application framework, interfaces and classes that provide access to the functionality on the underlying layers. The application framework provides the features for application life cycle management, event handling and application controls. The interface provided by the open API framework includes several basic interfaces that are needed by all application states, and for creating the user interface. The Web framework provides well established standards and features, such as WAC 2.0 HTML 5, CSS and JavaScript as well as JavaScript based cross-platform APIs for UI controls and events.

BADA platform supports the following application types

1)      Base Applications
These are stored in the ROM and cannot be removed using the Application Manager, Examples of base applications includes dialler, contact, camera and music player.

2)      BADA Applications
You can install and remove BADA applications from your device as per your convenience. These could be C++ or Flash applications created using the C++ framework, or a Web Framework. Users access BADA application through the device’s main menu or task manager. The main menu displays the base and BADA applications installed on the device, while the task manager displays the icons of the application history for both currently running and inadvertently terminated applications to provide the user quick access to them.

3)      Multitasking
The BADA platform now supports multitasking with version 2.0. However, when multiple BADA applications are running simultaneously, only one application can run in the foreground, while the remaining applications continue to run in the background. However, the user can switch the application perspectives and determine which application runs in the foreground. To view all the applications running, you can use the task manager, which lists all running applications, execution and launch history. You can terminate individual application by ling pressing the Menu button and then tapping on the end symbol over individual app.

4)      BADA IDE
The BADA IDE is an integrated development environment that provides a set of development tools, such as C++ editor, compiler, debugger, Application Wizard, UI Builder, Potential Bug Checker, API and Privilege Checker, Memory Use Checker, Profiler, JavaScript Debugger, Testing Tools and UI sequencer.  The BADA IDE based on the Eclipse CDT and JSDT. Eclipse provides a set of code editing tools in its text editor. These tools support CDT features, such as syntax highlighting, code folding, tabbed documents, and content assistance.

5)      UI Builder
BADA provides a UI builder to design and create the application UI. UI builder is a WYSIWYG design environment for creating user interfaces for applications. Which UI builder, you can create forms and all the user interface elements, which are containers and controls, which you want the forms to contain. UI builder stores the created forms as XML files into the project folder in the IDE. UI builder has a dedicated toolbar in the IDE that provides additional time-saving design tools such as zoom, editing mode (set display to portrait or landscape) and align controls.

6) BADA Project Templates

The BADA IDE provides various project templates that make it easier for you to start coding your application. When you create a new project, you can select from the following templates

7) BADA From-based Application

This template is suitable for creating a simple project based on a form. The template contains the basic application functionality as well as the functionality for drawing a form on the device screen.

8)      BADA Flash-based Application
This template is suitable for creating a simple project based on a flash file. The template contains the basic application functionality as well as the functionality for displaying the contents of a flash file on the device screen. To use the Flash based application template, the FLASH_SERVICE and SYSTEM_SERVICE privileges are required.

9)      BADA Empty Project
This template is suitable for creating a project with project files only, without any source or include files. The template is used if you have existing source files that you want to import into a new project.

10)  BADA Shared Library
This template is used to create an application library with shared libraries. If you select this template, you need to make sure that the Linker of the IDE can access the external libraries at build time. Therefore, you need to define the path to the libraries in the project settings. When you build the project, the IDE creates the links to the external shared libraries.

11)  BADA Static Library
This template can be used for creating an application library with static libraries. If you select this template, you need to make sure that the Linker of the IDE can access the external libraries at build time just like we did for using shared libraries.

12)  BADA Web Application
This template is suitable for creating standalone BADA Web Applications using only web standard technologies, such as HTML5, JavaScript, and CSS files. The template contains the BADA 2.0 JavaScript UI for the creation of Web Applications with BADA native look and feel.

Be a fan
Go to Top