我在应用中添加了分享功能。以下是我的代码:
public static void shareData(String title, String message, Uri imageUri, Activity activity) {
try {
Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TITLE, title);
sendIntent.putExtra(Intent.EXTRA_SUBJECT, message);
if (imageUri != null) {
Logger.errorMessage(ShareUtil.class.getSimpleName(), "share if");
sendIntent.putExtra(Intent.EXTRA_STREAM, imageUri);
sendIntent.setType("image/*");
} else {
Logger.errorMessage(ShareUtil.class.getSimpleName(), "share else");
sendIntent.setType("text/plain");
}
activity.startActivity(Intent.createChooser(sendIntent, "Share using"));
} catch (Exception e) {
e.printStackTrace();
Toast.makeText(activity, "No App found to share", Toast.LENGTH_LONG).show();
}
}
这显示了应用列表,但是当我选择任何应用时,标题和消息都不会被发送。我没有得到我做错的事。
答案 0 :(得分:1)
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>"*"</string>
</array>
<key>CFBundleTypeName</key>
<string>Unknown</string>
<key>LSItemContentTypes</key>
<array>
<string>public.data</string>
</array>
</dict>
</array>
主要用于电子邮件。尝试将其替换为.col-md-6
position: relative
overflow: hidden
width: 100%
height: 25rem
padding: 0
&:hover .bg
-webkit-filter: grayscale(90%)
filter: grayscale(90%)
...
。这适用于大多数应用程序。