mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-27 00:15:51 -04:00
Create logic for call android native image picker
This commit is contained in:
parent
59b77da6a2
commit
2cb6742dbc
6 changed files with 87 additions and 1 deletions
28
retroshare-qml-app/src/androidimagepicker.h
Normal file
28
retroshare-qml-app/src/androidimagepicker.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
#ifdef __ANDROID__
|
||||
# include <QtAndroid>
|
||||
# include <QtAndroidExtras/QAndroidJniObject>
|
||||
#endif // __ANDROID__
|
||||
|
||||
struct AndroidImagePicker : QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public slots:
|
||||
|
||||
static void openPicker()
|
||||
{
|
||||
qDebug() << "Starting image picker intent";
|
||||
|
||||
#ifdef __ANDROID__
|
||||
QAndroidJniObject::callStaticMethod<void>(
|
||||
"org/retroshare/android/qml_app/RetroshareImagePicker",
|
||||
"imagePickerIntent",
|
||||
"()Landroid/content/Intent;" );
|
||||
#endif // __ANDROID__
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue