Homework 2 – thompbla
For this assignment I decided to create a simple notepad application. I wanted to create this application because I felt that others were too complex for what I want to use a note/tasklist application for. I used the rattler main view and edit view with slight modification because it was close to what I was hoping for. This note application allows you to title notes and add contents, formatting of your own free will. Along with editing and deleting, the special feature I added was the ability to send your notes as a text message to recipients which I find to be a very handy feature.
After attempting to implement my own SMS system I found out that it was a simple process to just create an intent and pass along the appropriate text, which would allow the user to use their favorite SMS app instead of a clunky interface of my making.
dialog.setPositiveButton("Text It", new DialogInterface.OnClickListener(){ @Override public void onClick(DialogInterface arg0, int arg1) { Intent sendIntent = new Intent(Intent.ACTION_VIEW); sendIntent.putExtra("sms_body", "This will be the SMS content of the body"); sendIntent.setType("vnd.android-dir/mms-sms"); startActivity(sendIntent); } );
With that that simple intent you are able to push the text to the sms app.