Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to open camera? #143

Open
jasonsultana opened this issue Apr 23, 2020 · 2 comments
Open

How to open camera? #143

jasonsultana opened this issue Apr 23, 2020 · 2 comments

Comments

@jasonsultana
Copy link

jasonsultana commented Apr 23, 2020

Tried this:

var app = startApp.set({
    "intentstart": "startActivityForResult",
    "action": "ACTION_MAIN",
    "package": "com.capture"
}, {
    /* extras */
    "key": "CAMERA",
    "name": "abc"
});

app.start(function(response) {
    console.log(response);
}, function(error) {
    console.error(error);
});

But getting this error:

04-23 10:00:21.801 3955 3955 E AndroidRuntime: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=0, data=null} to activity {au.com.suttonssolutionsapp/au.com.suttonssolutionsapp.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.os.Bundle android.content.Intent.getExtras()' on a null object reference

Any tips?

@string-lzc
Copy link

Use import { Camera } from '@ionic-native/camera/ngx'; instead.

@lampaa
Copy link
Owner

lampaa commented Sep 29, 2020

#138

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants