Skip to content

Amplify is used to prompt users for feedback at the right times. Based on ruled defined by us library determines the right time to ask for feedback and based on their reaction, users are given choice to leave a quick rating/review on the Huawei App gallery

License

applibgroup/amplify

Repository files navigation

Build Quality Gate Status

Amplify

Amplify is used to prompt users for feedback at the right times. Based on ruled defined by us library determines the right time to ask for feedback and based on their reaction, users are given choice to leave a quick rating/review on the Huawei App gallery

image

Source

Inspired from android library https://github.com/stkent/amplify

Features

We can define several rules to determine the right time to prompt for feedback which takes into account the number of days since the app is installed, last asked for feedback, update in the app etc. Library tracks significant events and prompts only when all defined rules allow to do so

In addition to this we can design the layout of the feedback prompt. Users after submitting their feedback are given choice to leave a quick rating/review on the Huawei App gallery

If User gives positive feedback

image

If we get critical feedback

image

Dependency

  1. For using Amplify module in sample app, include the source code and add the below dependencies in entry/build.gradle to generate hap/support.har.
	dependencies {
		implementation project(':amplify')
        	testCompile 'junit:junit:4.12'
	}
  1. For using Amplify module in separate application using har file, add the har file in the entry/libs folder and add the dependencies in entry/build.gradle file.
	dependencies {
		implementation fileTree(dir: 'libs', include: ['*.har'])
		testCompile 'junit:junit:4.12'
	}

  1. For using Amplify from a remote repository in separate application, add the below dependencies in entry/build.gradle file.
	dependencies {
		implementation 'dev.applibgroup:amplify:1.0.0'
        	testCompile 'junit:junit:4.12'
	}

Usage

  1. Initialize the shared Amplify instance in the MyApplication class and supply feedback collectors that determine where positive and critical feedback should be directed

image

By default, the HuaweiAppgalleryFeedbackCollector will search their stores for the app whose package name matches the running application. If your app's build variants do not all share a single package name, amplify will fail to load the appropriate App Gallery page in non-release builds. To fix this, pass your release build package name to the FeedbackCollectors during initialization.

image

  1. Now we have to add Prompt instance to XML layouts where you may want to prompt the user for their feedback and get the shared Amplify instance in the MainAbilitySlice class and call promptIfReady method and pass the Prompt instance

We have different options to do so, we can have defaultlayout prompt view or custom layout prompt view and can go with default settings or customize according to our need.

a) Default promptview layout with all default settings

image image

b) Default promptview layout with code config

image image

c) Default promptview layout with xml config

default_xml_config_xml default_xml_config_code

d) Custom promptview layout with code config

Here we have to define question view and thanks view xml layout as well

image image

Custom question view

custom_question_xml

Custom thanks view

custom_thanks_xml

Future Work

  1. Opening email client when user gives critical feedback with subject & device information in the text already filled, currently opening app gallery for both positive and critical feedback
  2. Adding custom attributes for CustomlayoutPromptView
  3. Button customizations by providing different border width and color attributes

License

Copyright 2015 Stuart Kent

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Amplify is used to prompt users for feedback at the right times. Based on ruled defined by us library determines the right time to ask for feedback and based on their reaction, users are given choice to leave a quick rating/review on the Huawei App gallery

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages