Cross Platform Mobile App Development


#1

Hi guys,

Am sure you are all excited about the new student community here, well am excited as well.

Creating solutions to social problems take different folds and stages, idea, execution, deployment,business and the main aim creating value to the community.

We have guys that have the idea and need little technical guidance, well I will be posting useful stuffs about cross platform mobile app development, this trend is collaborative workspace/forum, everyone is invited to add,share, comment and give feedback as we dive into one of the stages of social innovation


#2

Developing software solutions can be tiring or the big terms the big boys(programmer) use can be annoying, well it’s simple just little commitment and passion we can sail through together.

Software development can be Web platform, mobile app and desktop app programming.

Mobile app development involves writing program that is accessible in our mobile device native environment,e.g Google Mail,etc

We have different operating system for mobile computing device like we have for PCs. Android,iOS,Windows,Firefox OS,etc. Developing for each platform requires us to learn new technologies and an different code Base entirely.

Cross platform mobile app development involves a single code Base that works on all mobile device platform.

I will be posting what I know about cross platform mobile app development using Intel XDK with thousands of apache cordova plugin to develop hybrid apps. Feel free to comment add and let’s do this together


#3

Oh! it would be very nice of you.


#4

Database connection
Simple trick for us to interact Intel XDK/cordova projects with database. simply add indexedDB plugin to your project and use the following code snippets

Requesting Access to IndexedDB and Creating a Object Store
//provide database name and version number
var request = indexedDB.open(“habiz”, 1);
var db = null;

request.onupgradeneeded = function(){
db = request.result;

//create object store and define key property of the objects on that store i.e., primary index. Here "ID" is the key  
var store = db.createObjectStore("habiz_store", {keyPath: "ID",autoIncrement: false});

//define other properties of the objects of that store i.e., define other columns.
store.createIndex("name", "name", {unique: true});
store.createIndex("age", "age", {unique: false});
store.createIndex("serialnumber", "serialnumber", {unique: true});

}

request.onsuccess = function(){
//database connection established
db = request.result;
}

request.onerror = function(){
console.log(“An error occured while connecting to database”);
}

Adding Objects to Object Store
var object1 = {name: “intelhub”, age: “6”, ID: “d3223”, serialnumber:1};
var object2 = {name: “habiz”, age: “2”, ID: “dasdasd121”,serialnumber: 2};
var write_transition = db.transaction(“habiz_store”, “readwrite”);
var store = write_transition.objectStore(“habiz_store”);
store.put(object1);
store.put(object2);

Find a Object
var read_transition = db.transaction(“habiz_store”, “readonly”);
var store = read_transition.objectStore(“habiz_store”);
var row = store.get(“d3223”);
row.onsuccess = function(evt){
console.log("Name is: " + row.result.name);
console.log("ID is: " + row.result.ID);
console.log("Age is: " + row.result.age);
console.log("Serial Number: " + row.result.serialnumber);
}

Get all Objects
var read_transition = db.transaction(“habiz_store”, “readonly”);
var store = read_transition.objectStore(“habiz_store”);
var rows = store.openCursor()
rows.onsuccess = function(evt){
var cursor = evt.target.result;
if(cursor)
{
console.log("Name is: " + cursor.value.name);
console.log("ID is: " + cursor.key);
console.log("Age is: " + cursor.value.age);
console.log("Serial Number: " + cursor.value.serialnumber);
cursor.continue();
}
}

Delete a Object
var write_transition = db.transaction(“habiz_store”, “readwrite”);
var store = write_transition.objectStore(“habiz_store”);
var deleted_row = store.delete(“d3223”);

deleted_row.onsuccess = function(event){
console.log(“Deleted”);
}

Delete all Objects
var write_transition = db.transaction(“habiz_store”, “readwrite”);
var store = write_transition.objectStore(“habiz_store”);
var delete_all_rows = store.clear();

delete_all_rows.onsuccess = function(event){
console.log(“Deleted all rows”);
}
Update Object
var object1 = {name: “Intelhub”, age: “3”, ID: “d3223”,serialnumber: 1};
var object2 = {name: “habiz”, age: “2”, ID: “dasdasd121”,serialnumber: 2};
var write_transition = db.transaction(“habiz_store”, “readwrite”);
var store = write_transition.objectStore(“habiz_store”);
store.put(object1);
store.put(object2);

you can check here for more tricks


#5

After playing around for a while, I think it’s time I really take this tutorial serious.

I will start from installing, to development, building and deployment of cross platform mobile app development using apache Cordova supported platform.

What I actually need is encouragement to keep the tutorial moving. I will start the tutorial when couple of guys show interest in learning the development of mobile app that works on android,iOS, windows phone( if there is still something like that smiles ) and who knows we might move to react/RoR or Django later.

Kindly type interested


#6

Interested sir, how can I come onboard


#7

Cool. Very interested. Go on please