How can I upload Kayaking or Rowing data via a TCX formatted file to Strava? - flutter

I'm recording workouts with a Flutter based mobile application. I can successfully upload bike workouts. https://github.com/BirdyF/strava_flutter/blob/master/lib/Models/activity.dart#L916 lists a pretty wide variety of sports. However I already noticed that "VirtualRide" reverts to a regular bike ride once it is uploaded to Strava.
Now as I'm uploading Kayaking data it also shows up as a bike ride as well (in the middle of a small lake). But at least it has the speed and the rpm (which is actually strokes per minute for kayaking). However if I switch that activity over to Kayaking on Strava's UI Strava stops showing the pace (speed) and the rpm.
I peeked at https://github.com/sanderroosendaal/rowingdata/blob/master/rowingdata/writetcx.py and that seems to output the rowing activities as "Other" sport. Its tests contain such TCXs as well. I just cannot believe TCX would be so limited. Does anyone have a pointer for me to solve this?
I'm outputting TCX because it's a textual format so it's easier to interpolate and debug than a binary FIT format. Since I can gzip it for upload its size is OK as well when compressed.

It seems that TCX is too limited file format with respect to sport selection. I develop FIT file based upload and that is able to carry Kayaking and many more sports.

Related

Providing EXIF-free images in a gallery or other webpage

First, thanks for any and all help regarding this topic.
Sites like Facebook and Twitter strip EXIF information from images as they are uploading. My goal is to allow users to upload images to our platform (working with Nextcloud and others) with full EXIF information, however, we need to display images that do not contain EXIF information or any metadata. Without stripping and creating a second, Exif-Free image for each, is it possible to simply hide that EXIF info so that, if a user downloads that image, the EXIF is not embedded?
We were told that the only way to do this is to have a second, exif-free copy (the order of when that's created is irrelevant pre/during/post upload). I'm hoping there's a way that we can simply display such a copy without doubling our physical space requirements.
Thanks again for your help.
Exif is metadata, along with IPTC, XMP, AFCP, ICC, FPXR, MPF, JPS and a comment, just for the JFIF/JPEG file format alone. Other picture file formats support even more/other metadata.
You wrote it yourself: a download - so it's a file in any case. Pictures are files, just like executables, movies, texts, music and archives are files, too. And metadata is part of its content, so whoever accesses the raw bytes of the file can grab everything in it. Which is not "please don't look" proof. If you
create that on the fly by stripping metadata everytime a download is requested,
or if you do it once to preserve performance and instead occupy space remains your decision.
If there would be something as simple as a "don't show" feature then it would still be in the file and could be extracted easily by software written to ignore that instruction. Seriously, there's no shortcut to that - do it properly and don't spare yourself from getting work done at the wrong end.

Filepicker.io - image conversions preventing video uploads

We're currently working with Filepicker.io to allow users the ability to upload both images and videos. It appears that if we specify image conversions in the Javascript API options, video uploads don't process and instead get stuck at 99.30%. If I remove the 'conversions' option, video uploads process without issue. Is it not possible to specify image conversion options and accept both type of uploads? If so, this should really be specified in the docs.
I attached a JSFiddle with the code in question. http://jsfiddle.net/BYkD4/
It might be an issue on our end, taking a look now. For large files (+1Mb) we split the file into chunks, upload them in parallel, and then reassemble them on the server side. We use browser progress up to the 90% mark, after which we have to "best guess" what the server-side progress looks like, for now at least. That's the reason why it's hanging at 99.30% - it may actually be able to complete if you give it enough time.
In any case, looking into it
Edit: looks like this was an issue on our end. Fix deployed, everything should be working fine. Sorry about the issue

Advice and tips on a data-driven iPhone app

I'm doing a little iOS app for the subway of my city. It has the following features
See the map (takes you to a UIImageView to see the map of the stations)
See status (tells you if there are problems with one of the lines/stations)
See prices (tells you the different tariffs, depending on the hour)
Subway-news (little feed with the title and the first paragraph of each article, with a link to see more in safari)
Our promotions to you (takes you to a view with image-coupons shown in a overflow fashion. If you click them, you go to a certain page)
I have a server that takes the news and encode them in JSON. From the iPhone, I request the JSON async, parse it and store the info in an NSArray of NSDictionaries (with keys: date, title, content, seeMoreUrl)
This could be bought as a little RSS feed. I saw some examples and they used a SQLite db to store the data. I'm not sure how necessary would this be, as I'm only planning on showing the 5 latest news and I'm not loading the whole content, just title and a iPhone-designed paragraph.
I have serious doubts with the promotions tough. I would request a file called promotions.json with the url of each promotion and the url they link to, like this
[
{
"imgSource":"http:\/\/www.domain.com\/promotions\/1.png",
"url":"http:\/\/www.domain.com\/freeRide"
},
{
"imgSource":"http:\/\/www.domain.com\/promotions\/54.png",
"url":"http:\/\/www.cheapCarRental.com\/promotions-to-subway-users"
}
]
Then, I don't know what to do. Should I download all images to the documents folder and then when the users click in view promotions, load every pic I found in that directory intro the coverflow-like View?
Should I implement a SQLite for the news and also use it to store the images as BLOBs?
Should I just keep them in memory?
You could save the images to the Library/Caches folder (Apple won't like saving to Documents folder without good reason - my app was rejected because of this. See guidelines.). Then, you have a cache file, which is essentially a plist that saves the url (the key) and the path of its corresponding image saved on the disk (the value).
What do you want your app to do? What will users want the app to do? Would they prefer to pay the price in terms of data usage and battery usage to download all the images and probably get a snappier user experience, or would they prefer occasional lags in the interface as images are downloaded on demand in return for longer battery life and decreased data usage? It's up to you to balance those factors.

Record audio, add effects, then save result to a audio file

I am having trouble doing what the title said. My goal is to be able to add any desired effects to your recording, save the modified audio, then send that to a server.
I have searched the fourms and came across these threads:
viewtopic.php?f=7&t=13029&p=45362&hilit=saving#p45362
viewtopic.php?f=7&t=12660&p=44586&hilit=saving#p44586
viewtopic.php?f=7&t=13178&p=45746&hilit=saving#p45746
After reading those, I see it is possible to save the modified audio, but can it only be saved as a wav? Like I said after it is saved it will be sent to a server, so size is a big deal and wavs are relatively big compared to other formats. Ignoring that fact, I tried to implement FMOD_OUTPUTTYPE_WAVWRITER and I cannot get that to work; are there any good examples of using it? I looked though the examples in the library but I didn't see any..
But the basic structure of the app is to record, turn some switches off and on to see what filters you want, preview it, then press a button "Save" that will save it. What would this save function consist of?
Any help appreciated, thanks.
Using FMOD_OUTPUTTYPE_WAVWRITER is fairly straight forward, you set the type via System::setOutput, specify the output file via System::init extradriverdata. The extradriverdata should be an absolute path to a writable area of the device such as the documents directory. After you have finished playing, call System::release and the file will be complete.
The other option for recording wave data with effects is by creating a custom DSP and connecting it to the channel playing the recorded data. You will then get regular callbacks giving you float data that you must write out to disk yourself. You can find examples of DSPs and writing wav files in the dsp_custom and recordtodisk examples respectively.
Finally note that FMOD doesn't come with the facility to write compressed audio to disk, you will need another API to achieve this goal.
You can save as an AAC file via the ExtAudioFile API.

rendering a waveform on an iphone

I was wondering if anyone has any suggestions on how to go about rendering a waveform of an audio file. I wold like to enable the user to set an in and out point of an audio track and I need to have a waveform so you can see where to put the points.
Are there any libraries available for this or does it need to be a completely custom solution?
Is it even called a waveform ? Maybe there's a better word for it so I can do some more searching.
TIA !
I'm reposting my answer from this question, since it applies here as well:
When displaying an audio waveform, you will want to do some sort of data reduction on the original data, because there is usually more data available in an audio file than pixels on the screen. Most audio editors build a separate file (called a peak file or overview file) which stores a subset of the audio data (usually the peaks and valleys of a waveform) for use at different zoom levels. Then as you zoom in past a certain point you start referencing the raw audio data itself.
Here are some good articles on this:
Waveform Display
As far as source code goes, I would recommend looking through the Audacity source code. Audacity's waveform display is pretty good and mostly likely does a similar sort of data reduction when rendering the waveforms.
CorePlot is the library you are looking for. It is hosted on Google code.
See this related SO question.
I realise this is an old post, however i searched for this recently, and decided to roll my own solution based on a few snippets i located on SO and a few other sites.
See my answer to This question