Open Elitebigboss90 opened 5 years ago
If you don't have the permission in the Android manifest I've found this library seems to fail silently (even if you do requestPermission
from the JS side). Please confirm you've that setup per README instructions.
@blackxored Hi, thank you for your reply. I have double checked and I do have permission in manifest.
I will try to repo this in a clean project with expokit.
same issue here, the startActivityForResult has not result code I found out the problem, thanks.
@Elitebigboss90 Were you able to fix this?
@ghostknow how did you fix it? I am also having this problem, running expokit.
I was able to 'fix this' by completely removing expokit. I used react-native init to create a new project, then copied my package.json, app/ folder, and platform specific configurations over and it was working after that. You can't just eject to expokit; and unfortunately you can't create an expo project and then eject to react native, that wont work either. You need to react-native init from scratch.
Unfortunately ejecting expo and running expokit comes with its own share of incompatibility i guess.
same issue here, the startActivityForResult has not result code I found out the problem, thanks.
How did you fix this?
same issue here, the startActivityForResult has not result code I found out the problem, thanks.
How did you fix this?
you can try this @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); mReactInstanceManager.onActivityResult( this, requestCode, resultCode, data ); }
Hi, I am working on a project and using this library. It works on iOS version without a problem but on Android, I cannot have any callback from it.
async launchImagePicker(type: "library" | "camera" = "library") { let result=[]; console.log("type",type) switch (type) { case "library": await ImagePicker.openPicker({multiple:true}).then(images=>{console.log(images),result=images}).catch(e=>{console.log(e)}); break case "camera": await ImagePicker.openCamera({width: 300, height: 400, cropping: true}).then(image=>{console.log(images),result=image}).catch(e=>{console.log(e)}); break }
I am doing something like this. Since I can perfectly have all I need on iOS, so it won't be the js part problem.
So I begin to check if there any issue with installation in Android Studio. After check, i think we may need a callback handler in MainActivity because I am using expoKit and my MainActivity is not instance of ReactActivity.
this is my MainActivity,
public class MainActivity extends DetachActivity {
@Override public String publishedUrl() { return "exp://exp.host/@chipske/redwood"; }
@Override public String developmentUrl() { return DetachBuildConstants.DEVELOPMENT_URL; }
@Override public List sdkVersions() {
return new ArrayList<>(Arrays.asList("27.0.0"));
}
@Override public List reactPackages() {
return ((MainApplication) getApplication()).getPackages();
}
@Override public boolean isDebug() { return BuildConfig.DEBUG; }
@Override public Bundle initialProps(Bundle expBundle) { // Add extra initialProps here return expBundle; } }
Can someone help me to confirm it's the issue?