Closed ckuethe closed 1 month ago
Share2Storage is able to receive the share from radiacode; here is its manifest... not very selective.
Thanks Chris!
This looks easy-enough to do.
Those dumps of the intents are really helpful - I hadn't known what was involved in the requests.
The android documentation has sample code for receiving as well.
I'll try to give look at this sometime in the next ~week, as well as looking at the issue of the soft-keyboard potentially blocking inputs, and if both things can be resolved, release a new version for Android.
Does it make sense for InterSpec to also be not very selective, and basically accept any file?
For Radiacode, XML looks sufficient, and we can also put in N42, SPC, TXT, PCF, etc., but it seems sometimes people use non-standard, or missing, file extensions, and may want to open files from other apps.
Or is it rude to put InterSpec on the list when you share any file?
I don't think it would be rude to allow InterSpec to offer to handle arbitrary content. No worse than:
If I share a spectrum to GPX Viewer, it just gives me a polite message that "This isn't a gpx, kml, kmz, or loc file." And as you say, people could be sharing content from any other app with any name, extension, or MIME type - and SpecUtils knows how to identify a file by content, not just by name.
I think accepting files directly from the Radiacode app should now be working, as of 040e7d2a7a110f209add5213270f5f77d006f42b.
I posted a build of the Android app at https://github.com/sandialabs/InterSpec/releases/tag/v1.0.13_rc1_android, but please note that if you are not using a floating keyboard (i.e., showing the keyboard changes the view size), the keyboard may cover up the input field, or maybe other layout issues - sorry, I haven't found a resolution to this yet... But if you are wiling to side-load the app and give it a try, I would appreciate.
Thanks @PlasmaHH and @ckuethe for pointing out the issue, and pointing to the solution!
It was pretty straight forward and easy to implement.
confirmed working with radiacode app 1.61.03, on Android 14.
share xml, select interspec app, and there it is. doesn't get much easier than that.
Thanks for the quick resolution @wcjohns
The keyboard issue on Android has been worked out, and an updated APK is available at https://github.com/sandialabs/InterSpec/releases/tag/v1.0.13_rc2
Loads file correctly from radiacode app, keyboard, view scroll, and input fields all behave reasonably. Show tool tabs works.
Thanks for checking this Chris!
Also works on my cheap android 11 tablet, using nextcloud as the data source. Both download+open_with, and "share/send" send data to the android app, which loads the files correctly. Keyboard and screen behave reasonably.
making a new issue so as not to clutter up #32...
The short version: maybe interspec needs to handle a
SEND
too, not just aVIEW
. Perhapsapplication/xml
andtext/xml
should both be accepted MIME types too.I found an app on F-Droid called "intent intercept" which seems to be a general receiver/inspector for any share intent (IPC message). here's what a share from radiacode looks like:
And here's what it looks like when nextcloud shares that same file:
Interspec is still not listed as a target for sharing, but by this time the spectrum has been synced to my phone and I can use "open with app..." which looks like this.
And that does show interspec as an eligible app. Here's the same "open with", but from Google drive.
And when I try to "send a copy" from Google drive, this intent is emitted, and interspec is not an available option.
I'll look at the android code tomorrow and see if I can get a better sense of what is actually going on. Nothing helps you learn like a real project or an actual problem to solve, right?