Sathwik Gangisetty Sathwik Gangisetty - 1 year ago 69
Ruby Question

Tutorial for creating RESTful Web Service with Rails 5

I'm building an Android application that can take pictures and videos. I need to build a RESTful web service using Ruby on Rails. If I click send option in my application those pictures and videos should get uploaded to web service. Here are my concerns:

  1. User Authentication is required. User should login to Android application before he/she can take pictures. Should this user authentication is to be made in Ruby on Rails using Devise or it should be done in Android application and just pass authentication tokens to API?

  2. I couldn't find tutorials that have Android application with Ruby on Rails. Most of the tutorials I find are of Rails 3 ( but I need is Rails 5) and have no clear explanation on user authentication.

I have basic knowledge on Android development and I'm familiar with Ruby on Rails.

Answer Source
  1. For logging in, you could pull up the login page on the mobile device. This will be the easier route. Just make sure the page is mobile friendly and responsive. Use a WebView to do so.

  2. Using android with a rails RESTful api is no different than interacting with any other RESTful interface. Check out AndroidAsync. This will help with the HTTP communication.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download