0

要在 phonegap 中通过 SMS 发送图像,请遵循本教程http://tech.sarathdr.com/featured/social-share-plugin-for-android-cordova-2-2-0-email-sms-facebook-twitter-share /在 phonegap 中,代码应该像这样给出

    uris.add(Uri.parse(“android.resource://” + getPackageName() + “/” + R.drawable.file1));
    emailIntent.putExtra(Intent.EXTRA_STREAM, uris));
    startActivity(emailIntent); 

但是在这里,我不知道该用什么来代替

获取包名()

在这里,我将我的包名放置为

             uris.add(Uri.parse("android.resource://" + com.sarathdr.plugins.SocialShare() + "/" R.drawable.background));

com.sarathdr.plugins 无法解析为一种类型,请任何人帮助我。

4

3 回答 3

0

packageName 是您的应用程序的标识符,在 AndroidManifest.xml 中定义。我认为它可能是您的应用程序中的“com.sarathdr.plugins”,您可以检查一下。

于 2013-09-10T07:11:59.027 回答
0

检查这可能是这个插件很容易集成..这里

于 2013-09-10T09:13:35.413 回答
0

尝试这个

 uris.add(Uri.parse("android.resource://" + this.cordova.getActivity().getPackageName() + "/" + R.drawable.file1));
    emailIntent.putExtra(Intent.EXTRA_STREAM, uris));
    startActivity(emailIntent);
于 2013-09-10T07:11:02.940 回答