You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -32,95 +30,125 @@ Installating the HelpStack library is fairly straight-forward.
32
30
3. Set the flag for *manifestmerger.enabled* to *true* in your *project.properties* file:
33
31
34
32
manifestmerger.enabled=true
33
+
34
+
35
+
-**[Error]: Attribute is already present**: Replace the necessary attribute. For example:
36
+
37
+
<manifest
38
+
xmlns:tools="http://schemas.android.com/tools"
39
+
...>
40
+
41
+
<application
42
+
tools:replace="android:label"
43
+
...>
35
44
45
+
-**[Error]: Jar mismatch! Found different versions of jar in the dependency list**: Replace the jar in the library with the jar from your project. Clean the project and build again.
46
+
36
47
### [Android Studio]:
37
48
38
49
1. Add jcenter as a repository to your app's build.gradle
39
-
2. Add com.tenmiles:helpstack:1.0 as a dependency
40
50
41
51
repositories {
42
52
jcenter()
43
53
}
44
54
55
+
2. Add *com.tenmiles:helpstack:1.0* as a dependency in the same build.gradle
56
+
45
57
dependencies {
46
58
compile 'com.tenmiles:helpstack:1.0'
47
59
}
48
-
49
-
You might face a few issues, depending on your app.
50
60
51
-
1.**Attribute is already present**: Follow the instructions suggested by Android Studio, which is along the lines of adding
52
61
53
-
tools:replace="android:label"
54
-
55
-
to your *application* tag.
56
-
2.**Duplicate files copied in APK**, listing some library jars: HelpStack uses some libraries and your app might be using the same. To avoid using the library from HelpStack, exclude it when you add the dependency. For example, if the library is *httpmime*, import the library in the manner below:
62
+
-**[Error]: Attribute is already present**: Replace the necessary attribute. For example:
57
63
64
+
<manifest
65
+
xmlns:tools="http://schemas.android.com/tools"
66
+
...>
67
+
68
+
<application
69
+
tools:replace="android:label"
70
+
...>
71
+
72
+
-**[Issue]: Duplicate files copied in APK**: This happens due to library version-mismatch. To avoid using the library from HelpStack, exclude it when you add the dependency. For example:
Obtain the necessary credentials for the gear of your choice and create a suitable Gear object. Set the Gear object with *HSHelpStack* instance only once.
The API key and Auth code can be found in your HappyFox account under *Manage* > *Integrations*. You can generate an API key and Auth code by clicking on the API configure link.
89
139
90
140
HappyFox requires that the Priority ID and Category ID cannot be nil. This is the ID of the priority and the category with which tickets will be created when a customer reports an issue.
91
141
92
-
##### ii. Zendesk Gear credentials:
93
-
*Zendesk Account URL*, *Staff Email address* and *API token*.
94
-
95
-
HSZendeskGear zenDeskGear = new HSZendeskGear(
96
-
"<Account URL>",
97
-
"<Staff Email Address>",
98
-
"<API Token");
99
-
100
-
The token can be found in your Zendesk account under Settings > Channels > API.
101
-
102
-
##### iii. Desk Gear credentials:
103
-
*Desk Account URL*, *To Help Email address*, *Staff Email address* and *Staff password*
i. Set the Gear object with *HSHelpStack* instance only once. You can do this in the **OnCreate()** method of your app's Main Activity, but it is suggested that you create a custom *Application* class which extends the **Application** class:
148
+
##### ii. Zendesk:
149
+
Credentials: *Zendesk Account URL*, *Staff Email address* and *API token*.
121
150
122
-
123
-
public class HSApplication extends Application {
151
+
public class HSApplication extends Application {
124
152
125
153
HSHelpStack helpStack;
126
154
@@ -131,48 +159,81 @@ i. Set the Gear object with *HSHelpStack* instance only once. You can do this in
131
159
// Get the HSHelpStack instance
132
160
helpStack = HSHelpStack.getInstance(this);
133
161
134
-
// Insert Gear object creation from previous step here
135
-
<GearType> <Gear Object> = new <GearType> (<Credentials>)
162
+
// Crate the Gear object
163
+
HSZendeskGear zenDeskGear = new HSZendeskGear(
164
+
"<Account URL>",
165
+
"<Staff Email Address>",
166
+
"<API Token");
136
167
137
168
// Set the Gear
138
-
helpStack.setGear(<Gear Object>);
169
+
helpStack.setGear(zenDeskGear);
139
170
}
140
171
141
-
}
172
+
}
173
+
174
+
The token can be found in your Zendesk account under Settings > Channels > API.
175
+
176
+
##### iii. Desk:
177
+
**Credentials**: *Desk Account URL*, *To Help Email address*, *Staff Email address* and *Staff password*
178
+
179
+
public class HSApplication extends Application {
180
+
181
+
HSHelpStack helpStack;
142
182
143
-
ii. Now open your Application Android manifest and set the Application name as your custom application class name.
183
+
@Override
184
+
public void onCreate() {
185
+
super.onCreate();
186
+
187
+
// Get the HSHelpStack instance
188
+
helpStack = HSHelpStack.getInstance(this);
189
+
190
+
// Crate the Gear object
191
+
HSDeskGear deskGear = new HSDeskGear(
192
+
"<Account URL>",
193
+
"<To Help email address>",
194
+
"<Staff email address>",
195
+
"<Staff password");
196
+
197
+
// Set the Gear
198
+
helpStack.setGear(deskGear);
199
+
}
200
+
201
+
}
202
+
203
+
##### iv. Email:
204
+
*Email address* and *Articles in xml format*
144
205
145
-
<application
146
-
android:name="HSApplication"
147
-
...
148
-
/>
149
206
150
-
#### Step 3 - Entry point in UI:
207
+
HSEmailGear emailGear = new HSEmailGear(
208
+
"example@happyfox.com",
209
+
R.xml.articles);
210
+
211
+
212
+
#### Step 2 - Entry point in UI:
151
213
Add a clickable item (probably a button) in your UI, wherever appropriate. Set a *click listener* to it. Within the *click listener*, use the **showGear** API to open up the HelpStack UI:
It is very easy to customize the HelpStack UI, if you want it go along with your app's UI.
157
221
158
-
It is very easy to customize the HelpStack UI. You might want to do so to make it go along with your app's UI.
222
+
HelpStack comes with built-in screens and a default theme. It also comes with a set of pre-configured themes. You can download them from the link below:
159
223
160
-
We ship sample themes along with the HelpStack library. You can find them in
161
-
**/helpstack/Themes/**, where you will find 5 sample themes - **HSLightTheme** (Default), **HSDarkTheme**, **HSFacebookTheme**, **HSPathTheme** and **HSPinterestTheme**.
224
+
#### [Download Themes](./Themes/)
162
225
163
226
Each theme comes with the following:
164
227
- A *colors.xml* and a **hs_custom_theme.xml** defined in **../values/**
165
228
- Chat bubble drawables defined in **../drawables/**.
166
229
167
230
168
231
##### Using the sample themes
169
-
170
232
- Decide which sample theme you want to use
171
233
- Include the *theme* and *colors* xml files in your application under **values**
172
234
- Include the theme's drawables under your application's **drawables**
173
235
- Now you can simply build and run the application. The HelpStack UI will use the styles specified in the chosen theme.
174
236
175
-
176
237
Below is the list of parameters you can configure to change the looks of HelpStack:
0 commit comments