android side changes

How to change app Name?

This is a simple thing in Android Studio,
go to: res folder -> values -> strings.xml
change the app_name (in the bellow example:MitsuhoSdn Bhd) to any new name you want.
<string name="app_name">MitsuhoSdn Bhd</string>
<string name="hello_world">Hello world!</string>
<string name="menu_settings">Settings</string>

How to change Package name?

From the Android Studio click over the gear icon (
Gears icon
) and then select the option: "Compact Empty Middle Packages", to see the folders separated in a tree view.
Now select the folder, click right button to open the contextual menu, select Refactor and then Rename
You will be advised to refactor the package:
Then a window will show the coincidences inside the proyect, select "Do Refactor"
We don´t have to change manually the AndroidManifest.xml or build.gradle files, Refactoring the package will do the job!.

How to change Google Login Details?

Creating an Android Project

  • Open Android Studio (Here I am using Android Studio 3.0). And you need to create a project with an Empty Activity. I created a project named GoogleLoginExample.
  • Once your project is loaded then click on Tools->firebase
Google Login Android
  • Then you will see a new window on the right. Here you need to select Authentication.
Google Login Android using Firebase
  • Now you need to connect to firebase. It will again open a window, and from this window, you can create a new Firebase Project, or if you want you can also choose an existing one.
Connecting to Firebase
  • After connecting to Firebase, click on Add Authentication and accept the changes. It will add all the required dependencies.

Enabling Google Login in Firebase Console

  • If we want to use Google Login with Firebase, then we also need to enable it in the Firebase Console (Default disables it).
  • To enable it, go to Firebase Console (console.firebase.google.com). Then from the right, select Authentication, then select SIGN-IN METHOD, and here you need to allow Google Option. (See the image below it is disabled, and you need to enable it).
Enable Google Sign In
Here are my steps for the task:
  1. 1.
    Create PNG image file of size 512x512 pixels
  2. 2.
    In Android Studio, in project view, highlight a mipmap directory
  3. 3.
    In menu, go to File>New>Image Asset
  4. 4.
    Click Image Button in Asset type button row
  5. 5.
    Click on 3 Dot Box at right of Path Box.
  6. 6.
    Drag image to source asset box
  7. 7.
    Click Next (Note: Existing launcher files will be overwritten)
  8. 8.
    Click Finish

How to change API, Rozerpay API & Onesignal API From Build Gradle (AppLevel)

01. Change Your Base API URL
02. Change App Token and (Admin Side - Setting.php);
03. Replace your Keyid (razerpay)
04. Replace your SecretCode (Rozerpay);
05. Replace OneSignal App id;
Last modified 2yr ago