39717

How to display android sms inbox

Question:

Notification notifyDetails = new Notification(R.drawable.msg,"message received",System.currentTimeMillis()); PendingIntent myIntent = PendingIntent.getActivity(context, 0, new Intent(Intent.ACTION_VIEW), 0);

I am using broadcast receiver to notify for incoming message. i am able to display my own notification in notification bar when message is received. i need when user clicks it it go to Inbox or currently received message.

PendingIntent myIntent = PendingIntent.getActivity(context, 0, new Intent(Intent.ACTION_VIEW, People.CONTENT_URI), 0); // notifyDetails.setLatestEventInfo(context, "Time has been Reset", "Click on me to view Contacts", myIntent);

like here when user click it goes to contacts in android. so what i pass in intent that when user clicks it goes to inbox.

Answer1:

Answer from <a href="http://www.anddev.org/open_sms_activity-t6375.html" rel="nofollow">http://www.anddev.org/open_sms_activity-t6375.html</a>:

String SMS_MIME_TYPE = "vnd.android-dir/mms-sms"; Intent defineIntent = new Intent(Intent.ACTION_MAIN); defineIntent.setType(SMS_MIME_TYPE); PendingIntent pendingIntent = PendingIntent.getActivity(context, 0 , defineIntent, 0);

Recommend

  • cross combine two RDDs using pyspark
  • Error casting Object[] to ContentValues[]
  • Receive a notification (via BroadcastReceiver) when GPS (or location services) is started/stopped
  • Delete contact from android contacts
  • Clear chrome browser history programmatically
  • socket.io with node.js not working as expected
  • AnalyticsReceiver in Google Analytics Tracking
  • PHPUnit picking up on syslog messages?
  • How to wait for a thread to finish execution in C#?
  • Push notifications don't work
  • Best strategy to handle incoming midi signal from MIDIReadProc in cocoa
  • Can't access my folder because of WordPress [closed]
  • Android CalendarContract, deleting a recurring event causes all events to disappear on calendar?
  • How can i get the document title in Office 365 JavaScript API?
  • Open view controller when remote notification pressed
  • xcode 4.3.2 process hangs
  • Custom partiotioning of JavaDStreamPairRDD
  • NodeJS using node-serialport sometimes becomes unresponsive
  • Thread Synchronization with IntentService
  • Title cutoff in tabbed page in Xamarin.Forms
  • Trouble downloading file from browser on Android
  • Reload UITableView from another tab
  • Xamarin - is there a way to notify Xamarin.Forms from a native project?
  • How to force refresh on CallLog.Calls.CACHED_NAME column?
  • Call a php script whenever an e-mail is received?
  • Sending Content-Type application/x-www-form-urlencoded WSO2 ESB
  • Deleting a widget from QTableView
  • ConnectivityManager.CONNECTIVITY_ACTION deprecated
  • PushKit for VOIP iOS apps
  • Why cepheus don't send int without quotes to orion?
  • Change multiple background-images with jQuery
  • Align navbar back button on right side
  • Submit form in a displaytag pagination
  • Window Size for Mac application
  • ActionScript 2 vs ActionScript 3 performance
  • To display the title for the current loaction in map in iphone
  • Traverse Array and Display in markup
  • VB.net deserialize, JSON Conversion from type 'Dictionary(Of String,Object)' to type '
  • How to set the response of a form post action to a iframe source?
  • How to push additional view controllers onto NavigationController but keep the TabBar?