LAB 2 - pallavidesai/Web-Programming-Lab- GitHub Wiki

Mobile Programming Lab 2

Submitted by: Pallavi Desai, Harish Tata

Objective

Created a messaging app having the following features:

Approach and Output

Welcome Screen

  • The first screen welcomes the user and offers a choice of registration.
  • User if already has account could directly sign in
  • If the user doesn't have an account yet user could click on sign up and get registered for application

Sign in screen

  • Sign-in has basic and social media login. Sign in page is handled by LoginActivity.
  • Login is done using Firebase.
  • In firebase, a project is created and that is linked with our android studio project.
  • Credential validation is done by firebase.
  • Using firebaseAuthWithGoogle() function we can log in and validate and start the intent.

Design of login page done in XML

Output of Login Page

Tabs that contains chats, contacts and calls

  • A second screen presents a platform to exchange messages and provides space to redirect to calls, chat, contacts with different screens.
  • We have 3 different tabs. One for messaging, one for calls and other for contacts
  • Using fragments we have made 3 tabs and added them to one activity using setTabGravity

Design of tbas done in XML

Output of tabs with contacts, calls, and chats

Registartion of user

  • Validation is done in the registration. This is handled by Firebase that we have attached
  • User could take the picture and put it has profile picture in this registration page
  • We have made use of camera hardware to do this

Chat functinality

Implemented broadcast and unicast message exchanges

  • We have used firebase to implement chat functionality
  • Since have already created firebase console we will use it and then create a new database, which will be used to chat
  • We will enable authentication in firebase database
  • Using FriendlyMessage library we will be able to exchange chat messages

Voice to text conversion in chat tab

  • The individual chat window implements exchange messages, audio file transfer, emoji's and microphone to exchanges messages by converting audio to text
  • Our class implements TextToSpeech.OnInitListener which has functions like startVoiceInput() which will be used record messages and are converted to text

Output of converting audio to text

Contacts tabs

  • Contacts is imported from phone book contacts
  • in android.xml read permission has to be enabled and then we are allowed to import contacts
  • Using Cursor we iterated and imported contacts which are stored in the adapter
  • We then set that adapter in listview

The output of Contact Tab

Calls tab

  • Calls screen shows the calls that user made with the app
  • Calls which are done using this application are shown in listview
  • Using Cursor we iterated and got all calls that made from this app and are stored in the adapter
  • We then set that adapter in listview

Output of calls tab

Profile Page

  • Profile settings have options to edit name, contact, and avatar
  • Using getLastSignedInAccount() of GoogleSignIn we can get details of user like name, picture and basic details
  • These are displayed in the profile page
  • User can edit them and save the details

Output of the contact tab

  • Implements the notifications
  • We have implemented notification push using firebase
  • When there is new message push notification will be shown

Conclusion

  • We have developed a messaging app that lets user exchange messages individually and in group
  • User can place call and view contact
  • User can use voice to the text conversion feature
  • It is authorizing the user and hence is secure to use
  • User gets a notification when they receive email

References