package cl.json.social;

import android.content.ActivityNotFoundException;
import android.content.Intent;
import java.io.File;
import android.os.Environment;
import android.net.Uri;

import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReadableMap;

/**
 * Created by Muhzi4u on 14-01-19.
 */
public class SMSShare extends SingleShareIntent {

    private static final String PACKAGE = "com.android.mms";
    private static final String PLAY_STORE_LINK = "market://details?id=com.android.mms";
    
    public SMSShare(ReactApplicationContext reactContext) {
        super(reactContext);
    }

    @Override
    public void open(ReadableMap options) throws ActivityNotFoundException {
        super.open(options);
        //  extra params here
        this.openIntentChooser();
    }

    @Override
    protected String getPackage() {
        return PACKAGE;
    }

    @Override
    protected String getDefaultWebLink() {
        return null;
    }

    @Override
    protected String getPlayStoreLink() {
        return PLAY_STORE_LINK;
    }
}

@@ -174,16 +174,51 @@
 net.Uri;
+%0Aimport android.provider.Telephony;
 %0A%0Aimport
@@ -555,24 +555,82 @@
 ndroid.mms%22;
+%0A%0A    private ReactApplicationContext reactContext = null;
 %0A    %0A    pu
@@ -712,16 +712,58 @@
 ntext);%0A
+        this.reactContext = reactContext;%0A
     %7D%0A%0A 
@@ -958,32 +958,32 @@
 %0A%0A    @Override%0A
-
     protected St
@@ -998,24 +998,163 @@
 Package() %7B%0A
+        if (android.os.Build.VERSION.SDK_INT %3E= 19 ) %7B%0A            return Telephony.Sms.getDefaultSmsPackage(this.reactContext);%0A        %7D%0A
         retu

fix android share issue