Text Recognition using Firebase ML Kit for Android

Firebase ML Kit Introduction

At Google I/O 2018, Google announced Firebase ML Kit, a part of the Firebase suite that intends to give our apps the ability to support intelligent features with more ease. The SDK currently comes with a collection of pre-defined capabilities that are commonly required in applications. Firebase ML Kit offers machine learning capabilities underneath a form of a wrapper, it also offers their capabilities inside of a single SDK.

 

Currently ML Kit offers the ability to:

  • Recognize text
  • Recognize landmarks
  • Face detection
  • Scan barcodes
  • Label images

Objective

Recognizing text in images, such as the text of a street sign, and recognizing the text of documents.

Recognize Text in Images with Firebase ML Kit

ML Kit has both a general-purpose API suitable for recognizing text in images, such as the text of a street sign and an API optimized for recognizing the text of documents. The general-purpose API has both on-device and cloud-based models. Document text recognition is available only as a cloud-based model.

Prerequisites

Before you proceed, make sure you have access to the following:

  • the latest version of Android Studio
  • a device or emulator running Android API level 21 or higher
  • a Google account for Firebase and Google Cloud

Create a Firebase Project

To enable Firebase services for your app, you must create a Firebase project for it. So log in to the Firebase console and, on the welcome screen, press the Add project button. In the dialog that pops up, give the project a name and press the Create project button.

 

From the overview screen of your new project, click Add Firebase to your Android app. Enter package name and other information and press the Register app button. Now downloads configuration file ( google-services.json) that contains all the necessary Firebase metadata for your app.

Configure Your Android Studio Project

  1.  Switch to the Project view in Android Studio to see your project root directory. Move the google-services.json file you just downloaded into your Android app module root directory
  2. Modify your project level build.gradle files to use Firebase.
  3. Add dependencies in app-level build.gradle:
  4. Finally, press “Sync now”.
  5. Add permissions in AndroidManifest.xml

On Device Text Recognition

To recognize text in an image, create a FirebaseVisionImage object from either a Bitmap, media.Image, ByteBuffer, byte array, or a file on the device. Then, pass the FirebaseVisionImage object to the FirebaseVisionTextRecognizer’s processImage method. If the text recognition operation succeeds, a FirebaseVisionText object will be passed to the success listener. A FirebaseVisionText object contains the full text recognized in the image and zero or more TextBlock objects. Each TextBlock represents a rectangular block of text, which contains zero or more Line objects. Each Line object contains zero or more Element objects, which represent words and word-like entities (dates, numbers, and so on).

Demo: https://drive.google.com/openid=1XEgRMyGbQEprvM3F8h9jGrLOPyRvAZpB

On Cloud Text Recognition

If you want to use the Cloud-based model, and you have not already enabled the Cloud-based APIs for your project, do so now. Navigate to ML Kit section of the Firebase console. If you have not already upgraded your project to a Blaze plan, click Upgrade to do so. Only Blaze-level projects can use Cloud-based APIs. If Cloud-based APIs aren’t already enabled, click Enable Cloud-based APIs.

 

The document text recognition API provides an interface that is intended to be more convenient for working with images of documents on the cloud. To recognize text in an image, create a FirebaseVisionImage object from either a Bitmap, media.Image, ByteBuffer, byte array, or a file on the device. Then, pass FirebaseVisionImage object to FirebaseVisionDocumentTextRecognizer’s processImage method. If the text recognition operation succeeds, it will return a FirebaseVisionDocumentText object. A FirebaseVisionDocumentText object contains the full text recognized in the image and a hierarchy of objects (blocks, paragraph, word, symbol) that reflect the structure of the recognized document.

Demo: https://drive.google.com/openid=1qIfLKV3Mz4MJDHUf5A17uT_0c1KWz_hK

 

Stay tuned for my next article.

Build your own custom Android ROM using Android Open Source Project(AOSP)

Introduction

One of the best things about Android is custom ROMs. A custom Android ROM refers to a phone’s firmware, based on Google’s Android platform. The term ROM, which stands for Read Only Memory, really has very little to do with what a custom Android ROM actually is, can be confusing. Since Android is an open source mobile operating system that means anyone can download the source code, make modification to it, recompile it and release it for a wide variety of devices. Anyone can install ROMs to their device and achieve a modified appearance and behavior. Continue reading Build your own custom Android ROM using Android Open Source Project(AOSP)

Firebase cloud messaging in iOS

Cloud messaging or push notification is one of those “topics” that gets left out. Primarily because we are too busy beautifying the app, or working on a new feature, or we think it isn’t a big deal. Push notifications are as big a deal as any. Whether you want to re-engage your users, or deliver personalised content, or display targeted advertisements, push notification is the way to go. Continue reading Firebase cloud messaging in iOS

Go ServerLess with Firebase cloud functions

Firebase Cloud function

With announcement of cloud functions beta at Google cloud next 2017 event, Google has added one of the highly requested features in the firebase suite. This is one major step from Google in making firebase serverless. In this post, we will see some of the capabilities, pros and cons, setup and deployment of firebase cloud functions. Google IO is just days away and knowing about firebase is surely going to help in understanding the upcoming firebase features. Continue reading Go ServerLess with Firebase cloud functions

Interface Design for MoSync applications

Introduction

“Interface Design for MoSync applications” … doesn’t sound very interesting! As a matter of fact, it isn’t. There is not much new to what I am going to discuss here. The same age old problem, the same old solution, what’s new is implementing the solution for MoSync. This blog post is based more on personal experience of working with MoSync. What’s MoSync? I’ll talk about MoSync more in the next section, for now you can think of a powerful-yet-not-much-popular cross platform mobile application development framework.

Continue reading Interface Design for MoSync applications

MobileJira launched at the Windows App Store

Talentica’s Mobile Team recently launched the Windows version of the popular MobileJira App. The App, which is already available in the Android Play Store, is useful for all IT professionals who use Jira to track issues, bugs, tasks or deadlines for their projects.

Loaded with unique features, MobileJira is designed for simplicity and ease of use. It is targeted towards improving productivity and process compliance of testers, developers and managers. It helps manage JIRA tickets on the go for requirements like progress-update/resolve or close issues. It also supports major functionalities like search, issue details, updating work log/comments and view attachment.

MobileJira supports JIRA® 5.0 or later. It’s based on JIRA® REST API’s and requires the JIRA® server to run as a service. More details are available at Running JIRA as a Service.

Visit the Windows App Store to download the app.

Feel free to send in your feedback or suggestions at support-mobilejira@talentica.com to help us further improve the app.

Cross Platform Tools – Choosing Right One for Your Mobile App

Different cross platform technologies have emerged to overcome the challenge of building native build for different operating systems. Although cross platform technologies come as good alternative, every platform has its own set of limitations. The big question is to identify an appropriate tool based on requirements. In this blog post we would address this problem by comparing some of the popular cross platform toolsWe will look at Titanimum, Kony and MoSync as they are some of the most popular cross platform tools being used today. We will be doing a comparative analysis of these tools based on the ease of development, memory footprint analysis and App performance.

Ease of Development

Titanium has powerful widgets and a rich platform. It provides eclipse based studio and uses JS for development. Titanium provides good documentation and a strong developer community. It also supports device debugging. It uses native SDK for testing the app on emulator. Disadvantages include its lack of support for Windows 8.
As an alternative tool MoSync uses both C++ and HTML 5/JS as the development language. Mosync Reload can be used to test changes on multiple devices and simulators. MoSync also provides extensive documentation. MoSync doesn’t provide debugging option for building native UI. It requires native SDK for testing native UI apps on emulator.
Kony, as compared to the above two, provides a strong IDE for developing apps. With the advanced drag and drop feature like native platforms, Kony stands out from other cross platform tools. It supports third party widget libraries like Sencha and JQuery Mobile. Kony provides strong support for Enterprise based apps. In spite of all advantages, Kony’s adoption remains low because it is a paid tool. The developer community is not strong and it takes a lot of time to build apps for platforms like BB.

Memory Footprint Analysis

Mobile users are sensitive about sizes of application. Different cross platform frameworks uses plugins to access native features which in turns increases size of executables.
Platform
Executable Size
Android Native
~ 1 MB
iOS Native
~ 1 MB
Titanium
~ 8 MB
MoSync
~ 2 MB
Kony
~ 6 MB
Both Kony and Titanium use a plugin to access native features in their build but MoSync generates and uses native widgets. For a very large size application these figures may be irrelevant but for simple Productivity category app size of the executable can become an issue.

Performance

We have seen a big improvement of performance of Apps running on cross platform tools in recent years. Earlier doing some native actions or showing animation affected the app performance, mainly on Android. Even today, performance of a native build is better than any app built on cross platform tools.

We tested performance for a large List View and Switching/Loading between pages and observed that for Titanium , Mosync and Kony. Performance is good and it is on par with native builds.

In a nutshell

The choice of platform depends on your requirements. MoSync can be preferred choice if existing dev expertise is in C/C++ and also for cases where application needs to be deployed for larger set of Mobile Platforms. For enterprise based apps, Kony can be a better. If your target platform is only Android and iOS then Titanium should be preferred. None of these platforms support Game development and they better be avoided if your App relies extensively on native features.

All cross platform tools still have to go long-way to become par with native platforms like Android and iOS in term of ease of development and performance.

MobileJira Launched for the Android Market!

Talentica’s Mobile Team launched an extremely useful app for all IT professionals who use Jira to track issues, bugs, tasks or deadlines for their projects.

With its unique features, MobileJira is designed for simplicity and ease of use. It is targeted towards improving productivity and process compliance of Testers, Developers and Managers. It is the only offering that provides features such as creating issues, filtering issue list, supporting multiple users, adding/deleting logs and finally resolving or closing issues in its free version.  In fact unlike any other paid or free app, MobileJira supports

•    Custom fields
•    Adding attachments from Gallery, in-app files picker or camera
•    Saving templates for fast issue creation

MobileJira supports JIRA® 4.2.1 or later. Complete features are supported with JIRA® 5.0 on-wards. MobileJira is based on JIRA® REST API’s and requires your JIRA® server to run as service. More details are available at https://confluence.atlassian.com/display/JIRA/Running+JIRA+as+a+Service

Visit the Google Play Store to download the app.

Feel free to send in your feedback or suggestions at support-mobilejira@talentica.com to help us improve further.

EmailApptimizer: ‘Break-through’ in Mobile Marketing

One of our clients, TailoredMail recently unveiled their path breaking feature called EmailApptimizer. EmailApptimizer turns your emails, landing pages and microsites into instant mobile touch-screen applications.

Most people access mails over their mobile devices such as smartphones or tablets. EmailApptimizer improves engagement-rates by up to 50 percent! Marketers are excited about the significantly high engagement rates.

The EmailApptimizer provides you with support of touch gestures, navigation menus, profile forms, Google mapping, interactive polls, click-to-call, offline viewing, image galleries, archives, video, and save-to-home-screen functionality – all this with no additional effort on the marketer’s part!

We are thrilled to be technology partners of TailoredMail.