Skip to main content

Google Assistant was the star of Google I/O 2017,where news on all aspects of the Android ecosystem was presented in the annual developers conference. Google's AI pulls a bunch of tricks by adding smarter features, which means it will have a face-off with Apple’s Siri.

Get help from Google Assistant

Get answers to all your questions on your phone. Ask anything and Google Assistant is ready to help you do things for you.

Google Assistant on Android phones

The Google Assistant comes on Android Marshmallow and Nougat phones, that long press will launch Google Assistant, popping up with a page asking how it can help,

Getting started

Just get started by saying "Ok Google" or press-and-hold the home button. That's the starting point for Google Assistant, after which you can type or speak questions and have Assistant respond.

Smart suggestions

You can do more with Google Assistant.  It offers a better voice recognition system than Siri and a smart reply feature what Google calls "appropriate, contextually aware smart suggestions for quick replies" with several options available for personalized responses. You can just type your queries to accomplish your task without your voice. . This works great when you don't want to sound naive talking on your phone.

Voice translation

Another great feature those of you who are constantly on the move will love to get their words or sentences translated using the digital assistant. Just tap the Google Lens icon, point the camera at the text, and task will be accomplished in a jiffy!

Music recognition

Google Assistant is out to improve the quality of your life. One of the great ones is music recognition service and recommendations based on the content. For example, when you play music and it'll tell you the band, lyrics and information about it.

Shopping list

Another major feature is the shopping feature. You get the option shopping via Assistant. You can view the list, browse item options, and then checkout and make payment without leaving the app.

iOS support

Millions of iPhone app developers and users have something to cheer about the innovative voice-based interactions. Google's Digital Assistant is available on iPhone and you can access it from a shortcut widget on your notification center.  You can make queries and accomplish all your daily tasks easily. The Assistant will be available for more devices in the future and positioned as Google's powerful and personal primary information source on-demand.

Realm data is compatible with Android mobile devices. It uses very little disk space, realm file perform better than SQLite or JSON. Here are the features of Realm database:

Features

  • Realm is light weight database designed for mobile devices.
  • Replacement for SQLITE in mobile devices
  • It is a kind of No-SQL database
  • Fully Object Oriented.
  • Mobile-first written in C++
  • Cross platform support

Given below are the advantages of Realm 

  • 10X faster than SQLite
  • Easy to use - no need of query knowledge
  • Auto casting as a particular type

Given below are some of the disadvantages of using Realm

  • Still under development. However, Android app developers can proceed with released stable versions
  • Concurrent issue not handled    
  • No null support
  • No auto increment IDs
  • No mapping support - no foreign key
  • Migration is difficult

Integrating data in Realm

  1. Configuration
  2. Initialization
  3. CRUD operations
  1. Configuration
    • Single Module support
      • add the following to your app build.gradle file
      • compile 'io.realm:realm-android:2.3.1’ in your dependency
    • Multiple module support
      • add the following to your Project build.gradle file
        classpath "io.realm:realm-gradle-plugin:2.3.1" in your dependency
      • add the following to your app build.gradle file
        apply plugin: 'realm-android'

    thats it RealM configured in your project.

  2. Initialization
    • Init the Realm in your Application class and its custom configuration
      public class MyApplication extends Application {
       
            @Override
            public void onCreate() {
       
            super.onCreate();
      
            Realm.init(this);
                      
            RealmConfiguration realmConfiguration = new                             
                               RealmConfiguration.Builder(this)
                              .name(Realm.DEFAULT_REALM_NAME)
                              .schemaVersion(0)
                              .deleteRealmIfMigrationNeeded()
                              .build();
           Realm.setDefaultConfiguration(realmConfiguration);
       
                  }
      }
    • If you want can add database encryption by using application keystore file.
  3. CRUD Operations.
    1. A class can act as a table - query is not needed.
      Class Dog extends RealmObject{
      
              @PrimaryKey
              String key = "abc";
                  or
              int key = 123;
      
              @Ignore
                  private int sessionId;
      
              }
      
      • All the fields inside the class act as a column.
      • The field with @PrimaryKey annotation act as primary key for the table.
      • The field with @Ignore annotation can not be considered as a column - this filed ignored and no column is created for the filed
    2. Creating Entry.
      1. prepare UNMANAGED entries - does not having default entry in the table.
        Dog dog = new Dog();
        dog.setName("Rex");
        dog.setAge(1);
        
      2. prepare MANAGED entries - can have its default entry in the table
        Dog dog = realm.createObject(Dog.class);;
        dog.setName("Rex");
        dog.setAge(1);
        
    3. inserting into db
      • Get a Realm instance for this thread
        Realm realm = Realm.getDefaultInstance();
        
      • Before doing any write operation we must call
        realm.beginTransaction();
        
      • Do your write operation after beginTransaction.
        // Persist unmanaged objects
        final Dog managedDog = realm.copyToRealm(dog);
        
        // Create managed objects directly
        Person person = realm.createObject(Person.class);
        person.getDogs().add(managedDog);
        
      • After your write operation commit your updates into corresponding table
        realm.commitTransaction();
        

Examples :

  • Write operation
    Dog dog = new Dog();
    dog.setName("Rex");
    dog.setAge(1);
    realm.beginTransaction();
    final Dog insertedRow = realm.copyToRealm(dog); 
    realm.commitTransaction();
    
  • Update operation
    dog.setName(“another name”);
    realm.beginTransaction();
    final Dog insertedRow = realm.copyToRealmOrUpdate(dog); 
    realm.commitTransaction();
    
  • Read Operation
    realm.where(Book.class).findAll();
    
  • Read Operation with conditions
    realm.where(Book.class).equalTo("id", id).findFirst();
    realm.where(Book.class)
                    .contains("author", "an")
                    .or()
                    .contains("title", "re")
                    .findAll();
    
  • Delete Operation
    // remove a single object
        Dog dog;
        dog.deleteFromRealm();
    
  • Truncate operation
    realm.beginTransaction();
    realm.clear(Book.class);
    realm.commitTransaction();
    

Got an Idea of Android App Development? What are you still waiting for? Contact us now and see the idea live soon. 

You should always keep a backup of all the data on your Android phone. What to do if your phone is lost or stolen?  How to secure all the important information including the messages, contacts, photos and other data? Stay calm and take a breather. Protect all your data and avoid that disastrous scenario. There are numerous ways to automatically back up and sync your data from your Android device. Five easy steps are listed here to access, share, and manage your files on the go.

1. Backup your data

Automatically backup all your folders from your computer to provide real-time access to your data on your Android device. You can easily restore your files to your Android device whenever you like.

2. Sync your files to your device

Synchronize all your files, photos, music, videos, bookmarks and contacts between Android phones and computer without any effort from Android app developers.

3. Offline access

It is relatively easy to access all your files and documents offline. View and edit your files across your devices and smoothly synchronize your changes in data when the files are turned on when you're back at the office or at home.

4. Secure file sharing

Choose specific team members to view your files and folders instantly from your Android device. Give restricted access to share unlimited number of folders to have complete control over file sharing. Post your files on social media such as Facebook or Twitter.

5. Schedule your file sync

Schedule your synchronization of the files and photos in your collection to run in a specific time to get things done easier and faster on the go.

Subscribe to Android application development
 

start with anubavam today

You have an idea we have engineers to convert your ideas into reality

Request Quote