Photo Submission from iOS

36 views
Skip to first unread message

Derek Haidle

unread,
Oct 7, 2016, 9:09:14 AM10/7/16
to thebluealliance-developers

All, 


tldr; What is the best way to get photos or other media into the TBA system from iOS?


The long version:  My son and I love FIRST robotics and as a summer project we wrote an iOS app in Apple's relatively new programming language called Swift.  We pull most of our data from the FRC Event API, but we do get media (photos) from TBA.  


We would like to be able to take photos and submit them back to TBA.  We noticed that many of the photos are hosted on Imgur and browsing the Android codebase, we saw the Imgur API.  However, since neither of us really know Java or how Android applications are setup, we are struggling a bit with if it is possible for us to submit the Imgur image key back to the TBA system.  We've explored the Imgur API and could integrate that with our app.


I searched the archive and it looks like there may have been an attempt to get photos from FRC Tracker through an API that they would offer. I’m not sure if anything came of that, but I could create a simple API for our database if that is the preferred method for TBA to get data.  I could even try to mimic and API if FRC Tracker already had one.


By the way, I’m not sure on timing on all of this.  


If any of you want to be beta testers on our app, please let me know.  Our app name is FRC Central.  We are happy to share what we have done as we go along.  Also, we are not trying to step on any toes in terms of TBAs effort to do an iOS app or anything like that.  We greatly respect the work that all app developers have done and just hope to learn from you!!!  We even have links to the other FRC iOS apps from within our app.  Again, much respect to everyone’s efforts.


Thanks!

Derek


Greg Marra

unread,
Oct 16, 2016, 10:49:24 AM10/16/16
to thebluealliance-developers
Hi Derek!

To submit a photo to TBA, you'll need to have users authenticate as themselves and then write against our API to push the imgur links up to TBA up as "Suggestions" to be reviewed.

You should ping Phil Lopreiato, who built this in our Android app for questions. https://github.com/the-blue-alliance/the-blue-alliance-android/blob/4b01b739fa60677a16c50b67f6c1d80c067ccb31/android/src/main/java/com/thebluealliance/androidclient/datafeed/gce/TbaSuggestionController.java seems like a relevant file, but I am not very familiar with our Android codebase.

-Greg

--
You received this message because you are subscribed to the Google Groups "thebluealliance-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thebluealliance-dev...@googlegroups.com.
To post to this group, send email to theblueallian...@googlegroups.com.
Visit this group at https://groups.google.com/group/thebluealliance-developers.
For more options, visit https://groups.google.com/d/optout.

Haidle Derek

unread,
Oct 16, 2016, 11:12:09 AM10/16/16
to theblueallian...@googlegroups.com
Greg,

Thank you!  I’m not sure how difficult it would be for me to authenticate against the TBA system to do this.  I like the submitting as a suggestion as it allows for a control to be in place for bad photos.  I was thinking about the same sort of thing for our app - some sort of control over image submission.

I will continue to look into this.

Thanks again,
Derek

Greg Marra

unread,
Oct 16, 2016, 11:16:32 AM10/16/16
to theblueallian...@googlegroups.com
TBA's Android app writes "Suggestions" to our site the same as if you used the "Suggest Team Media" buttons on any team page on our website. They get reviewed by an admin and then added to the team page on the site and in the apps.

Are you planning your own database for your app, or pulling from other sites like TBA via their APIs?

Phil Lopreiato

unread,
Oct 16, 2016, 11:17:17 AM10/16/16
to theblueallian...@googlegroups.com

Hey Derek,

Sorry, I totally missed your first message go by.

Authenticating against TBA is really easy, actually. It's backed by Google, so all you need is a Google oauth token to pass with the requests.

The backend for suggestions is backed by Google Cloud Endpoints and you can see the request spec in the main repo in "mobile_main.py"

There is an implementation in the Android app (in libTba) that you could also take a look at. Zach Orr is also implementing this for the native TBA for ios he's working on.

One thing about all of this, though, is that keys for the app will need to be generated and whitelisted on the server.

Phil


On Oct 16, 2016 11:12, "Haidle Derek" <dha...@gmail.com> wrote:
Greg,

Thank you!  I’m not sure how difficult it would be for me to authenticate against the TBA system to do this.  I like the submitting as a suggestion as it allows for a control to be in place for bad photos.  I was thinking about the same sort of thing for our app - some sort of control over image submission.

I will continue to look into this.

Thanks again,
Derek




On Oct 16, 2016, at 9:49 AM, Greg Marra <greg....@gmail.com> wrote:

Hi Derek!

To submit a photo to TBA, you'll need to have users authenticate as themselves and then write against our API to push the imgur links up to TBA up as "Suggestions" to be reviewed.

You should ping Phil Lopreiato, who built this in our Android app for questions. https://github.com/the-blue-alliance/the-blue-alliance-android/blob/4b01b739fa60677a16c50b67f6c1d80c067ccb31/android/src/main/java/com/thebluealliance/androidclient/datafeed/gce/TbaSuggestionController.java seems like a relevant file, but I am not very familiar with our Android codebase.

-Greg

On Fri, Oct 7, 2016 at 9:09 AM Derek Haidle <dha...@gmail.com> wrote:

All, 


tldr; What is the best way to get photos or other media into the TBA system from iOS?


The long version:  My son and I love FIRST robotics and as a summer project we wrote an iOS app in Apple's relatively new programming language called Swift.  We pull most of our data from the FRC Event API, but we do get media (photos) from TBA.  


We would like to be able to take photos and submit them back to TBA.  We noticed that many of the photos are hosted on Imgur and browsing the Android codebase, we saw the Imgur API.  However, since neither of us really know Java or how Android applications are setup, we are struggling a bit with if it is possible for us to submit the Imgur image key back to the TBA system.  We've explored the Imgur API and could integrate that with our app.


I searched the archive and it looks like there may have been an attempt to get photos from FRC Tracker through an API that they would offer. I’m not sure if anything came of that, but I could create a simple API for our database if that is the preferred method for TBA to get data.  I could even try to mimic and API if FRC Tracker already had one.


By the way, I’m not sure on timing on all of this.  


If any of you want to be beta testers on our app, please let me know.  Our app name is FRC Central.  We are happy to share what we have done as we go along.  Also, we are not trying to step on any toes in terms of TBAs effort to do an iOS app or anything like that.  We greatly respect the work that all app developers have done and just hope to learn from you!!!  We even have links to the other FRC iOS apps from within our app.  Again, much respect to everyone’s efforts.


Thanks!

Derek



--
You received this message because you are subscribed to the Google Groups "thebluealliance-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thebluealliance-developers+unsub...@googlegroups.com.
To post to this group, send email to thebluealliance-developers@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "thebluealliance-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thebluealliance-developers+unsub...@googlegroups.com.
To post to this group, send email to thebluealliance-developers@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "thebluealliance-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thebluealliance-developers+unsub...@googlegroups.com.
To post to this group, send email to thebluealliance-developers@googlegroups.com.

Zachary Orr

unread,
Oct 17, 2016, 1:59:50 PM10/17/16
to theblueallian...@googlegroups.com
Sorry for the late reply -

I'd be more than willing to help with any iOS-specific questions you have regarding authentication or interfacing with the TBA API. Long-term (next few months?) I'd love to get media suggestions in for the initial release of TBA for iOS, although that might be a feature that gets tabled if I end up being time constrained

Sent from my iPhone
To unsubscribe from this group and stop receiving emails from it, send an email to thebluealliance-dev...@googlegroups.com.
To post to this group, send email to theblueallian...@googlegroups.com.

Haidle Derek

unread,
Oct 26, 2016, 8:45:54 AM10/26/16
to theblueallian...@googlegroups.com
All,

I’ve been working hard on the server side over the last week or so.  I do maintain my own backend system.  I originally started by pulling data from the FRC Event API and caching it on a server to run reports for our team.  There is a wealth of information.  I leverage the same backend for the app.  

I’m not sure that I’m going to get to the photo feature.  I do use the TBA photos/media as I do not want to reinvent the wheel.  I understand now what it will take from a high level to submit a suggestion.  I will probably still have questions and need assistance.  If I can get to it before the start of the season, I will definitely leverage this email list an ask a few more questions.

Again, if anyone wants to be a beta tester on our app, please let me know at dha...@gmail.com.

Thanks a ton!
Derek

Derek Haidle

unread,
Nov 17, 2016, 2:04:05 PM11/17/16
to thebluealliance-developers
Ok, so I am looking into this a bit more between other activities. Just to outline the process a bit more, here is what I am understanding from the previous responses:

1) Get a photo: Is this a photo that is already posted to Imgur? If so, I have to implement uploading to Imgur first.

2) Log into the Google API. I have Firebase installed already for a different purpose. So, I have at least a start. I believe I would have to supply a developer token that you could whitelist.

3) Log into the TBA Firebase and submit the photo as a suggestion.

Is that it in a nutshell?

Thanks!
Derek

Reply all
Reply to author
Forward
0 new messages