public class

MegacoolFileProvider

extends ContentProvider
java.lang.Object
   ↳ ContentProvider
     ↳ co.megacool.megacool.MegacoolFileProvider

Class Overview

This is a helper class to serve media attached to shares from the SDK.

You generally do not need to interface with this class directly, in native Android applications this is managed automatically for you. Under Unity the changes necessary will be automatically added to the application manifest by our Unity plugin, you can verify this by checking that your manifest contains a section like

 <!-- Register Megacool as a file provider to enable sharing GIFs -->
 <provider
   android:name="co.megacool.megacool.MegacoolFileProvider"
   android:authorities="YOUR_PACKAGE_NAME_HERE.megacool_file_provider"
   android:exported="false"
   android:grantUriPermissions="true">
   <meta-data
     android:name="android.support.FILE_PROVIDER_PATHS"
     android:resource="@xml/megacool_paths"/>
 </provider>
 

Summary

Public Constructors
MegacoolFileProvider()
Public Methods
void attachInfo(Context context, ProviderInfo info)
int delete(Uri uri, String selection, String[] selectionArgs)
String getType(Uri uri)
static Uri getUriForFile(Context context, String authority, File file)
Uri insert(Uri uri, ContentValues values)
boolean onCreate()
ParcelFileDescriptor openFile(Uri uri, String mode)
Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)
int update(Uri uri, ContentValues values, String selection, String[] selectionArgs)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MegacoolFileProvider ()

Public Methods

public void attachInfo (Context context, ProviderInfo info)

public int delete (Uri uri, String selection, String[] selectionArgs)

public String getType (Uri uri)

public static Uri getUriForFile (Context context, String authority, File file)

public Uri insert (Uri uri, ContentValues values)

public boolean onCreate ()

public ParcelFileDescriptor openFile (Uri uri, String mode)

Throws
FileNotFoundException

public Cursor query (Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)

public int update (Uri uri, ContentValues values, String selection, String[] selectionArgs)