小编Cec*_*aul的帖子

如何显示我们的应用程序(如 facebook)的多个图像共享选项?

我正在创建一个社交媒体应用程序,用户可以在其中共享图像、视频、音频等。通过在清单文件中添加以下代码,我成功地接收了从第三方应用程序共享的媒体。

<activity
        android:name=".activity.SendToActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.AppCompat.NoActionBar">
        <intent-filter>
            <action android:name="android.intent.action.SEND" />

            <category android:name="android.intent.category.DEFAULT" />

            <data android:mimeType="*/*" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.SEND_MULTIPLE" />

            <category android:name="android.intent.category.DEFAULT" />

            <data android:mimeType="*/*" />
        </intent-filter>
    </activity>
Run Code Online (Sandbox Code Playgroud)

现在,当用户尝试从他们的图库(如 facebook)(设置为个人资料图片)共享图片以直接上传个人资料图片时,我想显示我的应用程序的多个图标。请看截图

像facebook一样显示多个图标

当用户尝试从他们的图库中共享图像时,请有人帮助我显示我的应用程序的多个图标。

android image android-manifest share-intent

6
推荐指数
1
解决办法
136
查看次数

如何在ImageView中加载Cipher加密图像文件而不保存到设备

我正在创建一个具有内容安全性的应用程序,因为没有人可以复制内容和文件.我使用密码直接从URL加密图像,而不是下载到设备.请在下面找到我的代码.

URL url = new URL(images.getImageurl());
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setDoOutput(true);
File folder = new File(Environment.getExternalStorageDirectory(), "zerb");
boolean success = true;

if (!folder.exists()){
folder.mkdirs();
}
InputStream fis = connection.getInputStream();
String path = folder.getAbsolutePath() + "images.getImageName + ".jpg";
encryptfile(fis, path, AppConstants.password + images.getContentid() + images.getTopicid())
fis.close();
Run Code Online (Sandbox Code Playgroud)

密码加密方法代码是

private static boolean encryptfile(InputStream inputStream, String path, String password) throws IOException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException {

    FileOutputStream fos = new FileOutputStream(path.concat(".crypt"));
    byte[] key = (AppConstants.salt + password).getBytes("UTF-8");
    MessageDigest sha = MessageDigest.getInstance("SHA-1");
    key = …
Run Code Online (Sandbox Code Playgroud)

encryption android image imageview

5
推荐指数
1
解决办法
309
查看次数