section-engineering-education / engineering-education

“Section's Engineering Education (EngEd) Program is dedicated to offering a unique quality community experience for computer science university students."
Apache License 2.0
363 stars 889 forks source link

Series Article: 4 Technical Strategies That Make Your App Convenient for users. #2092

Closed xTrilton closed 3 years ago

xTrilton commented 3 years ago

This series article will give you an engineer’s approach to solving the lack of convenience in mobile apps. We will solve three problems being: a language barrier, typing fatigue, the frustration of forgetting a password. And finally, we will finish the series with a tutorial that detects emotions in a text enabling you to spot messages that have anger or sadness.

How to Translate Text Using Google Cloud Translate API.

Introduction

The sole purpose of Google cloud Translate API is to translate text from one language to another. As your mobile app gets downloaded by many people around the world. Language may become a barrier as some of your users don’t know the English language. Translating your content to a specific language in a targeted country eliminates the language barrier leading to an increase in the number of downloads. In this article, I will show you how to translate text using Google Cloud Translate API.

Table of contents

  1. Enabling the Translate API in Google cloud.
  2. Adding the Google translate dependency in Gradle.
  3. Adding the internet permission.
  4. Checking if the user's device has an internet connection.
  5. Getting the Translation service.
  6. Implementing the Translate method.

Prerequisites and requirements.

1.Basic knowledge of android development. 2.Android Studio

1. Enabling Translate API in Google cloud. Before we start coding we will enable the Translate API by going to the google cloud website and following the guidelines that I will show. In the end, we will download a JSON file which we will add to the app as it contains credentials for communicating with the API.

2. Adding the google translate dependency in Gradle. Next, we add the translate dependency and sync the Gradle files to download the library.

3. Adding the internet permission. We will add internet permission as the app needs an internet connection for translation service.

4. Checking internet connection. Before we start translating the user’s text, we will check if the device is connected to the internet and if t’s connected, translation can begin.

5. Getting the Translation service. In this section, we will implement code for getting the translation service.

6. Implementing the Translate method. This method will translate the user’s text from English to Spanish.

Conclusion By the end of this tutorial, you will have learned how to translate text using the google cloud translate API.

References https://cloud.google.com/translate https://googleapis.github.io/google-cloud-dotnet/docs/Google.Cloud.Translation.V2/

Generating Smart Replies in Android Using Firebase Smart Reply API.

Introduction

In April 2019 Firebase released the Smart reply API. This API simply suggests words or phrases which are suitable to be a reply to a received message. Mostly it presents 3 suggestions. Adding this feature to an app that has a communication dialogue will reduce typing fatigue as users select appropriate suggestions which can be sent as a reply instead of typing. Smart reply Firebase is a machine learning API for both android and apple operating systems. In this post, we will use it to generate relevant replies in android.

Table of contents

  1. Adding the internet permission.
  2. Adding the Firebase library and disable compression of TensorFlow lite files in Gradle.
  3. Building the user interface.
  4. Adding messages.
  5. Creating a conversation history object.
  6. Generating replies.

Prerequisites

  1. Basic knowledge of android development. 2.Android Studio

1. Adding the internet permission. We will add the internet permission as the app needs an internet connection when generating replies.

2. Adding the Firebase library and disabling compression of TensorFlow lite files . Next, we will add the Firebase smart reply dependency in the Gradle app level and sync the project to download the library.

3. Building the user interface Our app will have a simple UI. We will add an EditText for receiving user input and a button for generating text suggestions.

4. Adding messages. In this section, we will implement code for adding text which will be used by the smart reply algorithm to generate a text suggestion.

5. Creating a conversation history object

6. Generating replies. We will end the coding task by generating the reply and displaying the suggested replies.

Conclusion By the end of this tutorial, you will have learned how to generate three relevant replies for the user using the Firebase Smart Reply library.

References https://developers.google.com/ml-kit/language/smart-reply https://developers.google.com/ml-kit/language/smart-reply/android

An Ultimate Guide To Using the IBM tone analyzer.

Introduction

The IBM tone analyzer API simply detects emotion in a given text. Running an app that has a lot of customers giving feedback can be hectic. Replying to urgent queries is important. In this post, I will show you how to use the IBM tone analyzer to categorize customer messages based on the text emotions detected to identify messages that need urgent response.

Table of contents

  1. Creating an IBM Watson service.
  2. Installing the IBM tone analyzer library.
  3. Getting the IBM credentials.
  4. Generating the user interface.
  5. Setting tone options.
  6. Implementing code for detecting emotions.

Prerequisites

  1. Basic knowledge of android development. 2.Android Studio

1. Creating an IBM Watson service. First of all, we need to create an IBM Watson service. This service will give us access to the tone analyzer through an API key.

2. Adding the IBM tone analyzer dependency. Next, navigate to the Gradle app-level in your project and add the IBM tone analyzer dependency.

3.Getting the IBM credentials. To access the Watson service, we will get the credentials.

4. Generating the user interface. We will keep it simple when it comes to the user interface. We will need an EditText for receiving a text to be analyzed. And finally, create a list that has messages in high priority order.

5. Setting tone options. In this section, we will get available emotions to be detected.

6. Implementing code for detecting emotions.

Conclusion By the end of this tutorial, you will have learned how to detect emotions in user’s text and categorize messages in an emergency list to be able to find and reply to messages that require urgent attention.

Reference https://www.ibm.com/watson/services/tone-analyzer/

hectorkambow commented 3 years ago

@xTrilton Seems like a very cool topic - question? will this be a series of articles ? If so - lets focus on one at a time - and be sure that each tutorial can be its own stand alone article. 👍 Approved for the 1st one.

hectorkambow commented 3 years ago

@xTrilton just wanted to follow up on this topic as I'm clearing up the queue where possible? Can be re-opened when needed. Of perhaps I missed the PR this is attached to?

xTrilton commented 3 years ago

Hello @hectorkambow sorry for the late submission. I am kindly asking you to re-open this issue so that I could submit the first article of the series article

Have a nice day :)

hectorkambow commented 3 years ago

Just an FYI - the titles may need to change - we tend not to try to publish series based articles.

We do not want our reader to have to wait for part 2, 3, & 4.

Again each one should be stand alone - they can reference each other - but do not structure them in a way we it leaves readers waiting or needing the other parts to understand any one article. 👍

thank you

hectorkambow commented 3 years ago

@xTrilton Just pinging you on this topic form - as Im trying to make some room in the topic queue.

No rush if you're still working on this one - if you need more time we can always re-open at a later date.