Git Product home page Git Product logo

tournesol-mobile's Introduction

Tournesol app

The mobile application for Tournesol.

See the wiki page Contribute to Tournesol for details.

Dev setup

This project uses React Native.

React Native applications are written in JavaScript using React components, and generate native UI elements at runtime.

It should support Android and iOS, although we only support Android until further notice.

Follow https://reactnative.dev/docs/environment-setup to setup the environment, then launch the application :

  • Create a .env file with configuration at the root of the project (see below)
  • If you run a server locally (see BASE_API_URL in configuration), map the 8000 port to the one on your device using adb reverse tcp:8000 tcp:8000
  • Launch Metro with npx react-native start
  • Launch the application using npx react-native run-android

Configuration

Configuration is handled using react-native-config. Create a .env file at the root of the project with the following items:

# Use https://staging.tournesol.app in dev
BASE_API_URL=https://tournesol.app
# Tournesol introduction video
TOURNESOL_YOUTUBE_VIDEO_ID=xSqqXN0D4fY

Android Application

The Android application is available on the Play Store: https://play.google.com/store/apps/details?id=com.tournesolapp.

To release a new version, you can generate a signed AAB bundle (see below) and then upload it using the Google Play Console (you need access to the Tournesol account).

Generating a signed AAB bundle

This bundle needs to be signed with a local key, although the final APK released on the Play Store will be automatically signed using the Play Console and the dedicated Tournesol account.

export ORG_GRADLE_PROJECT_TOURNESOL_UPLOAD_KEY_ALIAS=XXX
export ORG_GRADLE_PROJECT_TOURNESOL_UPLOAD_KEY_PASSWORD=XXX
cd android/ && ./gradlew bundleRelease

tournesol-mobile's People

Contributors

sergeivolodin avatar tchaumeny avatar

Watchers

 avatar  avatar  avatar

tournesol-mobile's Issues

API to load (first) video

The algorithm to load the first video in the rate page is not the one described in the wiki.
In particular, the left video is rarely a video I previously rated or a video from my rate-later list.

@sergeivolodin maybe you can help here?

Error message when password is wrong

When I typed a wrong password, I was redirected to the home page without an error message.
It wasn't clear if this was because the password was wrong, or if this was because the application had a bug.
It would be better to add an error message "the username or the password is wrong".

NaN values and missing duration in ratings from the mobile app

See screenshot. The screenshot has a mix of my rating from the website and from the mobile app. I am not entirely sure, but I guess that ratings from the mobile app lead to duration=0. @tchaumeny I think you would be able to tell. If this is true, then the mobile app also wrongly generate the NaN values. We should find the source and fix it.

image

Not possible to use without being logged

On the Tournesol website we have access to some menu (search, wiki, ..) even when we are not logged in. From what I saw, it seems to not be the case on the mobile app.

Video metadata are not available when video is shared with the app

When a video_id is received through a Share with Tournesol action, if the video wasn't previously present on Tournesol the mobile app will send a POST /api/v2/videos/.

This will record the video_id (the video JSON will look like {video_id: "XXX"}) as this is the only information available.
The problem with that is that we want to show the title of the video (maybe the author also) on the video details page and on the rate page, below the thumbnail (which we obtain with the video_id).

Here are some options:

  1. Tournesol server could runyoutube-dl and fetch metadata when it receives a new video_id, then it can include the metadata in the response to the POST request. The downside is that it would generate lot of queries from Tournesol server IP.
  2. The mobile application could fetch (see here for instance) the video metadata itself when it detects that the metadata isn't available on Tournesol and use it for display purpose only (if we populate Tournesol DB with it, we open a door for data poisoning...)
  3. We could use https://lonelycpp.github.io/react-native-youtube-iframe/ which loads the video in an iframe. This might not be very mobile-friendly and limit our ability to show the 2 videos side by side (see this note).

Add to "rate later" list from YouTube app

When watching a video from the YouTube app, the user can click on "share". This opens a menu.
Tournesol should be on the menu, with an option "add to Tournesol".
If the user clicks on "add to Tournesol", the video id gets added to the user's "rate later" list.

Small interface fixes

  • In the search page, clicking on the list item should be the same as clicking on the title -- otherwise one needs to click precisely on the title
    out

  • search results not shown by-default -- on the website, the results are loaded even without any search query

Redirected to YouTube player

Hi,
Unfortunately, I'm facing some trouble that prevent me to participate.
When I try to contribute using the Android app, I can see a split screen with 2 play buttons.
Then, when I click on either one, I'm redirected to the YouTube app with an error "cette vidéo n'est pas disponible" (this video is not available) as seen in the attached screenshots.
What am I doing wrong?
I'm using a Galaxy S10e on Android 11 and I have YouTube Premium subscription.
Thank you for your great work.

Screen_Recording_20210507-123055_YouTube.mp4

In rating page, enable to change videos to be rated

I propose adding a submenu with 5 buttons: change left video, see left video details, settings, change right video, see right video.
Screen Shot 2021-03-10 at 19 46 32

The setting should enable to activate or deactivate quality criteria, and to activate confidence levels, just like the settings on the web rating page.

Also, it would be nice if, when you slide down, only the section with the ratings slide down, so that the videos and options are always visible.

No redirecting after rating

Replace "Compare those videos" by "Ratings submitted!".
The user should then use the buttons provided in Issue #6 to choose a new rating.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.