Things You Should Know Before Planning Your Mobile App-Part-I

When you are looking at all the popular apps, you too are tempted to have one of your own; however, it can’t be done overnight. It is because; there are thousands of mobile app programmers and companies who may be thinking of doing the very much similar things. To have a successful mobile app it takes lots of hard work and well defined requirements.  You need to think about the main development aspects before planning to go for your mobile app.

Basic Steps You Need to Know For Developing Mobile App:

From our experiences, here are some guidelines you must go through if you are planning to develop a successful mobile app:

  1. The most crucial step is to come up with an innovative idea. Here, you need to make sure that there is little or no competition for it.
  2. Identify your targeted audience and build your app form their perspective, something that is more likely to be appreciated by these users.
  3.  Judge and determine major pain points and challenges that you expect to face for your application. You should hire a dedicated development team who could understand your specific business requirements and turn your ideas into a working app.
  4. Make sure that your app provides good usability and practical values to the users i.e., they should find your app useful and productive.
  5. Your app should have a solid built with no loose ends. Make sure to run a vigorous crash test and beta test phase before actually publishing it. User experience must be intuitive as well as engaging. If you are willing to implement APIs, ensure that it is robust and doesn’t generate any glitches in the application.
  6. After publishing your app to the application stores, you need to start promoting and market your application. One of the best ways to reach a wider audience is by promoting it over social media. Next, you will have to avail as much positive feedback from users as possible.
  7. You should offer constant support to your customers by addressing their comments, expectations and complaints. Then you should release updates and new features for your app to woo your existing customers as well as attracting the attention of new ones.
  8. Offering basic features for free and then selling premium stuff is a popular way to keep users hooked up and to gain traction. Also make sure that the app is noticed and favored by your customer.

iOS application development and Android app development can be easily executed and managed with the help of expertise mobile app developers. Moreover, it is advisable to outsource mobile application development tasks to development companies. Hiring a professional development company would facilitate you to build flawless and unique mobile apps which would greatly leverage revenue.

How to Import CSV Configuration File to Device’s SQLite db

Much like web applications, certain Android apps necessitate configuration adjustments to facilitate app testing and deployment across various environments.

Managing configurations for devices has become a critical task. One efficient way to handle configurations is by uploading them to an SQLite database within the device. This approach offers a structured and easily accessible repository for storing and retrieving configurations.

Incorporating distinct web services APIs, we employ the same Android APK to access data from both developmental and staging servers. Additionally, we exercise control over the integrated camera configuration within the Android APK.

Furthermore, seamless operationality demands the implementation of diverse configuration settings within the APK, dynamically applied without necessitating alterations to the source code during runtime.

  • We used different web services API to access data on server, so we need to use same android APK to access data in dev server as well as stager server.
  • We need to control the camera configuration integrated in android APK
  • Similarly, we need different configuration settings to set dynamically in APK without changing the source code at run-time.

Considering the above scenario, the best thing is to use CSV files, such as the properties files used in Java and .NET platform. In Android, we put CSV file in the device’s phone storage (in this example, the file path is “/storage/sdcard0/Android/data/com.example/”).

We have to write codes to read the CSV file and then spilt the data programmatically using separator. Then it has to be inserted in to a SQLite table (in this example uses ‘appconfigtbl‘).

The sample program in this blog will perform the below mentioned steps to achieve the above mentioned initialization of configuration value inside android app:

  • Check if the CSV file exists in the device with proper file path location defined in the APK
  • Use the asynchronous task that runs in the background of the app and initialize the CSV content to the targeted table.
  • While the data is imported from the CSV file to database, the user will see the progress bar of data being uploaded. In case of larger data, the progress bar dialog will be shown with the value of %completed.
  • Since the data is stored in a config-table, the app can retrieve the record from this table and use it in appropriate section.

Benefits:

  • The APK will be re-initialized with basic configuration data at any time.
  • No need to re-write the APK and compile it again.
  • Easier to setup and run inside the device. We get the changed configuration data at run time.
  • APK can be set up to a different configuration data base when required and can be deployed with different config data (CSV file) at different location easily.

Example of CSV File contents (appconfig.csv)

[sourcecode]
Config ID,Config Name,Config Value
validate_url,http://50.56.70.140/
webservice_url,http://50.56.70.140:8080/HOSTAPP/resources/inspection
camera_resolution_hight,800
camera_resolution_width,600
camera_flashlight_mode,auto
long_password,abc123
[/sourcecode]

Example of Layout xml

[sourcecode]
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >

<TextView
android:id="@+id/showResult"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="" />

[/sourcecode]

Example of  Main form Activity class

1. MainActivity.java

[sourcecode]
package com.example.csvdemo;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.Date;

import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Environment;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.database.Cursor;
import android.util.Log;
import android.view.Menu;
import android.widget.TextView;

public class MainActivity extends Activity {

private boolean isCsvFileNeedToInitialize = true;
private static final int DIALOG_DOWNLOAD_PROGRESS = 0;
private DBHelper mDbHelper;
private ProgressDialog mProgressDialog;
private static int totalRowsUpdate = 0;

public static final String external_sd = Environment.getExternalStorageDirectory().getAbsolutePath();
public static final File sdCard = Environment.getExternalStorageDirectory();
public static final String sdcardBaseDir = sdCard.getAbsolutePath();
public static final String externalPath = "/Android/data/com.example/";
public static final String csvFileName = "appconfig.csv";

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

mDbHelper = new DBHelper(this);
mDbHelper.open();
totalRowsUpdate = 0;

// create empty directory if not exist
File appDir = new File(sdcardBaseDir + externalPath);
if(!appDir.exists())
appDir.mkdirs();

File externalResourceFile = new File(sdcardBaseDir + externalPath + csvFileName);
isCsvFileNeedToInitialize = externalResourceFile.exists();
TextView lableResult = (TextView) findViewById(R.id.showResult);

if(isCsvFileNeedToInitialize)
{
new InitializeCSVFileAsync().execute("");

lableResult.setText( totalRowsUpdate + " fetched from ‘appconfig.csv’ into database successfully.");

} else {
lableResult.setText("’appconfig.csv’ not found!");
PopIt("Exit Application", "’appconfig.csv’ not found!");
}
}

public static void setTotalRecord(int ctr) {
totalRowsUpdate = ctr;
}

private void PopIt( String title, String message ){
AlertDialog.Builder alertbox = new AlertDialog.Builder(this);
alertbox.setTitle(title);
alertbox.setMessage(message);
alertbox.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface arg0, int arg1) {
finish();
}
});
alertbox.show();
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}

@Override
protected Dialog onCreateDialog(int id) {
Resources res = getResources();
String reader = "";
int ctr = 0;
try {
File f = new File(sdcardBaseDir + externalPath + csvFileName);
BufferedReader in = new BufferedReader(new FileReader(f));
while ((reader = in.readLine()) != null) { ctr++; }
setTotalRecord(ctr);
}catch(Exception e) {    e.getMessage();  }

switch (id) {
case DIALOG_DOWNLOAD_PROGRESS:
mProgressDialog = new ProgressDialog(this);
mProgressDialog.setProgressDrawable(res.getDrawable(R.drawable.initialize_progress_bar_states));
mProgressDialog.setMessage("Initializing…");
mProgressDialog.setMax(ctr);
mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
mProgressDialog.setCancelable(false);
mProgressDialog.show();
return mProgressDialog;
default:
return null;
}
}

// Display Initialize progress bar for uploading CSVFiles to database
class InitializeCSVFileAsync extends AsyncTask<String, String, String>
{
@Override
protected void onPreExecute() {
super.onPreExecute();
mDbHelper.deleteCongigTableOldRecord();
if(isCsvFileNeedToInitialize)
showDialog(DIALOG_DOWNLOAD_PROGRESS);
}
@Override
protected String doInBackground(String… aurl) {
try {
float total = 0F;
float fctr = 1F;
String reader = "";
int ctr = 0;
boolean skipheader = true;
File f = new File(sdcardBaseDir + externalPath + csvFileName);
BufferedReader in = new BufferedReader(new FileReader(f));

while ((reader = in.readLine()) != null) {
// skip header column name from csv
if(skipheader) {
skipheader = false;
continue;
}
String[] RowData = reader.split(",");
mDbHelper.insertDB(RowData);
total += fctr;
publishProgress(""+(int)total);
//publishProgress((int)(total*100/lenghtOfFile));
}
in.close();
} catch(Exception e) {
e.getMessage();
}
return null;
}
protected void onProgressUpdate(String… progress) {
//Log.d("ANDRO_ASYNC",progress[0]);
mProgressDialog.setProgress(Integer.parseInt(progress[0]));
}
@Override
protected void onPostExecute(String unused) {

File f = new File(sdcardBaseDir + externalPath + csvFileName);
boolean result = f.delete();
if(isCsvFileNeedToInitialize)
dismissDialog(DIALOG_DOWNLOAD_PROGRESS);
mDbHelper.close();
//fillAllList();
}
protected void onDestroy() {
if (mDbHelper != null) {
mDbHelper.close();
}
}
}
}
[/sourcecode]

Example of  Helper class for sqlite database interaction:
Example of AbstractDbAdapter java

[sourcecode]
package com.example.csvdemo;

import android.content.Context;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public abstract class AbstractDbAdapter {

protected static final String TAG = "ExampleDbAdapter";
protected DatabaseHelper mDbHelper;
protected SQLiteDatabase mDb;

protected static final String CONFIG_TABLE_CREATE =
"create table appconfigtbl (_id integer primary key," + "config_name text not null," + "config_value text," + " createdAt text, " + " updatedAt text);";

protected static final String DATABASE_NAME = "example";
protected static final int DATABASE_VERSION = 2;

protected final Context mCtx;

protected static class DatabaseHelper extends SQLiteOpenHelper {

DatabaseHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL(CONFIG_TABLE_CREATE);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXISTS CONFIG_TABLE_CREATE");
onCreate(db);
}
}

public AbstractDbAdapter(Context ctx) {
this.mCtx = ctx;
}

public AbstractDbAdapter open() throws SQLException {
mDbHelper = new DatabaseHelper(mCtx);
mDb = mDbHelper.getWritableDatabase();
return this;
}

public void close() {
if (mDbHelper != null) {
mDbHelper.close();
}
//mDbHelper.close();
}
}
[/sourcecode]

Example of DBHelper java

[sourcecode]
package com.example.csvdemo;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;
import java.util.Hashtable;
import java.util.Vector;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.util.Log;

public class DBHelper extends AbstractDbAdapter{

public static final String KEY_ROWID = "_id";
public static final String KEY_CONFIG_NAME = "config_name";
public static final String KEY_CONFIG_VALUE = "config_value";
public static final String KEY_POSTED_DATE = "createdAt";
public static final String KEY_EDITED_DATE = "updatedAt";
public int maxLevelOnCurrentMenu = 1;

public int getMaxLevelOnCurrentMenu() {
return maxLevelOnCurrentMenu;
}

public void setMaxLevelOnCurrentMenu(int maxLevelOnCurrentMenu) {
this.maxLevelOnCurrentMenu = maxLevelOnCurrentMenu;
}

public static final String DATABASE_TABLE = "appconfigtbl";

public DBHelper(Context ctx) {
super(ctx);
}

public long insertDB(String config_name,String config_value, String createdAt, String updatedAt) {
ContentValues initialValues = new ContentValues();
initialValues.put(KEY_CONFIG_NAME, config_name);
initialValues.put(KEY_CONFIG_VALUE, config_value);
initialValues.put(KEY_POSTED_DATE,createdAt);
initialValues.put(KEY_EDITED_DATE,updatedAt);
return mDb.insert(DATABASE_TABLE, null, initialValues);
}

public long insertDB(String[] RowData)
{
long result = 0;
ContentValues values = new ContentValues();
values.put(KEY_CONFIG_NAME, RowData[0]);
values.put(KEY_CONFIG_VALUE, RowData[1]);
values.put(KEY_POSTED_DATE, "");
values.put(KEY_EDITED_DATE, "");
result = mDb.insert(DATABASE_TABLE, null, values);
return result;
}

public boolean deleteList(long rowId) {

return mDb.delete(DATABASE_TABLE, KEY_ROWID + "=" + rowId, null) > 0;
}

public boolean deleteCongigTableOldRecord() {

return mDb.delete(DATABASE_TABLE,  null, null) > 0;
}

}
[/sourcecode]

Example of initialize_progress_bar_states.xml [Used to show progressbar UI %progress value]

[sourcecode]

<gradient
android:startColor="#98887b"
android:centerColor="#ddd7c9"
android:centerY="0.95"
android:endColor="#0d1522"
android:angle="270"
/>

<corners
android:bottomRightRadius="7dp" android:bottomLeftRadius="7dp"
android:topLeftRadius="7dp" android:topRightRadius="7dp"/>

<gradient
android:startColor="#74c43f"
android:centerColor="#4a9c14"
android:centerY="0.85"
android:endColor="#06101d"
android:angle="270"
/>
<corners
android:bottomRightRadius="7dp" android:bottomLeftRadius="7dp"
android:topLeftRadius="7dp" android:topRightRadius="7dp"/>

[/sourcecode]

SwiftKey has unveiled its version 4 keyboard app for Android devices

androidimg

To be completely honest, most android users are not satisfied with the android’s default keyboard. It can be fiddly for some users, who write languages other than English on a daily basis. After all it doesn’t cater to everyone’s typing style either. However “SwiftKey” has always proved to be the best keyboard app alternative for the android platform. This time the developers at SwiftKey have launched its version 4 for the android devices

One of the best features of this keyboard is its ability to gradually learn the user’s typing preferences. It studies how a user writes over time and generates predictive texts for him, which is surprisingly accurate and better than any other applications. SwiftKey has also included its swipe like feature called the SwiftKey Flow which lets the user type sentences without lifting finger from the mobile screen. SwiftKey now supports over 60 international languages.

Here are some of the most notable features in version 4 release:

  • SwiftKey Flow is a gesture typing feature that facilitates the users to write sentences simply by gliding over the keys. It also adds auto-correction ability as-well-as predicts the possible next words while typing.
  • It can also be blend with tap inputs and switching mid-word.
  • If the predicted word is correct then it can be inserted by simply lifting the finger off.
  • Flow through space lets the user type a complete sentence in one motion without lifting the finger, to give spaces between the words.
  • It supports word prediction for over 60 languages like Javanese, Sundanese, and Vietnamese etc with both auto-correction and word prediction abilities.
  • Easier correction and auto adaptability to users typing style.

According to reports Android application development with SwiftKey’s SDK now supports iOS, JVM, Linux, Mac OS-X, Windows, and C++ etc. SwiftKey had released its Flow feature in the last October and its Beta version was tested with a community of million users.  Being awarded numerous times for its keyboard application, it surely is one of the best android keyboard apps, plus it comes with a reasonable price.

Android to be used in Consumer Electronic Appliances Too

android31Google’s Android operating system is the most widely used Smartphone operating system in the world. Besides that, it is considered as the most user-friendly OS by android users and has released it to other mobile device manufacturers.

But now Google has decided to power consumer home appliances with its android based software.

These android applications will be developed specifically to the instrument that will be embedded to its hardware.

Embedding Android directly into devices will make it easier for electronic appliances to exchange information with humans. For example, android powered television can show a pop-up message from the kitchen, indicating that the dish is ready to be served.

The user could remotely access the kitchen appliances to turn it OFF or ON, from the TV. Google’s step is to bring future imagination into reality. This will save a lot of time for the users and may avoid possible dangers.

Like, if the device detects a gas leak in the kitchen it can automatically turn the appliance off or intimate the user about the situation. Devices will also be able to detect intrusions in the house when the user is not present.

Making such intelligent, connected appliances will need experienced android developers at the forefront.

This advancement will also need advanced android application development for creating custom apps for the instruments. At Andolasoft we develop the most intriguing android applications for our customers.

We have a pool of expertise android developers to provide innovative solutions for all versions of android operating software.

Vuzix’s Smart Glass will Change the Way We Work with Computers

vuzix-smart-glassesWith the advancing technology, computers have been evolving through the years to become more compact to the users. First, there were desktops then they came to the laps and then to the hands, now the next generation computers will be right in front of our eyes in the form of wearable eyeglasses.

There are a lot of companies, who have been developing wearable computers, but they were shipped only for military purposes and never to the public.

Recently Google stunned the technology industry by announcing its plans to sell Google Glass to the public market.

But it turned out that Google isn’t the only one trying to make smart glasses in order to bring computers to a person’s field of vision.

A New-York based technology industry ‘Vuzix’ has unveiled a hands-free smart device that comes with an integrated “virtual display” eyepiece, Wi-Fi and Bluetooth connectivity, a 720p HD camera, and motion sensors.

The Vuzix smart glasses can sync up a smartphone or tablet. It contains a microphone, an earpiece, a camera, and motion and GPS sensors, and it’s capable enough to run any version of the Android operating system.

Bluetooth and Wi-Fi enable it to be linked to a smartphone to project a small display, positioned in the wearer’s vision, which provides a comfortable viewing area equivalent to having a four-inch smartphone display in hands.

The device is ideal for those who need to be connected to the cloud at all times.

The device is expected to start with relatively few features but eventually, it will become more impressive as the Android app developers develop software for it.

The glasses will get data and information from an app installed on a user’s Android device.

This technology will change the way we experience and work with computers and smartphones. It will also bring new possibility for the android application developers to create apps specifically for the Vuzix smart glasses.

Christmas Tree Puzzle – A Fun And Relaxing Game At Google Play

At Andolasoft, we love creating the best games for android devices. If you are looking for a relaxing game, you would definitely appreciate the Christmas tree puzzle game developed by our android developers. Your kids would like it for sure!

The game consists of many pieces of a Christmas tree, arranged randomly. While starting the game the user has an option for preview how the tree would look like.

The player needs to drag and drop the pieces and try to set it up until the original tree is formed. It includes a ticking timer to display time taken to complete the puzzle, the faster it is complete, better is the score.

Never miss an update from us. Join 10,000+ marketers and leaders.

As the app is a puzzle and requires focus to complete the game, hence it helps to develop an attitude to set goals and to complete the task in their real life.

It is challenging and keeps the player amused for hours, so this is the game you would like to play. The app has also proved to be a good stress buster for the players.

The sound effects and the music are also pleasing to ears and not to mention it helps putting the player in a relax mood.

It is a simple app for an android phone, but it surely is a fun game for kids and a stress reliever for you after long hours of work on your job. You can download and install this awesome android app from Google Play.

GPB

Andolasoft has been developing fantastic android mobile applications for individuals and from start-ups to established companies. We’ve an excellent team of android app developers providing the most innovative apps as per the requirements. To know more about our cool android apps view the android application development page.