Comments (6)
@alinz hey I forked the repo and have it working for iOS, I'll submit a PR once we get it working for Android too.
from react-native-share-extension.
@asleepace, Don't use the data
method to grab the data for video, instead get the path of the video. And also share extension meant to be use to do one thing and one simple tasks. If you need to do more complex operation, you should prompt the user to go back to your main app and load the content there for further processing.
from react-native-share-extension.
@alinz awesome, thanks I will try that out! Also is there any way to determine the type before hand so I can either use the video url or get the data?
from react-native-share-extension.
My problem is slightly different, but the outcome is the same. There problem is when I click on share button in safari or anywhere else the app will freeze, but when I change background of view in MainInterface.storyboard to solid black, the view will be rendered. A black page will be appeared and because of that touches not working and it looks like the app is frozen. So, view will rendered but the react native will not start. Where I go wrong and how I fix it.
from react-native-share-extension.
@asleepace @vbashiri Did anybody find a solution please?
from react-native-share-extension.
@RAMON90 yes in the ShareModule.java
I modified the processIntent()
method to the following:
public WritableMap processIntent() {
WritableMap map = Arguments.createMap();
List<String> values = new ArrayList<>();
String type = "";
String action = "";
Activity currentActivity = getCurrentActivity();
if (currentActivity != null) {
Intent intent = currentActivity.getIntent();
action = intent.getAction();
type = intent.getType();
if (type == null) {
type = "";
}
if (Intent.ACTION_SEND.equals(action) && !type.equals("")) {
if ("text/plain".equals(type)) {
values.add(handleSendText(intent)); // Handle text being sent
} else {
values.add(handleSendFile(intent)); // Handle single file being sent
}
} else if (Intent.ACTION_SEND_MULTIPLE.equals(action) && !type.equals("")) {
values.addAll(handleSendMultipleFiles(intent)); // Handle single image being sent
} else {
// not ACTION_SEND or ACTION_SEND_MULTIPLE (will not happen)
// do nothing
}
} else {
// null activity
// do nothing
}
WritableArray files = Arguments.createArray();
for (String value : values) {
WritableMap file = Arguments.createMap();
file.putString("type", type);
file.putString("value", value);
files.pushMap(file);
}
map.putArray("files", files);
return map;
}
from react-native-share-extension.
Related Issues (20)
- Issue HOT 5
- Sharing from browser: real iOS device receives page title, simulators receive URL HOT 2
- Video File Issue? HOT 1
- Audio and Video share empty value problem HOT 5
- not able to share image from google photos when app in background HOT 1
- Share extension opens up different instance of application HOT 4
- This no longer works HOT 10
- Error after clicking on my app icon during sharing (Expokit, Android) HOT 1
- 0.62.2 (Podspec) HOT 1
- 0.62.2 issue HOT 2
- 🔥How to clear image from bundle when app goes in background after receiving image prop HOT 1
- Working in React Native 0.62.2 (iOS) HOT 18
- What file extensions are allowed? HOT 1
- ERROR: File not found #import "React/RCTBridgeModule.h" HOT 1
- Cannot find lDoubleConversion HOT 1
- share ActionExtension not working with firebase
- expo-dev-client / EAS build integration? HOT 1
- Not getting Url when sharing image from Google to share extension ( Android)
- Cant share screenshot on ios
- Invariant Violation: "passages" has not been registered. This can happen if:
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-share-extension.