android-contentprovider

How to use support FileProvider for sharing content to other apps?

拜拜、爱过 提交于 2019-11-26 00:25:02
问题 I\'m looking for a way to correctly share (not OPEN) an internal file with external application using Android Support library\'s FileProvider. Following the example on the docs, <provider android:name=\"android.support.v4.content.FileProvider\" android:authorities=\"com.example.android.supportv4.my_files\" android:grantUriPermissions=\"true\" android:exported=\"false\"> <meta-data android:name=\"android.support.FILE_PROVIDER_PATHS\" android:resource=\"@xml/my_paths\" /> </provider> and using

CursorLoader usage without ContentProvider

孤街浪徒 提交于 2019-11-25 23:33:46
问题 Android SDK documentation says that startManagingCursor() method is depracated: This method is deprecated. Use the new CursorLoader class with LoaderManager instead; this is also available on older platforms through the Android compatibility package. This method allows the activity to take care of managing the given Cursor\'s lifecycle for you based on the activity\'s lifecycle. That is, when the activity is stopped it will automatically call deactivate() on the given Cursor, and when it is