Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions HelpStackExample/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
android:minSdkVersion="9"
android:targetSdkVersion="22" />

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
Expand All @@ -24,7 +24,9 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data android:name="com.crashlytics.ApiKey" android:value="1d530866e0cb30a5451eee4b86edfa0e9f13de4a"/>
<meta-data
android:name="io.fabric.ApiKey"
android:value="1d530866e0cb30a5451eee4b86edfa0e9f13de4a" />
</application>

</manifest>
43 changes: 36 additions & 7 deletions HelpStackExample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,43 @@
buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
classpath 'io.fabric.tools:gradle:1.25.1'
classpath 'com.google.gms:google-services:3.2.0'
}
}

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':helpstack')
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}

compile 'com.android.support:appcompat-v7:23.0.0'
dependencies {
implementation fileTree(dir: 'libs', include: '*.jar')
implementation project(':helpstack')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation('com.crashlytics.sdk.android:crashlytics:2.6.1@aar') {
transitive = true
}
}

android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
compileSdkVersion 27
buildToolsVersion '27.0.3'

defaultConfig {
applicationId "com.tenmiles.helpstack"
minSdkVersion 14
targetSdkVersion 27
versionCode 1
versionName "1.0"
}

sourceSets {
main {
Expand All @@ -23,7 +51,7 @@ android {
}

// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
androidTest.setRoot('tests')

// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
Expand All @@ -40,4 +68,5 @@ android {
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
}

}
Binary file removed HelpStackExample/libs/crashlytics.jar
Binary file not shown.
16 changes: 12 additions & 4 deletions HelpStackExample/res/layout/fragment_main.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:gravity="center"
tools:context="com.example.helpstackexample.MainActivity$PlaceholderFragment" >

<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:text="@string/show_help" />

</RelativeLayout>

<Button
android:id="@+id/btnClearCache"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:text="@string/clear_cache" />

</LinearLayout>
1 change: 1 addition & 0 deletions HelpStackExample/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
<string name="show_help">Show Help</string>
<string name="clear_cache">Clear Cache</string>

</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,37 @@

import android.app.Application;

import com.crashlytics.android.Crashlytics;
import com.tenmiles.helpstack.HSHelpStack;
import com.tenmiles.helpstack.gears.HSEmailGear;
import com.tenmiles.helpstack.gears.HSHappyfoxGear;

import io.fabric.sdk.android.Fabric;

public class HSApplication extends Application {

HSHelpStack helpStack;
public static HSHelpStack helpStack;

@Override
public void onCreate() {
super.onCreate();
@Override
public void onCreate() {
super.onCreate();

helpStack = HSHelpStack.getInstance(this);
Fabric.with(this, new Crashlytics());
helpStack = HSHelpStack.getInstance(this);

// HSEmailGear emailGear = new HSEmailGear("[email protected]", R.xml.articles);
// helpStack.setGear(emailGear);
HSEmailGear emailGear = new HSEmailGear("[email protected]", R.xml.articles);
helpStack.setGear(emailGear);

/* Uncomment the following to use the HappyFox gear with appropriate support email address */

HSHappyfoxGear happyfoxGear = new HSHappyfoxGear(
"http://acmewidgetsco.happyfox.com",
"b3416a6ebf4245bf9bbeb55b296ecf92",
"6b562e17b1ab4c37bc8c955af8f5cc5c",
"107",
"1");
helpStack.setGear(happyfoxGear);
}
// HSHappyfoxGear happyfoxGear = new HSHappyfoxGear(
// "http://example.happyfox.com",
// "<API Key>",
// "<Auth code>",
// "<Category ID>",
// "<Priority ID>");
//
// helpStack.setGear(happyfoxGear);

}

}
97 changes: 51 additions & 46 deletions HelpStackExample/src/com/example/helpstackexample/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,61 +10,66 @@
import android.view.View.OnClickListener;
import android.view.ViewGroup;

import com.crashlytics.android.Crashlytics;
import com.tenmiles.helpstack.HSHelpStack;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Crashlytics.start(this);
setContentView(R.layout.activity_main);
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction().add(R.id.container, new PlaceholderFragment()).commit();
}

getSupportActionBar().setDisplayHomeAsUpEnabled(false);
getSupportActionBar().setDisplayUseLogoEnabled(false);
getSupportActionBar().setIcon(R.color.hs_transparent_color);
}
if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction().add(R.id.container, new PlaceholderFragment()).commit();
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
getSupportActionBar().setDisplayUseLogoEnabled(false);
getSupportActionBar().setIcon(R.color.hs_transparent_color);
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
return true;
}

/**
* A placeholder fragment containing a simple view.
*/
public static class PlaceholderFragment extends Fragment {
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}

public PlaceholderFragment() {
}
/**
* A placeholder fragment containing a simple view.
*/
public static class PlaceholderFragment extends Fragment {

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container, false);
rootView.findViewById(R.id.button1).setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
HSHelpStack.getInstance(getActivity()).showHelp(getActivity());
}
});
return rootView;
}
}
public PlaceholderFragment() {
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container, false);
rootView.findViewById(R.id.button1).setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
HSHelpStack.getInstance(getActivity()).showHelp(getActivity());
}
});
rootView.findViewById(R.id.btnClearCache).setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
HSHelpStack.getInstance(getActivity()).clear(getActivity());
}
});
return rootView;
}
}

}
Binary file modified Images/issuedetail_style.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Images/mainlist_style.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 24 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center" >
<a href="http://www.helpstack.io/"><img src="https://dl.dropboxusercontent.com/u/55774910/HelpStack/Helpstack%20by%20Happyfox%20logos.png" alt="HelpStack" title="Logo" /></a>
<a href="http://www.helpstack.io/"><img src="https://s3-us-west-2.amazonaws.com/helpstack-screenshots-dont-delete/Helpstack+by+Happyfox+logos.png" alt="HelpStack" title="Logo" /></a>
</p>

**HelpStack** is a library to provide in-app support for your app's users, by connecting with the helpdesk of your choice. Your app’s users can easily raise requests or report issues from within your app.
Expand Down Expand Up @@ -42,12 +42,19 @@ Installing the HelpStack library is fairly straight-forward.
jcenter()
}

2. Add *com.tenmiles:helpstack:1.1.2* as a dependency in the same build.gradle
2. Add *com.tenmiles:helpstack:1.2.0* as a dependency in the same build.gradle

dependencies {
compile 'com.tenmiles:helpstack:1.1.2'
compile 'com.tenmiles:helpstack:1.2.0'
}

3. Add this to avoid *duplicate file during packaging APK*

packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
}

For more information on installation, such as Installing in Eclipse and common installation errors, visit this Wiki page: [Installation Instructions](https://github.com/happyfoxinc/helpstack-android/wiki/Installation-Instructions)

Expand Down Expand Up @@ -143,11 +150,21 @@ For more information, refer to the documents in the [Wiki section](https://githu

HelpStack depends on the following libraries:

com.android.support:appcompat-v7:20.0.0
com.google.code.gson:gson:2.2.4
org.apache.httpcomponents:httpmime:4.2.6
com.mcxiaoke.volley:library-aar:1.+
'com.android.support:appcompat-v7:23.0.0'
'com.google.code.gson:gson:2.3'
'org.apache.httpcomponents:httpmime:4.2.6'
'com.mcxiaoke.volley:library:1.0.19'

## Proguard (Optional)

If you have Proguard enabled, please add this snippet to your proguard rules file (eg proguard-rules.pro, proguard.cfg or others):

# helpstack
-dontwarn com.polites.**
-dontwarn com.tenmiles.helpstack.**
-dontwarn org.apache.commons.**
-keep class org.apache.http.** { *; }
-dontwarn org.apache.http.**

## Video

Expand Down
11 changes: 1 addition & 10 deletions Themes/HSDarkTheme/values/hs_custom_theme.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,7 @@
<style name="hs_messageEditTextStyle" parent="hs_editText_defaultStyle"></style>

<!-- DRAWABLES
Defining the drawable icons used in the project, override the drawable to give your own custom icons

Attachment icon used in New Issue screen, and chat screen to show attachments -->
<drawable name="hs_attachment_icon">@drawable/hs_attachment_img</drawable>

<!-- Search icon used in search menu -->
<drawable name="hs_search_icon">@drawable/hs_search_img_light</drawable>

<!-- Disclosure icon used in main list view -->
<drawable name="hs_disclosure_next">@drawable/hs_disclosure_img</drawable>
Defining the drawable icons used in the project, override the drawable to give your own custom icons -->

<!-- Add attachment icon used in issue detail screen - add reply -->
<drawable name="hs_add_attachment">@drawable/hs_add_attachment_img</drawable>
Expand Down
11 changes: 1 addition & 10 deletions Themes/HSFacebookTheme/values/hs_custom_theme.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,7 @@
<style name="hs_messageEditTextStyle" parent="hs_editText_defaultStyle"></style>

<!-- DRAWABLES
Defining the drawable icons used in the project, override the drawable to give your own custom icons

Attachment icon used in New Issue screen, and chat screen to show attachments -->
<drawable name="hs_attachment_icon">@drawable/hs_attachment_img</drawable>

<!-- Search icon used in search menu -->
<drawable name="hs_search_icon">@drawable/hs_search_img_light</drawable>

<!-- Disclosure icon used in main list view -->
<drawable name="hs_disclosure_next">@drawable/hs_disclosure_img</drawable>
Defining the drawable icons used in the project, override the drawable to give your own custom icons -->

<!-- Add attachment icon used in issue detail screen - add reply -->
<drawable name="hs_add_attachment">@drawable/hs_add_attachment_img</drawable>
Expand Down
Loading