|
1 | | -# authfy-sample-android |
2 | | -Authfy Native Sample App for Android |
| 1 | +# 1. Introduction |
| 2 | +This sample app lets you quickly test the integration of Authcube's Android SDK. |
| 3 | + |
| 4 | +## License |
| 5 | +This software is proprietary and protected under IT4YOU CONSULTORIA EM INFORMATICA LTDA's license. |
| 6 | +All rights reserved since 2009. |
| 7 | + |
| 8 | +Please refer to the LICENSE file in the repository for complete terms. |
| 9 | + |
| 10 | +# 2. Running the app |
| 11 | + |
| 12 | +### Prerequisites |
| 13 | + |
| 14 | +Make sure you have installed: |
| 15 | +- Git |
| 16 | +- [Android Studio](https://developer.android.com/studio) |
| 17 | + |
| 18 | +### Step 1: Clone this Repository |
| 19 | +Run the following command in your terminal: |
| 20 | + |
| 21 | +```bash |
| 22 | +git clone https://github.com/authcube/sample-app-android.git |
| 23 | +``` |
| 24 | + |
| 25 | +### Step 2: Open the Project |
| 26 | +1. Open Android Studio |
| 27 | +2. Click **"Open"** on the welcome screen (or go to **File > Open...** in the top menu) |
| 28 | +3. Navigate to the directory where you cloned the project |
| 29 | +4. Wait for the project to load (you'll see a progress bar at the bottom saying "Gradle Build Running") |
| 30 | + |
| 31 | +### Step 3: Set Up and Configure the Emulator |
| 32 | +1. Click on "Tools" in the top menu |
| 33 | +2. Click "Device Manager" |
| 34 | +3. Click the "Add a new device" button and "Create a new device" |
| 35 | +4. In the "Phone" category, select Pixel 6 (or the any other phone) |
| 36 | +5. Click "Next" |
| 37 | +6. Select "API 34" (Android 14.0) |
| 38 | + - If it's not installed, click **install** |
| 39 | +  |
| 40 | +7. Finish the virtual device setup |
| 41 | + |
| 42 | +### Step 4: Run the App |
| 43 | +1. Select your newly created device in the top bar |
| 44 | +2. Hit the `Run 'app'` button (or press **Shift + f10**) |
| 45 | +  |
| 46 | + |
| 47 | +# 3. Using the app |
| 48 | +Before logging in, you **MUST** configure the app with identity provider details: |
| 49 | +1. Click **Settings** |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | +2. Fill in the fields with **your** information |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | +3. Go back and log in. You'll be redirected to the **home screen** |
| 58 | + |
| 59 | +## Troubleshooting |
| 60 | +### If the build fails |
| 61 | +Try these fixes in order: |
| 62 | +1. Click **File > Sync Project with Gradle Files** |
| 63 | +2. Click **Build > Clean Project** then **Build > Rebuild Project** |
| 64 | +3. Close Android Studio and reopen it |
| 65 | + |
| 66 | +### Additional help |
| 67 | +- Make sure Android Studio is fully updated: |
| 68 | + 1. Click **"Help"** in the top menu |
| 69 | + 2. Click **"Check for updates"** |
| 70 | + 3. Install any available updates |
| 71 | + |
| 72 | +- If nothing else works, try: |
| 73 | + 1. Close Android Studio |
| 74 | + 2. Delete the .gradle/ directory from your project |
| 75 | + 3. Reopen Android Studio and click the `Run 'app'` button |
| 76 | + 4. Let it rebuild the app |
| 77 | + |
| 78 | +### Important Information |
| 79 | +The Android Emulator is not aware of your local HOSTS configuration, so it is advised to use an |
| 80 | +external server to develop and test your app |
| 81 | + |
3 | 82 |
|
4 | | -## Important Information |
5 | | -The Android Emulator is not aware of your local HOSTS configuration, so it is advised to use an external server to develop and test your app |
|
0 commit comments