Skip to content

Commit f6d57c2

Browse files
author
Anirudh S
committed
Update to README
Made some changes based on feedback from @nalinchhajer1.
1 parent 76adce2 commit f6d57c2

File tree

3 files changed

+126
-65
lines changed

3 files changed

+126
-65
lines changed

Images/issuedetail_style.png

3.69 KB
Loading

Images/mainlist_style.png

-42.8 KB
Loading

README.md

Lines changed: 126 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ HelpStack supports the following helpdesk solutions:
1616

1717
If you don't have a helpdesk solution, you can also configure HelpStack, for users to raise requests via email.
1818

19-
Visit [helpstack.io](http://www.helpstack.io) to learn more.
20-
2119
<p align="left" >
2220
<img src="Images/hs_preview.png" alt="HelpStackthemes" title="screenshots">
2321
</p>
@@ -32,95 +30,125 @@ Installating the HelpStack library is fairly straight-forward.
3230
3. Set the flag for *manifestmerger.enabled* to *true* in your *project.properties* file:
3331

3432
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+
...>
3544

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+
3647
### [Android Studio]:
3748

3849
1. Add jcenter as a repository to your app's build.gradle
39-
2. Add com.tenmiles:helpstack:1.0 as a dependency
4050

4151
repositories {
4252
jcenter()
4353
}
4454
55+
2. Add *com.tenmiles:helpstack:1.0* as a dependency in the same build.gradle
56+
4557
dependencies {
4658
compile 'com.tenmiles:helpstack:1.0'
4759
}
48-
49-
You might face a few issues, depending on your app.
5060

51-
1. **Attribute is already present**: Follow the instructions suggested by Android Studio, which is along the lines of adding
5261

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:
5763

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:
5873

59-
compile ('com.tenmiles:helpstack:1.0') {
60-
exclude group: 'org.apache.httpcomponents', module: 'httpmime'
61-
}
74+
compile ('com.tenmiles:helpstack:1.0') {
75+
exclude group: 'org.apache.httpcomponents', module: 'httpmime'
76+
}
77+
78+
### External Dependencies
79+
80+
HelpStack depends on the following libraries:
81+
82+
com.android.support:appcompat-v7:20.0.0
83+
com.google.code.gson:gson:2.2.4
84+
org.apache.httpcomponents:httpmime:4.2.6
85+
com.mcxiaoke.volley:library-aar:1.+
6286

6387

6488
## Using the Library
6589

6690
Broadly speaking, there are just 3 steps to begin using HelpStack within your app:
6791

68-
1. Choose a helpdesk solution of your choice and obtain the necessary credentials. These helpdesk solutions will be referred to as **Gears**.
69-
2. Configure HelpStack to work with the Gear of your choice.
92+
The helpdesk solutions will be referred to as **Gears**.
93+
94+
1. Configure HelpStack to work with the Gear of your choice.
7095
2. Add an entry-point for HelpStack in the UI and connect it with HelpStack.
7196
3. Customize the theme of HelpStack according to your choice.
7297

7398

74-
#### Step 1 - Choose a Gear and obtain credentials:
99+
#### Step 1 - Configure HelpStack with the Gear of your choice:
75100

76-
Obtain the necessary credentials for the gear of your choice and create a suitable Gear object.
101+
Create a custom *Application* class which extends the **Application** class. Be sure to mention it in your manifest as well.
77102

78-
##### i. HappyFox Gear credentials:
79-
*HappyFox Account URL*, *API Key*, *Auth Code*, *Category ID* and *Priority ID*.
103+
<application
104+
android:name="HSApplication"
105+
...
106+
/>
107+
108+
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.
109+
110+
##### i. HappyFox:
111+
Credentials: *HappyFox Account URL*, *API Key*, *Auth Code*, *Category ID* and *Priority ID*.
80112

81-
HSHappyfoxGear happyfoxGear = new HSHappyfoxGear(
113+
public class HSApplication extends Application {
114+
115+
HSHelpStack helpStack;
116+
117+
@Override
118+
public void onCreate() {
119+
super.onCreate();
120+
121+
// Get the HSHelpStack instance
122+
helpStack = HSHelpStack.getInstance(this);
123+
124+
// Crate the Gear object
125+
HSHappyfoxGear happyfoxGear = new HSHappyfoxGear(
82126
"<Account URL>",
83127
"<Your API Key>",
84128
"<Your Auth Code>",
85129
"<Category ID>",
86130
"<Priority ID>");
87-
131+
132+
// Set the Gear
133+
helpStack.setGear(happyfoxGear);
134+
}
135+
136+
}
137+
88138
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.
89139

90140
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.
91141

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*
104-
105-
HSDeskGear deskGear = new HSDeskGear(
106-
"<Account URL>",
107-
"<To Help email address>",
108-
"<Staff email address>",
109-
"<Staff password");
110-
111-
##### iv. Email:
112-
*Email address* and *Articles in xml format*
142+
*Example*:
113143

144+
https://example.happyfox.com/api/1.1/json/priorities/
145+
https://example.happyfox.com/api/1.1/json/categories/
114146

115-
HSEmailGear emailGear = new HSEmailGear(
116-
"example@happyfox.com",
117-
R.xml.articles);
118147

119-
#### Step 2 - Configure HelpStack with the Gear:
120-
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*.
121150

122-
123-
public class HSApplication extends Application {
151+
public class HSApplication extends Application {
124152
125153
HSHelpStack helpStack;
126154
@@ -131,48 +159,81 @@ i. Set the Gear object with *HSHelpStack* instance only once. You can do this in
131159
// Get the HSHelpStack instance
132160
helpStack = HSHelpStack.getInstance(this);
133161
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");
136167
137168
// Set the Gear
138-
helpStack.setGear(<Gear Object>);
169+
helpStack.setGear(zenDeskGear);
139170
}
140171
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;
142182
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*
144205

145-
<application
146-
android:name="HSApplication"
147-
...
148-
/>
149206

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:
151213
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:
152214

153215
HSHelpStack.getInstance(getActivity()).showGear(getActivity());
154216

155217

156-
#### Step 4 - Theming/Skinning:
218+
#### Step 3 - Theming/Skinning:
219+
220+
It is very easy to customize the HelpStack UI, if you want it go along with your app's UI.
157221

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:
159223

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/)
162225

163226
Each theme comes with the following:
164227
- A *colors.xml* and a **hs_custom_theme.xml** defined in **../values/**
165228
- Chat bubble drawables defined in **../drawables/**.
166229

167230

168231
##### Using the sample themes
169-
170232
- Decide which sample theme you want to use
171233
- Include the *theme* and *colors* xml files in your application under **values**
172234
- Include the theme's drawables under your application's **drawables**
173235
- Now you can simply build and run the application. The HelpStack UI will use the styles specified in the chosen theme.
174236

175-
176237
Below is the list of parameters you can configure to change the looks of HelpStack:
177238

178239
**Main List View**

0 commit comments

Comments
 (0)