Skip to content

Commit

Permalink
Updated SDK to version 1.5
Browse files Browse the repository at this point in the history
Signed-off-by: Prasannan N <[email protected]>
  • Loading branch information
Prasannan N committed Aug 5, 2015
1 parent 8303e9c commit bb6b0a4
Show file tree
Hide file tree
Showing 53 changed files with 423 additions and 232 deletions.
31 changes: 23 additions & 8 deletions MobihelpDemo/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,45 +13,60 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:padding="8dp"
android:padding="4dp"
android:text="@string/label_support"
android:textAppearance="?android:attr/textAppearance" />

<Button
android:id="@+id/btnSupport"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:layout_margin="4dp"
android:text="Support" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:padding="8dp"
android:text="@string/label_talktous"
android:padding="4dp"
android:text="@string/label_feedback"
android:textAppearance="?android:attr/textAppearance" />

<Button
android:id="@+id/btnTalkToUs"
android:id="@+id/btnFeedback"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:text="Feedback" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:text="Talk To Us" />
android:padding="4dp"
android:text="@string/label_solutions"
android:textAppearance="?android:attr/textAppearance" />

<Button
android:id="@+id/btnSolutions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:text="Solutions" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:padding="8dp"
android:padding="4dp"
android:text="@string/label_ratingprompt"
android:textAppearance="?android:attr/textAppearance" />

<Button
android:id="@+id/btnAppRateDialog"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:layout_margin="4dp"
android:text="App Rate Dialog" />
</LinearLayout>

Expand Down
3 changes: 2 additions & 1 deletion MobihelpDemo/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

<string name="app_name">Mobihelp Demo</string>
<string name="label_support">Integrate support in your app to allow users to quickly browse through FAQs, submit feedback and talk to you directly from within the app in real-time!</string>
<string name="label_talktous">Integrate Feedback anywhere in the app to colleect feedback form your users instantly.</string>
<string name="label_feedback">Integrate Feedback anywhere in the app to collect feedback form your users instantly.</string>
<string name="label_solutions">Display only FAQs in your app</string>
<string name="label_ratingprompt">Use the rating prompt to quickly collect ratings from your users and boost your Play store app rankings.</string>

</resources>
20 changes: 15 additions & 5 deletions MobihelpDemo/src/com/example/mobihelp/demo1/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import android.view.View.OnClickListener;
import android.widget.Button;

import com.freshdesk.mobihelp.FeedbackRequest;
import com.freshdesk.mobihelp.FeedbackType;
import com.freshdesk.mobihelp.Mobihelp;
import com.freshdesk.mobihelp.MobihelpCallbackStatus;
Expand Down Expand Up @@ -36,11 +37,13 @@ public void onCreate(Bundle savedInstance) {
Mobihelp.leaveBreadCrumb(this.getLocalClassName());

btnSupport = (Button) findViewById(R.id.btnSupport);
Button btnTalkToUs = (Button) findViewById(R.id.btnTalkToUs);
Button btnFeedback = (Button) findViewById(R.id.btnFeedback);
Button btnSolutions = (Button) findViewById(R.id.btnSolutions);
Button btnAppRateDialog = (Button) findViewById(R.id.btnAppRateDialog);

btnSupport.setOnClickListener(btnClickListener);
btnTalkToUs.setOnClickListener(btnClickListener);
btnFeedback.setOnClickListener(btnClickListener);
btnSolutions.setOnClickListener(btnClickListener);
btnAppRateDialog.setOnClickListener(btnClickListener);
}

Expand All @@ -53,11 +56,18 @@ public void onClick(View v) {
Mobihelp.showSupport(MainActivity.this);
break;

case R.id.btnTalkToUs:
// Launch Feedback Directly
Mobihelp.showFeedback(MainActivity.this);
case R.id.btnFeedback:
// Launch Feedback Directly with prefilled subject and/or description
FeedbackRequest feedbackRequest = new FeedbackRequest();
feedbackRequest.setSubject("Order 12345"); //Can be a dynamic id like order id from your app
feedbackRequest.setDescription("Prefilled description for the user");
Mobihelp.showFeedback(MainActivity.this, feedbackRequest);
break;

case R.id.btnSolutions:
Mobihelp.showSolutions(MainActivity.this);
break;

case R.id.btnAppRateDialog:
// Manually prompt for an App Rating/Feedback Dialog
Mobihelp.showAppRateDialog(MainActivity.this);
Expand Down
14 changes: 9 additions & 5 deletions MobihelpSDK/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package="com.freshdesk.mobihelp"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="10" />

Expand All @@ -12,8 +12,7 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application
android:label="@string/app_name" >
<application>
<activity
android:name="com.freshdesk.mobihelp.activity.SolutionArticleListActivity"
android:configChanges="orientation|screenSize"
Expand All @@ -26,6 +25,11 @@
android:theme="@style/Theme.Mobihelp"
android:windowSoftInputMode="adjustResize|stateVisible" >
</activity>
<activity
android:name="com.freshdesk.mobihelp.activity.InterstitialActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/Theme.AppCompat">
</activity>
<activity
android:name="com.freshdesk.mobihelp.activity.TicketListActivity"
android:parentActivityName="com.freshdesk.mobihelp.activity.SolutionArticleListActivity"
Expand Down Expand Up @@ -69,7 +73,7 @@
android:name="android.support.PARENT_ACTIVITY"
android:value="com.freshdesk.mobihelp.activity.SolutionArticleListActivity" />
</activity>

<service android:name="com.freshdesk.mobihelp.service.MobihelpService" />

<receiver android:name="com.freshdesk.mobihelp.receiver.ConnectivityReceiver" >
Expand All @@ -79,4 +83,4 @@
</receiver>
</application>

</manifest>
</manifest>
7 changes: 7 additions & 0 deletions MobihelpSDK/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ Documentation : http://developer.freshdesk.com/mobihelp
Support : http://support.freshdesk.com
Email : [email protected]

v1.5
---------------------
Ability to display solutions filtered by tags
Ability to preset subject and prefill description
Ability to mark solutions as helpful or not
Performance Improvements

v1.4
---------------------
- Images can now be attached as part of Initial Feedback
Expand Down
Binary file modified MobihelpSDK/libs/mobihelp.jar
Binary file not shown.
11 changes: 11 additions & 0 deletions MobihelpSDK/res/anim/slide_down.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">

<translate
android:duration="500"
android:fillAfter="true"
android:fromYDelta="0%p"
android:interpolator="@android:anim/linear_interpolator"
android:toYDelta="100%p" />

</set>
10 changes: 10 additions & 0 deletions MobihelpSDK/res/anim/slide_up.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">

<translate
android:duration="750"
android:fillBefore="true"
android:fromYDelta="100%p"
android:toYDelta="0%p" />

</set>
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
</shape>
</item>

</selector>
</selector>
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
<solid android:color="#FF6666" />
</shape>
</item>
</selector>
</selector>
2 changes: 1 addition & 1 deletion MobihelpSDK/res/drawable/mobihelp_unread_count_oval_bg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

<corners android:radius="30dp" />

</shape>
</shape>
53 changes: 53 additions & 0 deletions MobihelpSDK/res/layout-land/mobihelp_voting_frame.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/mobihelp_votingview"
android:layout_alignParentBottom="true"
android:orientation="vertical"
android:visibility="gone"
tools:context=".activity.SolutionArticleActivity" >

<View
android:id="@+id/mobihelp_voting_view_divider"
android:layout_width="match_parent"
android:layout_height="@dimen/mobihelp_article_thin_border"
android:background="@color/mobihelp_divider_dark" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >

<TextView
android:id="@+id/mobihelp_votingprompt"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:ellipsize="end"
android:maxLines="2"
android:padding="4dp"
android:text="@string/mobihelp_solutions_vote_prompt"
android:textAppearance="@android:style/TextAppearance.Medium" />

<Button
android:id="@+id/mobihelp_upvote"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="8dp"
android:layout_weight="0.15"
android:text="@string/mobihelp_label_yes" />

<Button
android:id="@+id/mobihelp_downvote"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="20dp"
android:layout_weight="0.15"
android:text="@string/mobihelp_label_no" />
</LinearLayout>

</LinearLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
android:layout_above="@+id/mobihelp_conversation_reply_group"
android:background="@android:color/darker_gray" />

<include layout="@layout/mobihelp_partial_reply_frame"
<include layout="@layout/mobihelp_partial_reply_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"/>

</RelativeLayout>
</RelativeLayout>
4 changes: 2 additions & 2 deletions MobihelpSDK/res/layout/mobihelp_activity_conversation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
android:layout_alignParentRight="true"
android:layout_alignWithParentIfMissing="true"
android:layout_above="@+id/mobihelp_start_new_conversation_group" />

<include
layout="@layout/mobihelp_start_new_conversation_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"/>
</RelativeLayout>
</RelativeLayout>
8 changes: 4 additions & 4 deletions MobihelpSDK/res/layout/mobihelp_activity_feedback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
android:padding="8dp"
android:scaleType="centerInside"
android:src="?attr/mh_ic_attach" />

<ImageView
android:id="@+id/mobihelp_feedback_attachment_preview_image"
android:layout_width="@dimen/mobihelp_feedback_attachment_preview_size"
Expand All @@ -52,7 +52,7 @@
android:scaleType="centerCrop"
android:src="@drawable/mobihelp_progress_spinner"
android:visibility="gone" />

<ImageView
android:id="@+id/mobihelp_feedback_remove_attachment_button"
android:layout_width="@dimen/mobihelp_feedback_remove_icon_size"
Expand Down Expand Up @@ -87,7 +87,7 @@
android:hint="@string/mobihelp_hint_email"
android:inputType="textEmailAddress"
android:singleLine="true" />

<ProgressBar
android:id="@+id/mobihelp_feedback_progressbar"
android:layout_width="wrap_content"
Expand All @@ -99,4 +99,4 @@

</RelativeLayout>

</ScrollView>
</ScrollView>
28 changes: 28 additions & 0 deletions MobihelpSDK/res/layout/mobihelp_activity_solution_article.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mobihelp_solution_article_root_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/mobihelp_solution_article_title"
android:layout_width="match_parent"
android:maxLines="3"
android:padding="12dp"
android:textAppearance="@android:style/TextAppearance.Medium"
android:layout_height="wrap_content"/>

<View
android:id="@+id/mobihelp_solution_article_title_divider"
android:layout_width="match_parent"
android:layout_height="@dimen/mobihelp_article_thick_border"
android:layout_below="@id/mobihelp_solution_article_title"
android:background="@color/mobihelp_divider_light" />

<include layout="@layout/mobihelp_voting_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"/>

</RelativeLayout>
2 changes: 1 addition & 1 deletion MobihelpSDK/res/layout/mobihelp_activity_solution_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@
android:visibility="gone" />
</RelativeLayout>

</RelativeLayout>
</RelativeLayout>
2 changes: 1 addition & 1 deletion MobihelpSDK/res/layout/mobihelp_activity_ticket_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
android:textAppearance="?android:attr/textAppearanceMedium"
android:visibility="gone" />

</merge>
</merge>
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
android:text="@string/mobihelp_label_yes" />
</LinearLayout>

</LinearLayout>
</LinearLayout>
Loading

0 comments on commit bb6b0a4

Please sign in to comment.