Add a feedback board to an Android app
Open the board in a WebView composable, sign users in with a token and meet Google Play's rules.
Free for one project and 100 votes. Paid plans start with a 14 day trial, no card.
The screen
Declare the internet permission, build the board's address and load it in a WebView with JavaScript turned on.
A WebView inside a composable, plus the permission.
Give the WebView a WebViewClient, or links will hand off to the browser app.
The address is app.votefirst.app, then the language, then public/roadmap and the slug of your board. A first version needs nothing else. Visitors can read the board, vote and send a suggestion, and every suggestion waits for your approval before it shows.
Handle the back button inside the screen. Without it, one press leaves the board even when the visitor has opened a request and expects to return to the list.
<uses-permission android:name="android.permission.INTERNET" />@Composable
fun FeedbackScreen(token: String?, onClose: () -> Unit) {
val address = remember(token) {
Uri.Builder()
.scheme("https")
.authority("app.votefirst.app")
.appendEncodedPath("en/public/roadmap/your-board")
.apply { token?.let { appendQueryParameter("vf_token", it) } }
.build()
.toString()
}
var web: WebView? = null
BackHandler {
if (web?.canGoBack() == true) web?.goBack() else onClose()
}
AndroidView(factory = { context ->
WebView(context).apply {
settings.javaScriptEnabled = true
webViewClient = WebViewClient()
loadUrl(address)
web = this
}
})
}Who is voting
The board marks a visitor with a cookie named vf_anon that lasts a year. A WebView keeps cookies between launches unless your app clears them.
An anonymous visitor is a cookie, so keep it.
Do not call removeAllCookies on every start, or each launch is a new voter.
That cookie is how a person who voted last week still sees their votes today, and how a vote can be withdrawn by the same person. It is set by the board itself and is HttpOnly, so your code never needs to read it.
Clearing the app's data, or the WebView's cookies, starts a new anonymous voter. For a person who has an account in your app, a signed token solves this properly, because their votes then follow the account and not the device.
Signed in
Your backend signs a short lived token for the logged in person. The screen adds it to the address as vf_token.
Fetch a token from your server and add it.
Signing users in is part of Free and Pro, and not of Lite. Without a token the board still works for visitors.
Two claims are required in the token: sub, which is your own id for the person, and exp, the time it stops working. Add a name to put a real name on their votes, and an email to keep on their profile, where nobody else sees it. Sign it with the secret from the dashboard, on your server and never in the app, because anyone can unpack an APK.
A board can also be set to ask for a sign in before anyone votes, comments or suggests. On such a board a visitor with no token sees the content and none of the controls, so pass a token whenever the person is logged in.
A custom tab
A Custom Tab opens the board in the person's own browser, with its own back button, and takes three lines in place of a screen.
Use a Custom Tab when no token is involved.
It needs the androidx.browser dependency.
That is a good trade for a public link. It keeps the cookie in the browser instead of your app, so a person who clears your app's data keeps their votes.
Once a token sits in the address, prefer the WebView. A token in a browser's address can end up in history, so give it a lifetime of an hour or less in either case.
CustomTabsIntent.Builder().build()
.launchUrl(context, Uri.parse("https://app.votefirst.app/en/public/roadmap/your-board"))Google Play
Google Play treats an app where people post as an app with user generated content, and asks for terms and an in app way to report and block.
Plan for the content rules before you publish.
Google updates its policy text, so read the current version before you submit.
The board covers part of this. Every suggestion waits for you to approve it, so nothing reaches the board before a person has looked at it. A voter you have stopped can still read, and the comment box and the suggestion form are replaced by a short line.
The web board does not draw a report button, which the Swift package does. A reporting route in your own settings screen is yours to add and to describe in your terms.
The Data safety form asks what the app collects and shares. A token that carries a name and an email sends personal data to VoteFirst, so declare it in the form and in your privacy policy. The form is your declaration, and Google's help text says which category fits.
One board
The same project collects requests from every build, so one card shows how many people want a thing on both platforms.
A single board can serve Android and iOS.
Publish a release once every store has approved the build it ships in.
Play reviews hold the same asks in different words, and a board gives them one place with one count. Merge the duplicates, and the combined vote count says whether a request is a quirk of one platform or a general wish.
The guide on a Flutter app takes the same approach with a Flutter specific screen, and the React Native guide does the same for that stack.
Android WebView board benefits
No library to maintain
The WebView is already part of Android.
One board for two platforms
Requests from Android and iOS land in one ranking.
Votes that name the customer
A signed token ties each vote to your own user.
Add the board in five steps
A first version needs no backend.
Create a board
Pick a slug and note its public roadmap address.
Add the permission
Declare internet access in the manifest.
Add the screen
Load the address in a WebView and handle the back button.
Add the token
Fetch it from your server and append vf_token.
Fill in the Play forms
Describe reporting in your terms and the data in your Data safety form.
A checklist before Play review
Before you submit, open the board in the app on a clean install and read it as a reviewer would. Check that suggestions wait for approval, that your terms and contact details are reachable, and that the screen has a way back.
A voter who wipes the web view's stored cookies comes back as someone new, so test the screen once with a token and once without.
What to know before you ship
- There is no Android library. Every app uses the address, the widget or the API.
- The web board draws no report button.
- Signing in with a token is not part of Lite.
- Clearing the WebView's cookies starts a new anonymous voter.
Android feedback board questions
Is there an Android library?
No. There is no SDK for Android. You open the board in a WebView or a Custom Tab, or read cards from the REST API.
Do people need to sign in to vote?
No. Anyone with the address can vote, unless the board is set to ask for a sign in first.
Which plan signs users in with a token?
The Free plan and Pro at $39/mo. Visitors can read and vote on every plan, Lite included.
Do votes survive an app restart?
Yes, as long as the app does not clear the WebView's cookies. The board's cookie lasts a year.
Where does the signing secret go?
On your server. Anyone can unpack an APK, so a secret inside the app is not a secret.
Does the board work offline?
No. It needs a connection, so show your own message when the device is offline.
Can the board follow my app's theme?
Not automatically. Set the accent and the default mode in the dashboard, or pass colors in the address.
Does the web board have a report button?
No. Suggestions wait for approval, and a reporting route inside your app is yours to add.
What does a paid plan cost?
Free covers one project and 100 votes. Beyond that, Lite is $9/mo and Pro is $39/mo, and both open with a 14 day trial that takes no card.
More ways to add a board
More for teams that ship mobile apps.
A board in Flutter
The same idea with webview_flutter.
A board in React Native
The same idea with react-native-webview.
Single sign on for a board
Tokens, secrets and what the board reads.
Show in app messages in a web or Android app
Fetch messages from the API and draw them your way.
Native or WebView feedback SDKs
Which kits draw SwiftUI and which load a web page.
Give your Android users a voice
Start on the Free plan, and try Lite or Pro for 14 days with no card. Add the screen today and the first request can arrive tonight.