INTENT for OruxmapsDonate

Started by wolfgang61, January 06, 2019, 02:13:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wolfgang61

Hi,



I noticed that v7.3.7 on the home page has been there for quite some time. Then I discovered that the Google Play Version is already 7.4.12, so I installed that.



Now I have two separate apps which do not share configuration and offline maps.



I can reach v7.3.7 with com.oruxmaps.INTENT_START_RECORD_NEWTRACK, this works fine.

But what is the corresponding command for OruxmapsDonate v7.4.12? com.oruxmapsDonate... does not work.



And - is there an easy way to copy all settings from Oruxmaps to OruxmapsDonate?



As someone who uses Oruxmaps on more than one device, it would be quite helpful to have functions for exporting/importing settings.

wolfgang61

#1
now I found in the user manual I need to reemplazar ​com.oruxmaps por com.oruxmapsDonate​ ​para​ ​la​ ​versión​ ​Donar



but this does not work. The following code works for appName="com.orux.oruxmaps" but not for appName="com.orux.oruxmapsDonate"



internal fun broadcastToOrux(intentName: String) {
    usingOruxmaps()?.let { appName ->
        try {
            listOf("com.oruxmapsDonate","com.orux.oruxmaps","com.oruxmaps","com.oruxmapsdonate",
                    "com.oruxmaps","com.orux.oruxmapsdonate","com.orux.oruxmapsDonate").forEach {
                val intent = Intent("$it.INTENT_$intentName")
                intent.setClassName(appName, "$appName.actividades.TaskIntentReceiver")
                appContext.sendBroadcast(intent)
            }
        } catch (e: ActivityNotFoundException) {
            logError { "$e" }
        }
    }
}

fun startOruxmaps() {
    broadcastToOrux("START_RECORD_NEWTRACK")
    logStartStop(R.string.started_oruxmaps)
}


wolfgang61

#2
I found the solution at https://www.oruxmaps.com/foro/viewtopic.php?t=4310#p13140">https://www.oruxmaps.com/foro/viewtopic ... 310#p13140">https://www.oruxmaps.com/foro/viewtopic.php?t=4310#p13140



Could you please put that into oruxmapsmanual.pdf? I checked the Spanish version.



And I found out that both the free and the Donate version share the same directories for data, including oruxmapstracks.db. I wonder what happens if both apps are installed and one of them upgraded the data base scheme. Will the other possibly outdated app be able to handle that?



My question about exporting/importing settings remains open. Would you consider that?