Review Request: Allow Android Intents to be sent to the application.

/#!/JoePea trusktr at gmail.com
Sat Jan 5 23:07:13 UTC 2013


This is some nice android-specific stuff. It'd be really nice if we had
some type of C++ and JavaSvript (QML) abstaction to let us access camera,
gyroscope, compass, LED light, etc, for iPhone, Android, BlackBerry, etc.

It'd be similar to PhoneGap (Cordova), but we'd be using Qt/QML instead of
HTML5. Such a project would be amazing.

/#!/JoePea
   This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108165/
   src/plugins/platforms/android/src/androidjnimain.cpp<http://git.reviewboard.kde.org/r/108165/diff/3/?file=104581#file104581line1097>
(Diff
revision 3)

static void onNewIntent(JNIEnv * env, jobject thiz, jstring url) {

   1097

    const char *nativeString = env->GetStringUTFChars(url, 0);

  Sorry, I just seen another one.
Please change the following three lines to:

    const jchar * jstr = env->GetStringChars(url, 0);
    QUrl qurl(QString((const QChar*)jstr,  env->GetStringLength(url)));
    env->ReleaseStringChars(url, jstr);

This way you are avoiding two useless conversions:
UTF16 to UTF8 and UTF8 to UTF16


- BogDan

On January 4th, 2013, 4:39 p.m., Micke Prag wrote:
  Review request for Necessitas.
By Micke Prag.

*Updated Jan. 4, 2013, 4:39 p.m.*
Description

This patch makes it possible to call an Android/Qt application using
Intents. The data (url) will be forwarded to the QApplication as a
QFileOpenEvent

  Testing

Tested on Cube U30GT

  Diffs

   - src/android/jar/src/org/kde/necessitas/industrius/QtActivityDelegate.java
   (0e147ac)
   - src/android/jar/src/org/kde/necessitas/industrius/QtNative.java
   (0c0707f)
   - src/android/jar_4/src/org/kde/necessitas/industrius/QtNative.java
   (2c8dd8b)
   - src/plugins/platforms/android/src/androidjnimain.cpp (6b5229a)

View Diff <http://git.reviewboard.kde.org/r/108165/diff/>

_______________________________________________
Necessitas-devel mailing list
Necessitas-devel at kde.org
https://mail.kde.org/mailman/listinfo/necessitas-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/necessitas-devel/attachments/20130105/79ff41d7/attachment.html>


More information about the Necessitas-devel mailing list