Template Android application.
In app/app/build.gradle
:
- Update the value
android.defaultConfig.applicationId
In app/src/main/AndroidManifest.xml
:
- Refactor the package (use Smart Rename)
- Remove permissions which are not required
In app/src/main/res/values/strings.xml
:
- Set the application name
In app/src/main/java/com/APPNAME/application/SplashActivity.java
:
- Set the next activity after the Splash screen
Replace app/src/main/res/logo.xml
with your application logo.
Add a new application launcher icon.
In app/src/debug/res/values/google_maps_api.xml
:
- Change the Google Maps key to an updated one
In app/src/main/java/com/APPNAME/application/MapsActivity.java
:
- Modify the Google Maps start location and zoom
In app/src/main/res/raw/google_maps_styling.json
:
- Modify the Google Maps styling file as per your preference
In app/src/main/res/font/
:
- Add the
.ttf
files for your preferred fonts
In app/src/main/res/values/styles.xml
:
- Configure
PrimaryFont
andPrimaryFontBold
to use the new fonts
In app/src/main/res/values/colors.xml
:
- Change the colors to the preferred style
In app/src/main/java/com/APPNAME/application/NfcScanActivity.java
:
- Implement an action and error handling upon reading a new NFC tag (see
processError()
andprocessData()
)
In app/src/main/res/layout/activity_scan.xml
:
- Customize the layout and content
Copy and modify the sample payload callback function in app/src/main/java/com/APPNAME/application/NearbyConnections.java
to execute an action upon receiving data.
Call the public functions of the class to initialize and advertise/discover other devices.
Add methods to create operations which interact with the other devices.
In app/src/main/java/com/APPNAME/application/RepeatingService.java
:
- Set the interval of recurrence
- Set a task to be repeatedly executed
Start the service in an Activity:
startService(new Intent(this, RepeatingService.class));
In app/src/main/res/xml/root_preferences.xml
:
- Change the preferences to the appropriate values and types
- Access the preferences using the
SettingsManager.java
class
Install Android Studio.
Generate a Google Maps SDK API key (step 1).
In the file app/src/debug/res/values/google_maps_api.xml
, replace the value of the placeholder key with your API key.
Build and run the Android application on a physical or virtual device.
Create a new file in the root directory to hold the secure keystore details:
cp keystore.properties.template keystore.properties
This file will be ignored by Git. Set your keystore information in this file.
Under Build, click Select Build Variant.
In the Build Variants view which appears, change the Active Build Variant from debug to release.
Build the application normally to your phone. The keystore credentials will be verified and applied.
Under Build, click Generate Signed Bundle / APK.
Follow the instructions, inputting your keystore path and credentials, to create a signed app which can be uploaded to the app store.