0

I am trying to use android.provider.Telephony.Mms.* items. However it isn't in the sdk. How do you about linking against those classes?

SamFisher83
  • 3,937
  • 9
  • 39
  • 52

2 Answers2

0

Mms and other apps use private or hidden APIs that are not available through the SDK. Third party apps can't use the private API for various reasons, one being security.

If you want to modify and build MMS you have to create your own ROM so you have to interact with the firmware build.

You can send an SMS/MMS via an itent with this code:

Intent sendIntent = new Intent(Intent.ACTION_SEND); 
sendIntent.putExtra("sms_body", "some text"); 
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(url));
sendIntent.setType("image/png"); 
Cilenco
  • 6,951
  • 17
  • 72
  • 152
  • I can not commit your post sry. It is an internal package in Android's source code. It is not intended to be used by other apps. But I added some code to my answer to send a MMS via an itent. – Cilenco May 27 '13 at 22:37
0

I can probably do it using this method: Where is com.google.android.mms.*?

Class pduparserclass = Class.forName("android.provider.Telephony.Mms.");

Community
  • 1
  • 1
SamFisher83
  • 3,937
  • 9
  • 39
  • 52