Search for answers or browse our knowledge base.
Branding the Vantiq Android Mobile App
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
This document provides guidance to a developer interested in customizing or rebranding the Vantiq Android app. The following sections discuss likely operations necessary to develop a new Android app based on the Vantiq version with the goal of submitting the new app to the Google Play Store.
Please note: this document assumes the reader is an experienced Android developer. Additionally, if customizing more than just images, the developer should be comfortable developing in Java and the Android SDK.
Fork the Vantiq Android App Repository
The Vantiq Android app GitHub repository may be found here. In order to maintain the ability to track changes in the Vantiq-maintained app version, the developer should fork the repository. There are many sources of information for learning how to keep a forked repository up to date with the original. Here is one summary.
Choose an Application Id (appId)
Before you begin you must choose a unique ‘appId’ for your app, usually something like ‘io.myCompany.myApp’. This value must be plugged in various places in the instructions below. Once your app has been deployed this appId cannot be changed.
Register Your Android App
To develop an Android app you must have a valid Google login.
Before you can publish an app you must register it in the Google Play Store. Begin by going here and logging in.
On the “All Applications” page you will see a list of all the applications owned by your account; this list will be empty if you have not created an app before. To create a new app you must click the “Create Application” button. You will be asked to fill in a series of dialogs with a lot of information, most of which is used to create your listing page in the app store. This will include the app icon in a set of various sizes and some sample screenshots. You don’t have to fill out all of this at once; you will be able to come back to it and edit in the missing pieces when you are ready to supply them.
When you are finished with this process you will have registered your app; now you need to build the app itself based on the Vantiq code in the “android” GitHub repository.
Create the Keystore
Before the app can be published it must be digitally signed; this involves creating a private key inside a Java “keystore” file. There are several ways to do this –
Here is a description of the process using Android Studio (or IntelliJ): https://developer.android.com/studio/publish/app-signing
You can also do this using the “keytool” command from the command line: http://blog.rabidgremlin.com/2015/11/06/how-to-create-a-private-key-for-signing-android-apps
Both of these techniques will ask you to choose an “alias” and two passwords which you will need later; don’t lose them!
You should call your keystore file “android.jks”. When done this file should be copied into the “app” directory:
app/android.jks
Create the ‘keys.gradle’ file
Next you must create a file called “keys.gradle” in the “app” directory. This contains information that points to the keystore file and the keys need to access it. The file must look like this:
android {
signingConfigs {
config {
keyAlias 'MyAlias'
keyPassword 'MyKeyPassword'
storeFile file('android.jks')
storePassword 'MyStorePassword'
}
}
}
‘MyAlias’, ‘MyKeyPassword’ and ‘MyStorePassword’ must be replaced with the values you entered when creating the android.jks keystore file above.
Customize the ‘flavors.gradle’ file
Next you will customize the “flavors.gradle” file which is also found in the “app” directory:
android {
productFlavors {
//
// This is a special branding flavor for your custom app; you must replace "io.mypackage.app" with
// your chosen appId.
//
custom {
dimension "brand"
applicationId "io.mypackage.app"
}
}
}
The only thing you should change is to replace “io.mypackage.app” with the appId you chose above.
Customize the FileProvider
Edit the file called app/src/custom/AndroidManifest.xml so it includes your appId in “authorities”. Initially, it looks like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.vantiq.rcs">
<application
android:name=".VantiqApplication"
android:allowBackup="true"
android:icon="@drawable/appicon"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<!-- The "authorities" attribute must contain the appid with '.fileprovider' appended -->
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="io.mypackage.app.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"/>
</provider>
</application>
</manifest>
Here you must edit “android:authorities=”io.mypackage.app.fileprovider” by replacing “io.mypackage.app” with your appId.
Setup Firebase and connect it to your app
The app uses Firebase as a mechanism to receive “push notifications” from the Vantiq server. In order to register your app to talk to Firebase you must follow the directions found here using “Option 1”. The end result of this process will include a file called “google-services.json”; this file must copied here (overwriting the sample copy you find there):
app/src/global/custom/google-services.json
Brand the app
Now you can begin the actual “branding” portion of this process by modifying various Vantiq-specific default settings. For example, you can override the appicon (which represents the app on your phone’s “home screen”) and the icon shown in the “splash screen” when the app starts up. These should be changed by modifying the icons you find in the app/src/custom/res directories. There should be one variant of the icons for each screen resolution.
You can also customize the app message file (found in app/src/custom/res/values/strings.xml). You might want to do this if you need to replace any references to “Vantiq” with your own company name.
Various default colors can be adjusted by editing the file found here:
app/src/main/res/values/colors.xml
This file contains comments describing how the different color values are applied.
Build the signed version of the app
When you are ready to build the APK for the app (so you can submit it to the Google Play Store) you can do that using Android Studio or from the command line using
gradle assembleGlobalCustomRelease
The resulting signed APK will be found here:
app/build/outputs/apk/globalCustom/release/app-global-custom-release.apk
This can be uploaded to the Play Store using the “Release management” / “App releases” page on the Google Play Console.
Consumer Mode
Consumer Mode is a special type of branding that bypasses the normal Vantiq authentication views by specifying a dedicated Vantiq server URL, namespace and Public Client name. This allows the branded app to display a Public Client which implements self-registration. Once the Public Client has run and the user has authenticated, Consumer Mode also specifies a single dedicated, private Client to be run. No other functionality found in the existing Vantiq mobile app is available.
There is a source file which is used to control Consumer Mode:
app/src/main/java/io/vantiq/rcs/misc/Configuration.java
This file allows you to set several different constant values which are used to modify the behavior of the Android app.
To enable Consumer mode there is a boolean value called “isConsumer” which must be set to “true”. If Consumer mode is “true” then you must also set these values as well:
- debugConsumerModeServer
- releaseConsumerModeServer
- debugConsumerModeNamespace
- releaseConsumerModeNamespace
- debugPublicClientName
- releasePublicClientName
- debugPrivateClientName
- releasePrivateClientName
These are used to set the hardcoded server, namespace, public Client and private Client which are required in Consumer mode. Note that for convenience there is both a “debug” and a “release” flavor of each value. This allows you to use one set of values during development (“debug”) and a different set when building the app for deployment in the app store (“release”).
There are a few other parameters that affect the operation of “geoFencing” which can be found in Configuration.java; refer to the comments for a description.
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
-
Getting Started
-
- Advanced Collaborations
- Analytics
- App Components
- Assemblies
- Catalogs Tutorial
- Client Builder
- Client Components
- Deployment Tutorial
- Floor Plan
- Introduction to Collaboration
- Natural Language Tutorial
- Sources
- Stateful Services
- System Modeler
- Testing the Debugging Tutorial
- Testing the Introductory Tutorial
- Testing the Source Tutorial
- User and Namespace Administration
- Show Remaining Articles ( 3 ) Collapse Articles
-
Product Documentation
-
-
-
- Accessing Documents
- Automatic Document Caching
- Client Resources
- Client Startup
- Control Widgets in the "Views" Portion of Client Builder
- Controllers
- Creating A Client
- Data Objects
- Data Stream Widgets in the “Views” Portion of Client Builder
- Data Streams
- Debugging
- Field Validation
- Introduction
- Launching Clients from a browser
- Layout Widgets in the “Views” Portion of Client Builder
- Localizing Clients
- Navigation Between Pages
- Offline Operation
- On Start Events
- Public Clients
- Server Requests
- Terminating The Client
- The Client Builder Concepts
- The Client Builder's Canvas Section
- The Client Builder's Control Dock
- The Client Builder's Palette Area
- The Client Builder's Slideout Section
- Uploading data to the Server
- Show Remaining Articles ( 13 ) Collapse Articles
-
-
-
- Accessing Namespaces in the Organization
- Active Resource Control Center
- Adding a New User to an Organization
- Adding a New User to the Application Namespace
- Administrators' Concepts and Terminology
- Authorizing Users to Access the Application
- Creating a Developer Namespace for the Organization Administrator
- Creating a New Application Namespace
- Creating Resources for New Namespaces
- Custom User Invites
- Deploying the GenAI Flow Service Connector
- Developer Tasks
- Handling Administrators Leaving
- Related Configuration
- Removing Namespace Administrators
- Self-Administration Tasks
- System Administration Tasks
- Viewing Lists of Users
- Show Remaining Articles ( 3 ) Collapse Articles
-
- Deploy Results Tab
- Deploying the same application to different environments
- Deployment
- Deployment Tool - Introduction
- Environment
- Environment Tab
- Node
- Project Partitions
- Redeploy On A Failed Node
- Reliable Deployment
- Settings Tab
- The Graph View
- The Tree View
- Undeploy
- Update Partitions
- Verify Application After Deployment
- Show Remaining Articles ( 1 ) Collapse Articles
-
- CheckedInsert/CheckedUpsert Command
- Command Line Options
- Delete Command
- Execute Command
- Export Command
- Find Command
- Help Command
- Import Command
- Insert Command
- Installation - Prerequisites
- Installation - Profile
- List Command
- Load Command
- Recommend Command
- Run Command
- Select Command
- Stop Command
- The Vantiq Command Line Interface (CLI) - Overview
- Upsert Command
- Show Remaining Articles ( 4 ) Collapse Articles
-
- App Execution Dashboard
- App With Split Dashboard
- Dashboard Navigation Bar
- Deprecated Dashboards
- Event Processing Dashboard
- General Dashboard Behavior
- Getting Started with Grafana
- Grafana Usage
- Monitoring Namespaces with Grafana
- Most Commonly Used Dashboards
- Namespace Monitoring Dashboards
- Organization Level Behavior
- Procedure and Rule Execution Dashboards
- Profiling Dashboards
- Reliable Event Dashboard
- Resource Usage Dashboard
- Service Execution Dashboard
- Service Handler Dashboard
- Source Activity Dashboard
- Storage Manager Dashboard
- Tensorflow Model Dashboard
- Type Storage Dashboard
- Show Remaining Articles ( 7 ) Collapse Articles
-
- Access to a Kubernetes Cluster
- Creating a K8s Cluster
- Delayed Processing
- Deploying K8s Installations to a Kubernetes Cluster
- Deploying the K8s Worker
- External Lifecycle Management Guide - Overview
- K8s Worker
- Kubernetes Components of a K8s Installation
- Kubernetes Namespaces
- Loading Images into a Kubernetes Cluster
- Managing K8s Installations
- Other Configuration Options
- System View
- Use of the self Cluster
- Using a Kubernetes Cluster
- Using Templates to Deploy the K8s Worker
- Vantiq Namespaces
- Verify Installation
- Show Remaining Articles ( 3 ) Collapse Articles
-
- Changing the System Password
- Creating a GenAIFlowService Service Connector
- Creating a New Organization and Namespace
- Deployment Methods
- Docker Deployment
- Edge Installation Management
- Edge Vision Server
- Executable JAR Deployment
- MongoDB
- Requirements
- Running the Vantiq Executable
- Setting the default LLMs API key
- Setting Up Vantiq Edge
- Vantiq Edge Reference Guide - Overview
- Vantiq Edge Self Node
- Windows bat file
- Show Remaining Articles ( 1 ) Collapse Articles
-
- Additional Buffer Semantics
- Applicability
- auditFrequency Quota
- Background
- Default Quotas
- Detailed Credit Quotas
- errorBreaker Quota
- errorReportingFrequency Quota
- Execution Credit Quota
- Execution Credit Quota - Diagnostics
- Execution Credit Quota - Mitigation
- Execution Rate Quota
- Execution Rate Quota - Diagnostics
- Execution Rate Quota - Mitigations
- executionTime Quota
- k8sResources Quota
- Quota Interactions
- receiveMessage Quota
- receiveMessage Quota - Diagnostics
- receiveMessage Quota - Mitigation
- reservedGroups Quota
- stackDepth Quota
- Stream Quota
- Terminology
- Workload Management
- Workload Management Conceptual Model
- Show Remaining Articles ( 11 ) Collapse Articles
-
-
-
- Accumulate State
- Analytics
- Answer Question
- App Activity Tasks
- App Builder Guide - Introduction
- App Builder Overview
- Assign
- Build and Predict Path
- Cached Enrich
- Chat
- Close Collaboration
- Collaborations in Apps
- Compute Statistics
- Convert Coordinates
- Creating an App
- DBScan
- Delay
- Dependency Management
- Dwell
- Enrich
- Error Handling
- Escalate
- EscalateState
- Establish Collaboration
- Event Redelivery
- Event Stream
- Filter
- GenAI Flow
- Get Collaboration
- Interpret Conversational Language
- Join
- K-Means Cluster
- Limit
- Linear Regression
- Log Stream
- Loop While
- Merge
- Notify
- Optional Imports
- Polynomial Fitter
- Predict Paths By Age
- Procedure
- Process Intent
- PublishToService
- PublishToSource
- PublishToTopic
- Rate
- Recommend
- RecordEvent
- Reliable Apps
- Run TensorFlow Model On Document
- Run TensorFlow Model On Image
- Run TensorFlow Model On Tensors
- Sample
- SaveToType
- Split By Group
- Submit Prompt
- Threshold
- Time Difference
- Track
- Track Motion
- Tracking Progress
- Transformation
- Unwind
- VAIL
- VisionScript
- Window
- Within Tracking Region
- YOLO From Images
- Show Remaining Articles ( 54 ) Collapse Articles
-
-
-
- Broker Service
- Catalog Operations
- Catalog Procedures
- Connect to Catalog
- Create Entry
- Create Entry
- Custom Operations
- Disconnect from Catalog
- Host Catalog
- Integrating Applications With the Catalog
- Managing Catalog
- Managing Event Types
- Publisher Service
- Register
- Remove Entry
- Repair Catalog
- Resolve
- Subscriber Service
- Unhost Catalog
- Unregister
- Utilities
- Show Remaining Articles ( 6 ) Collapse Articles
-
-
-
- Advanced Use Cases
- Data Manipulation
- Defining Types
- Discovery from External Data Store
- Error Handling
- Installation and Use
- Native Language Implementation
- Restricting Capabilities
- Service Connectors
- Storage Manager Assembly Contents
- Storage Manager Service API
- Storage Manager Transactions
- Storage Managers - Introduction
- Transaction Support
-
-
-
- App Pane
- Autopsies
- Defining a Run Policy
- Defining a Test Suite - Properties
- Defining an Input
- Defining an Output
- Error Pane
- Integration Tests
- Populate Testing Namespace With Data
- Procedure Pane
- Rule Pane
- Running a Test in the IDE
- Running a Test through the REST Interface
- Source Mocking For Tests
- Unit Tests
- Vantiq Testing Reference Guide - Introduction
- Show Remaining Articles ( 1 ) Collapse Articles
-
-
-
- Assign
- Branch
- Categorize
- CodeBlock
- Consensus
- Content Ingestion Flows
- Conversation
- GenAI Builder Guide Introduction
- GenAI Builder Layout
- GenAI Components
- GenAI Flow Properties
- GenAI Flow Tracing and Auditing
- Launching the GenAI Builder
- LLM
- Memory and Conversations
- Merging Task Outputs
- NativeLCEL
- Optional
- PromptFromTemplate
- RAG
- Repeat
- Runtime Configuration
- Semantic Index
- Sub-Flows
- Supported VAIL Language Features
- Using GenAI Components
- Vantiq Provided GenAI Components
- Show Remaining Articles ( 12 ) Collapse Articles
-
- AWS
- Azure OpenAI
- Bedrock
- Configuration
- Function Authorizer
- Gemini
- LLM Playground
- Main Chatting Area
- Navigation Panel
- NVIDIA NIM
- OpenAI
- SageMaker
- Settings Panel
- Testing Semantic Index
- Tool Authorizer
- Tools
- Show Remaining Articles ( 1 ) Collapse Articles
-
-
-
-
- Assembly Configs
- Audits
- Catalog Members
- Catalogs
- Debug Configs
- Delegated Requests
- Documents
- Event Generators
- Groups
- Images
- K8s Clusters
- K8s Installations
- K8s Workitems
- LLMs
- Logs
- Namespaces
- Nodes
- Organizations
- Procedures
- Profiles
- Projects
- Resource Definition
- Resource Events
- Resource Relationship Model
- Resource Security Model
- Rules
- Scheduled Events
- Secrets
- Semantic Indexes
- Service Connectors
- Services
- Sources
- StorageManagers
- TensorFlowModels
- Test Reports
- Test Suites
- Tests
- Tokens
- Topics
- TrackingRegions
- Types
- Users
- Vantiq Resources
- Videos
- Show Remaining Articles ( 29 ) Collapse Articles
-
- Before Rules
- Built-In Services
- Data Manipulation
- Data Model Declarations
- Declaring Packages
- Defining Remote Connections
- Distributed Processing
- Error Handling
- Event Sending
- External State
- Flow Control
- General Use Procedures
- In-Memory State Management
- Iteration
- Logging
- Operators
- Package Scoping and Name Resolution
- Packages
- Packages
- Persistent State
- Procedure Execution
- Procedures
- PROCESSED BY Clause
- Resource Definition
- RETURN
- Rules
- Services
- Syntax
- Type Specific Procedures
- VAIL Declarations
- VAIL Types
- Variables
- Show Remaining Articles ( 17 ) Collapse Articles
-
-
-
Articles
-
- How To Video Shorts: Client Layouts
- How To Video Shorts: AI Functions
- How To Video Shorts: Analytics and ComputeStatistics
- How To Video Shorts: Calling Procedures by Properties
- How To Video Shorts: Client CSS
- How To Video Shorts: Invite Other Users to Your Namespace
- How To Video Shorts: SplitByGroup
- How To Video Shorts: The Vantiq API
- How To Video Shorts: The Vantiq IDE
- How To Video Shorts: The Vantiq Version Control System
- How To Video Shorts: Using Generative AI in Applications
- How-To Video Shorts: Managing AI Conversations
- How-To Videos: AI Design Model Assistant
- How-To Videos: AI Documentation Search
- Production Applications Best Practices