Closed RaulPROP closed 3 years ago
@RaulPROP would you be able to add to the android java file after line https://github.com/RaulPROP/send-intent/blob/master/android/src/main/java/de/mindlib/sendIntent/SendIntent.java#L57:
ret.put("text", intent.getStringExtra(Intent.EXTRA_TEXT));
So it looks like:
ret.put("text", stringExtra);
}
call.resolve(ret);
} else if (type.startsWith("image/")) {
JSObject ret = new JSObject();
ret.put("image", encoder((Uri) intent.getExtras().get(Intent.EXTRA_STREAM)));
ret.put("text", intent.getStringExtra(Intent.EXTRA_TEXT));
call.resolve(ret);
} else if (type.equals("application/octet-stream")) {
JSObject ret = new JSObject();
This grabs any additional text send with an image through this intent plugin. Apps like zelando send data as type image but include important URL data in the additional text.
Additionally (i'm just integrating you code btw :) massive thanks for the upgrade)... the defiintions don't appear to include image for the base64:
https://github.com/RaulPROP/send-intent/blob/master/src/definitions.ts#L2
export interface SendIntentPlugin {
checkSendIntentReceived(): Promise<{
text?: string,
image?: string
}>;
}
With an image there might not be text and vice versa
Hi @j-d-carmichael ,
I've just added the changes, and also added file
to the typescript interface.
Hello,
first of all, thank you for your library, it is really useful :)
I've updated it to capacitor 3.0 following this guide.
While doing that I've cleaned up a bit the repo, removing the
.zip
files and adding a.gitignore
.I've also added ios to the example, updated the
README.md
and modified the mayor version of the package.Here's a list with all the changes:
README.md
the way to import the library in js.README.md
the Android plugin load code..zip
files..gitignore
file.ios
to the example.README.md
to showcase how to add the pod dependencyFBSDKCoreKit
.README.md
from html code to markdown.2.0.0
.Everything was tested on both android and ios using the example and the project that I'm using this library and it works.