Project Profile

Project Name: Auto SMS

Project Description: Android based Auto SMS application allows user to send SMS at deferred date and time.

Tools: Eclipse, Microsoft Office Visio for Diagram. Microsoft Office Word for Documentation.

Development Platform: Android Development Tool

Development Model: OOSD Model

Operating System: Windows 7

  1. Tools and Technology 
  • Tools:

Operating System:

Front-End: Eclipse Helios 2.

Back-End:

  • Technology:

                   Android 2.3.3

  1. Planning  

Project Definition:

Android based Auto SMS application allows user to send SMS at deferred date and time.After the sms has been delivered, it will provide the sender with the delivery report along with the location of the receiver.Sender also get the delivery report and sound.This application works only with internet.User have internet connection in the android phone.

Auto SMS Android Project

Preliminary Investigation:

We know that in several mobile device which are providing facility for only alarm but not any other facility like sending sms, email etc so  we got an idea for create this application which is useful for sending message to wish and remind to others by messaging.

Selecting the project development Strategy:

The software development process also can be divided into smaller, interacting sub process.

Generally, the software development process can be viewed as a series of transformations, where the output of one transformation becomes the input of the subsequent transformation.

Develop Work Plan: 

  1. System Analysis 

Requirement Determination

            Input:

First user have to add the contact number.

Then select date and time and write Message.

Then click on send.

          Output:

When time is come which is set by user the application will automatically start and inform to user for event. 

Feasibility Study:

                        Technical Feasibility:

  • The project is developed on i5 processor with 4 GB RAM.
  • The language used in development is Eclipse Helios 2 and

windows environment.

Economics Feasibility:

  • In this application internet is required in android mobile device. 

Requirement Specification:

Software Requirements:

Hardware Requirements:

                        System configuration: Windows OS 2GB RAM, 20 GB Hard Disk.

  1. System Design
  • System design is the process of planning of new systems or one to replace an existing system.
  • During this stage the analyst works with the user to develop a physical model of the system flow chart.
  • The modeling process and its outcome depend upon the system to a certain extent and whether or not object oriented design is followed.
  • The detailed step followed in arriving at the model is known as the methodology.
  • There are several methodologies available.
  • But currently the most popular methodology is known as the unified process.
  • The result of these is a model for the system typically contained in several diagrams.
  • If unified process is followed the diagrams that result might be UML diagrams.

Coding for how to send message, and add contact:-

</pre>
package com.message;

import java.util.ArrayList;

import android.app.Activity;

import android.app.PendingIntent;

import android.content.BroadcastReceiver;

import android.content.ContentValues;

import android.content.Context;

import android.content.Intent;

import android.content.IntentFilter;

import android.database.Cursor;

import android.net.Uri;

import android.os.Bundle;

import android.provider.ContactsContract;

import android.telephony.gsm.SmsManager;

import android.util.Log;

import android.view.View;

import android.view.View.OnClickListener;

import android.widget.Button;

import android.widget.EditText;

import android.widget.Toast;

public class SendmessageActivity extends Activity

{

protected static final int PICK_CONTACT = 0;

ArrayList<String> numsArray;

StringBuilder sb;

EditText etMessage, etBody;

&nbsp;

@Override
public void onCreate(Bundle savedInstanceState)

{

super.onCreate(savedInstanceState);

setContentView(R.layout.message);

numsArray = new ArrayList<String>();

sb = new StringBuilder();

Button btnAdd = (Button) findViewById(R.id.main_btn_add);

Button btnSend = (Button) findViewById(R.id.main_btn_send);

etMessage = (EditText) findViewById(R.id.main_edit_number);

etBody = (EditText) findViewById(R.id.main_edit_msg);

&nbsp;

btnSend.setOnClickListener(new OnClickListener()

{

public void onClick(View v)

{

Log.d("TAG", "In send .111....");

if (etBody.getText().toString().equalsIgnoreCase(""))

{

Toast.makeText(SendmessageActivity.this, "Enter Message", 100).show();

Log.d("TAG", "In send .....");

}

else

{

Log.d("TAG", "In send .222...."+numsArray.size());

String message = etBody.getText().toString();

String number = etMessage.getText().toString();

numsArray.add(number);

for (int i = 0; i < numsArray.size(); i++)

{

sendSMS(numsArray.get(i), message);

Log.d("TAG", "In else.....");

}

}

}

});

btnAdd.setOnClickListener(new OnClickListener()

{

public void onClick(View v)

{

Intent intent = new Intent(Intent.ACTION_GET_CONTENT

);

intent.setType(ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE);

startActivityForResult(intent, PICK_CONTACT);

}

});

}

@Override

protected void onActivityResult(int requestCode, int resultCode, Intent data)

{

super.onActivityResult(requestCode, resultCode, data);

if (requestCode == PICK_CONTACT && resultCode == RESULT_OK)

{

Uri contactData = data.getData();

Cursor c = getContentResolver().query(contactData,

new String[]

{

ContactsContract.CommonDataKinds.Phone.NUMBER,

ContactsContract.CommonDataKinds.Phone.TYPE

},

null, null, null);

if (c.moveToFirst())

{

String number = c.getString(0);

System.out.println("Number from piker....." + number);

numsArray.add(number);

System.out.println("Number from arraylist....."+ numsArray.get(0));

sb.append(number).append(",");

System.out.println("Number from Stringbuilder....."

+ sb.toString());

}

etMessage.setText(sb.toString());

}

}

protected void sendSMS(String phoneNumber, final String message)

{

String SENT = "SMS_SENT";

String DELIVERED = "SMS_DELIVERED";

PendingIntent sentPI = PendingIntent.getBroadcast(this, 0, new Intent(SENT), 0);

PendingIntent deliveredPI = PendingIntent.getBroadcast(this, 0,new Intent(DELIVERED), 0);

// ---when the SMS has been sent---

registerReceiver(new BroadcastReceiver()

{

public void onReceive(Context arg0, Intent arg1)

{

switch (getResultCode())

{

case Activity.RESULT_OK: ContentValues values = new ContentValues();

for (int i = 0; i < numsArray.size() - 1; i++)

{

values.put("address", numsArray.get(i).toString());

//  txtPhoneNo.getText().toString());

values.put("body", message);

}                                              getContentResolver().insert(Uri.parse("content://sms/sent"), values);

Toast.makeText(getBaseContext(), "SMS sending..",Toast.LENGTH_SHORT).show();

numsArray.clear();

break;

case SmsManager.RESULT_ERROR_GENERIC_FAILURE:

Toast.makeText(getBaseContext(), "Generic failure",Toast.LENGTH_SHORT).show();

break;

case  SmsManager.RESULT_ERROR_NO_SERVICE:

Toast.makeText(getBaseContext(), "No service",Toast.LENGTH_SHORT).show()

break;

case SmsManager.RESULT_ERROR_NULL_PDU:

Toast.makeText(getBaseContext(), "Null PDU",Toast.LENGTH_SHORT).show();

break;

case SmsManager.RESULT_ERROR_RADIO_OFF:

Toast.makeText(getBaseContext(), "Radio off",Toast.LENGTH_SHORT).show();

break;

}

}

},

new IntentFilter(SENT));

// ---when the SMS has been delivered---

registerReceiver(new BroadcastReceiver()

{

@Override

public void onReceive(Context arg0, Intent arg1)

{

switch (getResultCode())

{

case Activity.RESULT_OK:

Toast.makeText(getBaseContext(), "SMS               delivered",Toast.LENGTH_SHORT).show();

break;

case Activity.RESULT_CANCELED:

Toast.makeText(getBaseContext(), "SMS not delivered",

Toast.LENGTH_SHORT).show();

break;

}

}

},

new IntentFilter(DELIVERED));

SmsManager sms = SmsManager.getDefault();

sms.sendTextMessage(phoneNumber, null, message, sentPI, deliveredPI);

}}