如何在意图选择器列表中包含短信?

发布于 2025-01-02 18:39:01 字数 1076 浏览 3 评论 0原文

我有以下代码:

cookieBitmap.compress(
                        Bitmap.CompressFormat.JPEG, 
                        100, 
                        new FileOutputStream(new File("/mnt/sdcard/cookie.jpg")));
                Intent picMessageIntent = new Intent(android.content.Intent.ACTION_SEND);
                picMessageIntent.setType("image/jpeg");
                File fortuneFile = new File("/mnt/sdcard/cookie.jpg");
                picMessageIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(fortuneFile));
                Log.i("INFO","At BEFORE INTENT");
                if (prepareTask.isCancelled()) {return false;}
                startActivity(Intent.createChooser(picMessageIntent, getString(R.string.sendcookieusing)));

在我的 Galaxy 上,选择器包括 Android 的短信应用程序。当我选择此选项时,它会启动操作系统的新文本活动,并将图像作为附加图片放置在文本中。但是,我在 myTouch 3G 和 myTouch 3G Slide 上运行了我的应用程序,但没有显示短信选项。我怎样才能使这些手机上可以选择发送图片短信?

有人遇到过这个问题吗?有多少型号的手机会出现这个问题?我的应用程序目前在市场上,但没有人下载。我应该有多少担忧?如果它只影响 myTouch 手机,我想我可以推迟几天修复这个问题。

谢谢

编辑:我认为这种情况发生在带有 HTC sense rom 的手机上。

I have the following code:

cookieBitmap.compress(
                        Bitmap.CompressFormat.JPEG, 
                        100, 
                        new FileOutputStream(new File("/mnt/sdcard/cookie.jpg")));
                Intent picMessageIntent = new Intent(android.content.Intent.ACTION_SEND);
                picMessageIntent.setType("image/jpeg");
                File fortuneFile = new File("/mnt/sdcard/cookie.jpg");
                picMessageIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(fortuneFile));
                Log.i("INFO","At BEFORE INTENT");
                if (prepareTask.isCancelled()) {return false;}
                startActivity(Intent.createChooser(picMessageIntent, getString(R.string.sendcookieusing)));

On my galaxy vibrant, the chooser includes android's text messaging app. When I pick this, it starts the operating system's new text activity and places the image in the text as an attached picture. However, I've ran my app on a myTouch 3G and a myTouch 3G Slide and the text messaging option does not show up. How can I make it so that to text message the picture is an option on those phones?

Has anyone experienced this problem? How many types of phones will have this problem? My app is currently on the market but no one has downloaded it. How much concern should I have? If it only affects myTouch phones I think I can put it off fixing this for a couple of days.

Thanks

EDIT: I think this happens on phones with HTC sense rom.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文