# 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>
```

[Click Here To Know More](https://stackoverflow.com/a/14216822)

## How to change Package name?

&#x20;From the Android Studio click over the gear icon ( ![Gears icon](https://i.stack.imgur.com/lkezT.png) ) and then select the option: `"Compact Empty Middle Packages"`, to see the folders separated in a tree view.

![](https://1381257200-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MdxSDBTF79W-VavOKwU%2F-MdxWlVS1sikezh4n5Is%2F-MdxYFZ0H_pk1O9BeX1a%2Fimage.png?alt=media\&token=99ce72a5-cf43-4b63-a9b8-2f2420ca9572)

&#x20;Now select the folder, click right button to open the contextual menu, select **`Refactor`** and then  **`Rename`**

![](https://1381257200-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MdxSDBTF79W-VavOKwU%2F-MdxWlVS1sikezh4n5Is%2F-MdxYAk4zhAitCgO5I2N%2Fimage.png?alt=media\&token=4ffd5a51-b76a-4fd9-a61d-8fd7cb7d7a8c)

You will be advised to refactor the package:

![](https://1381257200-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MdxSDBTF79W-VavOKwU%2F-MdxWlVS1sikezh4n5Is%2F-MdxY6-bFZ_MtpLnsMjl%2Fimage.png?alt=media\&token=7b65769f-245f-4688-a7b0-b8a06c0a53d8)

&#x20;Then a window will show the coincidences inside the proyect, select **`"Do Refactor"`**

![](https://1381257200-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MdxSDBTF79W-VavOKwU%2F-MdxWlVS1sikezh4n5Is%2F-MdxXzHRy8_koQWwP6kQ%2Fimage.png?alt=media\&token=254192ec-c282-4c0f-bdf4-3f01e013773f)

> &#x20;**We don´t have to change manually the AndroidManifest.xml or build.gradle files, Refactoring the package will do the job!.**

[Click Here To Know More](https://stackoverflow.com/a/39520618)

## 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**&#x20;

![Google Login Android](https://cdn.shortpixel.ai/client/to_avif,q_glossy,ret_img,w_187,h_180/https://www.simplifiedcoding.net/wp-content/uploads/2015/11/Google-Login-Android.png)

* Then you will see a new window on the right. Here you need to select Authentication.

![Google Login Android using Firebase](https://cdn.shortpixel.ai/client/to_avif,q_glossy,ret_img,w_437,h_484/https://www.simplifiedcoding.net/wp-content/uploads/2015/11/Google-Login-Android-using-Firebase.png)

* 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](https://cdn.shortpixel.ai/client/to_avif,q_glossy,ret_img,w_436,h_273/https://www.simplifiedcoding.net/wp-content/uploads/2015/11/Connecting-to-Firebase.png)

* 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](https://cdn.shortpixel.ai/client/to_avif,q_glossy,ret_img,w_971,h_285/https://www.simplifiedcoding.net/wp-content/uploads/2015/11/Enable-Google-Sign-In.png)

[Click Here To Kno](https://www.simplifiedcoding.net/google-login-android/)[w More](https://www.simplifiedcoding.net/google-login-android/)

## How to change Logo?

Here are my steps for the task:

1. Create [PNG](https://en.wikipedia.org/wiki/Portable_Network_Graphics) image file of size *512x512* pixels
2. In [Android Studio](https://developer.android.com/studio/index.html), in **project view**, **highlight** a *mipmap directory*
3. In menu, **go** to *File>New>Image Asset*
4. **Click** *Image Button* in *Asset type* button row
5. **Click** on *3 Dot Box* at right of *Path Box*.
6. **Drag** image to *source asset box*
7. **Click** *Next* (Note: **Existing launcher files** will be **overwritten**)
8. **Click** *Finish*

[*Click here more info*](https://stackoverflow.com/a/41518027)

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

![](https://1381257200-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MdxSDBTF79W-VavOKwU%2F-MdxZKCWDK6_18B_P-r-%2F-Mdx_WF14aZQh5dm5xvR%2FCapture.PNG?alt=media\&token=7322fb53-80b8-43fa-b139-b3963b7413c5)

01\. Change Your Base API URL &#x20;

02\. Change App Token and (Admin Side - [Setting.php](https://gamety-in.gitbook.io/contest/admin-side-changes#setting-php));

03\. Replace your Keyid (razerpay)

04\. Replace your SecretCode (Rozerpay);

05\. Replace OneSignal App id;
