Permalink
Browse files

minor bugfix in lookup of contacts and send messages in peer info act…

…ivity
  • Loading branch information...
1 parent 0b5c9d3 commit cccc2585208d706dec54119deffeb57682fbc51f techxplorer committed May 29, 2012
Showing with 3 additions and 4 deletions.
  1. +1 −0 AndroidManifest.xml
  2. +2 −4 src/org/servalproject/maps/PeerInfoActivity.java
View
@@ -39,6 +39,7 @@
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
+ <uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="org.servalproject.rhizome.ADD_FILE"/>
<uses-permission android:name="org.servalproject.rhizome.RECIEVE_FILE"/>
@@ -165,10 +165,8 @@ public void onClick(View v) {
break;
case R.id.peer_info_ui_btn_msg:
// message button was pressed
- mIntent = new Intent(Intent.ACTION_VIEW);
- mIntent.setType("vnd.android-dir/mms-sms");
- mIntent.putExtra("address", phoneNumber);
- startActivityForResult(mIntent, 0);
+ mIntent = new Intent(Intent.ACTION_SENDTO, Uri.parse("sms:" + phoneNumber));
+ this.startActivityForResult(mIntent, 0);
default:
// unknown view id
Log.w(TAG, "unkown view id in onClick: " + v.getId());

0 comments on commit cccc258

Please sign in to comment.