简体   繁体   中英

How do I raise an Android Intent using Qt Necessitas SDK?

I'm developing an Android application using C++ and Qt Necessitas SDK. My application should load/save files and I want to handle it using Android actions ( so that I can target Google Drive as well as Dropbox etc... )

The question is... how do I raise Intents ( and which Intent should I raise to share/import my files ) from C++ ?

Rationale: how do I load and save files ( either custom mimetype, or pdf ) using Qt Necessitas on Android?

I'm a complete newbie to java and I know nothing of JNI, but apparently this link will explain how to [use the JNI to] use intents in your QT for Android applications: http://community.kde.org/Necessitas/JNI

It looks pretty straightforward, but I'm afraid I don't yet understand what I'm reading enough to give you a better answer to your question.

Sources:

  • groups.google.com/forum/?fromgroups=#!topic/android-qt/U3eHis9mLrg
  • groups.google.com/forum/?fromgroups=#!topic/android-qt/UpgBRz8Imwo

Another option for a some things (opening websites, making phone calls, possibly opening local PDFs and images) would apparently be QDesktopServices::OpenURL() - although that seems to give open-only access (ie, opening the resource but not pulling any data back from it).

I'm interested in this so that I can use the barcode scanner app "ZXING", which has an intent-as-url at http://zxing.appspot.com/scan - I don't know what other little secrets are out there...

HTH until someone can give you a better answer

(2 links disabled due to insufficient reputation)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM