Month: May 2012

SMSBackup Tool now available in Android Market

Posted on

The complete inbox backup application SMSBackup Tool is now available on Google Play. The application allows user to take backup of the inbox and restoring it back when needed. The application comes handy when the user wants to format the device and but doesn’t want to delete his favorite SMS. The internal viewer allows to view the backup contents in the phone. The application features option to export the backup data into four different file formats such as

  • CSV (Comma Separated Values)
  • HTML tabular format
  • XML
  • Plain Text File

Click on the following link  to download the application from Google Play

Get it on Google Play

The application will provide option for uploading the backups to cloud storage in the coming version.So keep visiting..

Hope you all will give your valuable feedback and ratings about the application.

SMSBackup Tool for Android Coming Soon

Posted on Updated on

As we all know Google Android is one of the most popular and advanced mobile operating system. The latest release Ice cream sandwich has many more new features compared to the previous version of Android OS. But apart from all those advanced features the OS lacks few basic features such as basic Notepad/Memo feature, provision for copying messages etc. For these features user has to rely on  third party applications.

Here I introduce a new application SMSBackup Tool for Android which provides complete solution for creating SMS backups. Some of the salient features of the application are

  • Create SMS backups.
  • View the backup data with the inbuilt viewer in tabular format.
  • Export the backup data as CSV (Comma Separated Values) or HTML format.
  • Provision to upload the backup file to DROPBOX cloud storage service. [Implementation in progress]

 


Eclipse issue in android dynamic table

Posted on Updated on

As I discussed in my previous post creating Dynamic TableLayout in Android . Here an issue arises in Eclipse while using TableLayout with layoutParams . Eclipse will  wrongly add the following import

import android.view.ViewGroup.LayoutParams;

In such cases even after executing the program without any errors it wont show any table or any data. It will only  show blank display. So inorder to overcome the issue just replace with the following import.

import android.widget.TableRow.LayoutParams;

After replacing run the project and view the output.

(Wasted several hours because of this silly issue while creating dynamic table in android. Thanks to stackoverflow)

Update for GeoTagIP and DroidLog

Posted on Updated on

The updated versions of GeoTagIP and DroidLog are now available in Google Play. The change log of each versions are given below

GeoTagIP v1.3

  • Auto complete textbox.
  • Application log viewer.
  • Option to export log to text file.
  • NPE fix.
  • Improved Exception handling.

Click to download GeoTagIP
Android app on Google Play

DroidLog v1.2

  • NPE fix in network usage tab.

Click to download DroidLog
Android app on Google Play

Accessing “data” folder in real devices with root access

Posted on Updated on

In this post I am going to demonstrate how to access system folder ie “data” folder in real android devices using DDMS. At times it is necessary to view the contents of  ‘data’ folder which contains all the files such as shared preferences, database or text file of a particular application. By default data folder is accessible while using an emulator but while using real devices the folder is private and it is not accessible by using DDMS. The hierarchy of data folder is shown 

(Image courtesy: Xplore File Explorer for Android)

So inorder to get access use the following steps

  • Connect your device. Make sure that device has ROOT access.
  • Open command prompt (For windows).
  • Set path for android platform tools ie set path=”C:\Program Files\Android\android-sdk\platform-tools” and type enter.
  • Type adb devices and make sure that the phone is listed after executing the command.
  • Type adb shell.
  • Type su.
  • Type chmod  777  /data  /data/data  /data/data/<packagename>/*
  • For example chmod  777  /data  /data/data  /data/data/com.sample.app/*
  • Now goto DDMS and check whether the data folder is accessible.

Dynamic Tablelayout in Android

Posted on Updated on

In this tutorial I am gonna to discuss about creating tablelayout dynamically during run-time. Dynamic tablelayout is useful while displaying data from a database or from a multiple list. The following are steps

  • Open eclipse and create a new Android project.
  • Create a database in our project (Only for tutorial purpose you can use the existing database in your project).
          try
             {
               database=openOrCreateDatabase(DBNAME, Context.MODE_PRIVATE, null);
               database.execSQL("CREATE TABLE IF NOT EXISTS "+ TABLE +" (ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL                                , NAME TEXT, LOCATION TEXT);");
               database.close();
            }
        catch(Exception e)
           {
               Log.e("Database Creation", "Error "+e.toString());
           }
  • Insert values into the database
        try
          {
              database=openOrCreateDatabase(DBNAME, Context.MODE_PRIVATE, null);
              database.execSQL("INSERT INTO " + TABLE + "(ID,NAME, LOCATION) VALUES(1,'ANTHONY','INDIA')");
              database.execSQL("INSERT INTO " + TABLE + "(ID,NAME, LOCATION) VALUES(2,'SHUING','USA')");
              database.execSQL("INSERT INTO " + TABLE + "(ID,NAME, LOCATION) VALUES(3,'JAMES','CHINA')");
              database.execSQL("INSERT INTO " + TABLE + "(ID,NAME, LOCATION) VALUES(4,'SOORYA','EUROPE')");
              database.execSQL("INSERT INTO " + TABLE + "(ID,NAME, LOCATION) VALUES(5,'MALIK','SRILANKA')");
              database.close();
           }
      catch(Exception e)
           {
               e.printStackTrace();
           }
  • Now in the main.xml add the following widgets
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 android:orientation="vertical" >
<ScrollView
 android:id="@+id/scrollView1"
 android:layout_width="match_parent"
 android:layout_height="wrap_content" >
<LinearLayout
 android:id="@+id/linearLayout1"
 android:layout_width="match_parent"
 android:layout_height="match_parent" >
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:id="@+id/tableLayout1"
 android:layout_width="wrap_content"
 android:layout_height="match_parent"
 android:stretchColumns="0,1" >
<TableRow
 android:id="@+id/tableRow1"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content" >
<TextView
 android:id="@+id/textView1"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:text="No."
 android:textAppearance="?android:attr/textAppearanceMedium" />
 <TextView
 android:id="@+id/textView2"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:text="NAME"
 android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
 android:id="@+id/textView3"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:text="LOCATION"
 android:textAppearance="?android:attr/textAppearanceMedium" />
 </TableRow>
 </TableLayout>
 </LinearLayout>
 </ScrollView>
</LinearLayout>
  • Now in the display function initialize three TextViews and TableRow as follows
TableLayout tableLayout;
 TableRow row;
 TextView firstCol;
 TextView secondCol;
 TextView thirdCol;
database=openOrCreateDatabase(DBNAME, Context.MODE_PRIVATE, null);
 if(database!=null)
     {
          Cursor cursor=database.rawQuery("SELECT * FROM "+ TABLE, null);

            Integer index0=cursor.getColumnIndex("ID");
            Integer index1 = cursor.getColumnIndex("NAME"); 
            Integer index2 = cursor.getColumnIndex("LOCATION");
              if(cursor.getCount()>0)
                 {
                  cursor.moveToFirst();
                  do
                     {
                      row=new TableRow(this);
                      row.setId(100);
                      row.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT)); 

             /*Setting up the first coloumn parameters*/
              firstCol=new TextView(this);
              firstCol.setText(cursor.getString(index0));
              firstCol.setTextSize(16);
              firstCol.setTextColor(Color.GREEN);
              firstCol.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
              row.addView(firstCol); //adding coloumn to row
            /*Setting up the second coloumn parameters*/ 
              secondCol=new TextView(this);
              secondCol.setText(cursor.getString(index1));
              secondCol.setTextColor(Color.YELLOW);
              secondCol.setTextSize(16);
              secondCol.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
              row.addView(secondCol); //adding coloumn to row

            /*Setting up the third coloumn parameters*/
              thirdCol=new TextView(this);
              thirdCol.setText(cursor.getString(index2));
              thirdCol.setTextColor(Color.MAGENTA);
              thirdCol.setTextSize(16);
              thirdCol.setLayoutParams(new LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
              row.addView(thirdCol); //adding coloumn to row
            /*Adding the row to the tablelayout*/
              tableLayout.addView(row,new TableLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));

          }while(cursor.moveToNext());
     database.close();
 }
 else
 {
             Toast.makeText(getBaseContext(), "NOT AVAILABLE", Toast.LENGTH_LONG).show();
 }
 }
  • Run the project. After successful execution the following will be the output

Click the following link to download the entire sample project

DOWNLOAD SAMPLE PROJECT