Skip to content

Allow adding activities to the manifest #1213

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

Merged
merged 1 commit into from
Jan 19, 2018
Merged

Conversation

bauerj
Copy link
Contributor

@bauerj bauerj commented Dec 29, 2017

This allows users to add their own activities to the manifest file. This can be used to start Java activities using pyjnius, e.g.:

        PythonActivity = autoclass('org.kivy.android.PythonActivity')
        SimpleScannerActivity = autoclass("org.electrum.qr.SimpleScannerActivity")
        Intent = autoclass('android.content.Intent')
        intent = Intent(PythonActivity.mActivity, SimpleScannerActivity)
        activity.bind(on_activity_result=on_qr_result)
        PythonActivity.mActivity.startActivityForResult(intent, 0)

This will be used in Electrum to scan QR codes using an embedded copy of zxing for Android.

@ecdsa
Copy link

ecdsa commented Dec 30, 2017

this works for me

@inclement inclement merged commit c61c36a into kivy:master Jan 19, 2018
@inclement
Copy link
Member

Looks good, thanks.

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

Successfully merging this pull request may close these issues.

3 participants