mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Android: notify the UI a dive computer was plugged in
And try to guess which one from the device string we get from the Intent. The function is named to indicate its future use (because once the user plugs in such a device, we should show the download page). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a3ddd823bb
commit
0b242bcaca
3 changed files with 11 additions and 1 deletions
|
@ -175,6 +175,9 @@ Java_org_subsurfacedivelog_mobile_SubsurfaceMobileActivity_setDeviceString(JNIEn
|
|||
const char *deviceString = env->GetStringUTFChars(javaDeviceString, NULL);
|
||||
Q_UNUSED (obj)
|
||||
LOG(deviceString);
|
||||
#if defined(SUBSURFACE_MOBILE)
|
||||
QMLManager::instance()->showDownloadPage(deviceString);
|
||||
#endif
|
||||
env->ReleaseStringUTFChars(javaDeviceString, deviceString);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1776,3 +1776,10 @@ int QMLManager::getDetectedProductIndex(const QString ¤tVendorText)
|
|||
{
|
||||
return m_device_data->getDetectedProductIndex(currentVendorText);
|
||||
}
|
||||
|
||||
void QMLManager::showDownloadPage(QString deviceString)
|
||||
{
|
||||
// inform the QML UI that it should show the download page
|
||||
m_pluggedInDeviceName = strdup(qPrintable(deviceString));
|
||||
emit pluggedInDeviceNameChanged();
|
||||
}
|
||||
|
|
|
@ -192,7 +192,7 @@ public slots:
|
|||
void quit();
|
||||
void hasLocationSourceChanged();
|
||||
void btRescan();
|
||||
|
||||
void showDownloadPage(QString deviceString);
|
||||
|
||||
private:
|
||||
BuddyCompletionModel buddyModel;
|
||||
|
|
Loading…
Reference in a new issue