How does TC creates its intents to open files?

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
moving-bits
Junior Member
Junior Member
Posts: 2
Joined: 2020-04-13, 12:07 UTC

How does TC creates its intents to open files?

Post by *moving-bits »

Hello,

I'm a developer of the c:geo geocaching app for Android. We sometimes get some reports on support that users cannot open files for c:geo with TC4A.

c:geo is able to handle .gpx and .zip files (among others) which are either downloaded or stored locally using some form of file transfer.

While trying to reproduce and adapt our configuration I'm somewhat confused about how TC4A builds its intents for calling another app. Here is my way to reproduce the error:
  • Tap on a file supported by c:geo, eg: "GC4711.gpx" (which is basically an XML file with a geo track)
  • Select "Open with"
  • c:geo is listed with its handler (in my dev version this reads "cgeo.geocaching" in the first line and ".HandleLocalFilesActivity" in the second line)
  • selecting this I receive an error message:
    • Error opening file: c:geo Local file handler:cgeo.geocaching.HandleLocalFilesActivity
    • Unable to find explicit activity class {geo Local file handler:cgeo.geocaching/geo Local file handler:cgeo.geocaching.HandleLocalFilesActivity}; have you declared this activity in your AndroidManifest.xml?
The official intent should be "cgeo.geocaching.HandleLocalFilesActivity". As such it is declared in the AndroidManifest.xml and marked es "exported=true".
"Local file handler" is the activity's label, but even if I remove this, the error described above remains.
I don't know where the word "geo" comes from (see the error message above, after the "activity class" text), maybe it's some string parsing artifact coming from the app's name "c:geo"?

It would be nice if we can fix this somehow. Please let me know if you need more information, or if we can do something on our side. Thanks!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How does TC creates its intents to open files?

Post by *ghisler(Author) »

Yes, the problem comes from the ":" in your app title. Total Commander 3.0 will be able to handle that. It is currently used as a separator between name, app name, and class name.
Author of Total Commander
https://www.ghisler.com
moving-bits
Junior Member
Junior Member
Posts: 2
Joined: 2020-04-13, 12:07 UTC

Re: How does TC creates its intents to open files?

Post by *moving-bits »

Ah, I see. So there's nothing we can do about it yet (renaming "c:geo" is not an option :D ), but the problem will be solved with the upcoming version anyway.

Thanks for fixing that, and
Thanks for your reply!
Post Reply