Qt 5.2 or 5.3RC android app development and Google maps usage -
i'm using qt quick (qml) android (and ios) app development , got stuck google maps embeding. believe easiest , reasonable way use webview component. working fine on windows when coming android situation seems bit confusing. understand it's not possible use webview in android application @ moment due fact webkit / webkit widgets not supported in android. can see plan start supporting webengine module should trick. question be, there way embed google maps on android app @ @ moment or i'm in dead end?
another wild idea if qt jni calls can maybe me out here?
or anyother ways achive similar result?
thanks!
ِyou can use qdesktopservices open google map url :
qstring link = "http://maps.google.com/maps?&daddr="+location; qdesktopservices::openurl(link);
or use qt android extras module launch google map intent :
string uri = "http://maps.google.com/maps?&daddr="+location; intent intent = new intent(intent.action_view, uri.parse(uri)); intent.setclassname("com.google.android.apps.maps", "com.google.android.maps.mapsactivity"); if (intent.resolveactivity(m_context.getpackagemanager()) != null) { m_context.startactivity(intent); }
Comments
Post a Comment