Skip to content

Commit a8c20db

Browse files
committed
release v4.3.3 + update sample app to work with android studio 3.0
1 parent 0031190 commit a8c20db

File tree

7 files changed

+56
-40
lines changed

7 files changed

+56
-40
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
Change Log
22
==========
33

4+
Version 4.3.2 *(2017-10-24)*
5+
----------------------------
6+
* Upgrade gradle version to 3.0
7+
* Fix NPE when invoking instabug
8+
9+
Version 4.3.0 *(2017-09-22)*
10+
----------------------------
11+
* Fix issue in which user had to send application to background and back to foreground to enable invocation with event after enabling it in runtime.
12+
* Fix an issue in which user events are not sent with PreSendingHandler.
13+
* Fix other bugs and crashes.
14+
15+
Version 4.2.11 *(2017-09-12)*
16+
----------------------------
17+
* Fix screenshot issue with GLSurfaceView
18+
419
Version 4.2.10 *(2017-08-06)*
520
----------------------------
621
* Introduce `addExtraReportField` API to add extra fields to the bug/feedback reports

app/build.gradle

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 23
5-
buildToolsVersion '25.0.0'
4+
compileSdkVersion 26
5+
buildToolsVersion '26.0.2'
66

77
defaultConfig {
88
applicationId "com.example.instabug"
99
minSdkVersion 15
10-
targetSdkVersion 23
10+
targetSdkVersion 26
1111
versionCode 1
1212
versionName "1.0"
1313
multiDexEnabled true
14+
flavorDimensions "default"
15+
vectorDrawables.useSupportLibrary = true
1416
}
1517
buildTypes {
1618
release {
@@ -28,11 +30,14 @@ android {
2830
minSdkVersion 15
2931
applicationId "com.example.instabug.above4"
3032
versionName "1.0-aboveApi14"
33+
dimension "default"
34+
3135
}
3236
belowApi14 {
3337
minSdkVersion 10
3438
applicationId "com.example.instabug.below14"
3539
versionName "1.0-belowApi14"
40+
dimension "default"
3641
}
3742
}
3843

@@ -46,21 +51,21 @@ repositories {
4651
// TODO add this only if interested in getting SNAPSHOT releases
4752
url "https://oss.sonatype.org/content/repositories/snapshots"
4853
}
54+
google()
4955
}
5056

5157

5258
dependencies {
5359
compile fileTree(dir: 'libs', include: ['*.jar'])
54-
compile 'com.android.support:multidex:1.0.1'
55-
compile 'com.jakewharton:butterknife:7.0.1'
56-
compile 'com.android.support:design:23.2.0'
57-
compile 'com.android.support:appcompat-v7:23.2.0'
60+
compile 'com.android.support:multidex:1.0.2'
61+
compile 'com.android.support:design:26.0.2'
62+
compile 'com.android.support:appcompat-v7:26.0.2'
5863
// TODO if you use a lower version than 9.0.0 (min is 7.5.0) you should uncomment the exclude line to avoid errors
59-
compile 'com.google.android.gms:play-services:9.2.0'
64+
compile 'com.google.android.gms:play-services:11.4.2'
6065
// TODO add the following 2 lines if you exclude io.reactivex from Instabug
6166
// compile 'io.reactivex:rxjava:1.0.13'
6267
// compile 'io.reactivex:rxandroid:1.0.1'
63-
compile('com.instabug.library:instabug:4.2.10') {
68+
compile('com.instabug.library:instabug:4.3.3') {
6469
// TODO uncomment this line to exclude RxJava from Instabug and use your own version
6570
// exclude group: 'io.reactivex'
6671

app/src/main/java/com/example/instabug/ui/activities/MainActivity.java

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,11 @@
4141
import java.net.HttpURLConnection;
4242
import java.net.URL;
4343

44-
import butterknife.Bind;
45-
import butterknife.ButterKnife;
46-
import butterknife.OnClick;
47-
4844
public class MainActivity extends BaseActivity
4945
implements NavigationView.OnNavigationItemSelectedListener {
5046

51-
@Bind(R.id.drawer_layout)
5247
DrawerLayout drawer;
53-
@Bind(R.id.nav_view)
5448
NavigationView navigationView;
55-
@Bind(R.id.spinner)
5649
Spinner spinner;
5750
ImageView headerImage;
5851

@@ -63,22 +56,24 @@ public class MainActivity extends BaseActivity
6356
protected void onCreate(Bundle savedInstanceState) {
6457
super.onCreate(savedInstanceState);
6558
setContentView(R.layout.activity_main);
66-
ButterKnife.bind(this);
6759

6860
//Instabug logs
6961
InstabugLog.d("MainActivity - Created");
7062

7163
registerGCM();
7264

73-
headerImage = (ImageView) navigationView.getHeaderView(0).findViewById(R.id.headerImageView);
65+
drawer = findViewById(R.id.drawer_layout);
66+
navigationView = findViewById(R.id.nav_view);
67+
spinner = findViewById(R.id.spinner);
68+
headerImage = navigationView.getHeaderView(0).findViewById(R.id.headerImageView);
7469
headerImage.setOnClickListener(new View.OnClickListener() {
7570
@Override
7671
public void onClick(View v) {
7772
onHeaderImageClicked();
7873
}
7974
});
8075

81-
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
76+
Toolbar toolbar = findViewById(R.id.toolbar);
8277
setSupportActionBar(toolbar);
8378

8479
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
@@ -114,46 +109,38 @@ private void registerGCM() {
114109
startService(intent);
115110
}
116111

117-
@OnClick(R.id.feedback_fab)
118-
public void onFeedbackFABClicked() {
112+
public void onFeedbackFABClicked(View view) {
119113
Instabug.invoke();
120114
}
121115

122-
@OnClick(R.id.show_intro_message)
123-
public void onShowIntroMessageClicked() {
116+
public void onShowIntroMessageClicked(View view) {
124117
Instabug.showIntroMessage();
125118
}
126119

127-
@OnClick(R.id.start_feedback)
128-
public void onFeedbackClicked() {
120+
public void onFeedbackClicked(View view) {
129121
Instabug.invoke(InstabugInvocationMode.NEW_FEEDBACK);
130122
}
131123

132-
@OnClick(R.id.start_bug_report)
133-
public void onBugReportClicked() {
124+
public void onBugReportClicked(View view) {
134125
Instabug.invoke(InstabugInvocationMode.NEW_FEEDBACK);
135126
}
136127

137-
@OnClick(R.id.start_new_conversation)
138-
public void onNewConversationClicked() {
128+
public void onNewConversationClicked(View view) {
139129
Instabug.invoke(InstabugInvocationMode.NEW_CHAT);
140130
}
141131

142-
@OnClick(R.id.start_conversation_list)
143-
public void onConversationListClicked() {
132+
public void onConversationListClicked(View view) {
144133
Instabug.invoke(InstabugInvocationMode.CHATS_LIST);
145134
}
146135

147-
@OnClick(R.id.show_new_messages_count)
148-
public void onNewMessageCountClicked() {
136+
public void onNewMessageCountClicked(View view) {
149137
Toast.makeText(this,
150138
"Number of unread messages: " +
151139
String.valueOf(Instabug.getUnreadMessagesCount()), Toast.LENGTH_SHORT)
152140
.show();
153141
}
154142

155-
@OnClick(R.id.do_network_request)
156-
public void onDoNetworkRequestClicked(){
143+
public void onDoNetworkRequestClicked(View view) {
157144
new FetchMoviesData().execute();
158145
}
159146

@@ -207,7 +194,7 @@ public void onClick(DialogInterface dialog, int which) {
207194
Toast.makeText(this, "Coming soon", Toast.LENGTH_SHORT).show();
208195
}
209196

210-
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
197+
DrawerLayout drawer = findViewById(R.id.drawer_layout);
211198
drawer.closeDrawer(GravityCompat.START);
212199
return true;
213200
}

app/src/main/res/layout/app_bar_main.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
android:layout_height="wrap_content"
3131
android:layout_gravity="bottom|end"
3232
android:layout_margin="@dimen/fab_margin"
33-
android:src="@drawable/ic_fab_feedback"/>
33+
android:onClick="onFeedbackFABClicked"
34+
app:srcCompat="@drawable/ic_fab_feedback"/>
3435

3536
</android.support.design.widget.CoordinatorLayout>

app/src/main/res/layout/content_main.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@
2525
android:layout_width="match_parent"
2626
android:layout_height="wrap_content"
2727
android:padding="10dp"
28+
android:onClick="onShowIntroMessageClicked"
2829
android:text="@string/action_show_intro_message" />
2930

3031
<Button
3132
android:id="@+id/start_bug_report"
3233
android:layout_width="match_parent"
3334
android:layout_height="wrap_content"
35+
android:onClick="onBugReportClicked"
3436
android:padding="10dp"
3537
android:text="@string/action_send_bug_report" />
3638

@@ -39,34 +41,39 @@
3941
android:layout_width="match_parent"
4042
android:layout_height="wrap_content"
4143
android:padding="10dp"
44+
android:onClick="onFeedbackClicked"
4245
android:text="@string/action_send_feedback" />
4346

4447
<Button
4548
android:id="@+id/start_new_conversation"
4649
android:layout_width="match_parent"
4750
android:layout_height="wrap_content"
4851
android:padding="10dp"
52+
android:onClick="onNewConversationClicked"
4953
android:text="@string/action_start_new_conversation" />
5054

5155
<Button
5256
android:id="@+id/start_conversation_list"
5357
android:layout_width="match_parent"
5458
android:layout_height="wrap_content"
5559
android:padding="10dp"
60+
android:onClick="onConversationListClicked"
5661
android:text="@string/action_show_conversation_list" />
5762

5863
<Button
5964
android:id="@+id/show_new_messages_count"
6065
android:layout_width="match_parent"
6166
android:layout_height="wrap_content"
6267
android:padding="10dp"
68+
android:onClick="onNewMessageCountClicked"
6369
android:text="@string/action_show_new_messages_count" />
6470

6571
<Button
6672
android:id="@+id/do_network_request"
6773
android:layout_width="match_parent"
6874
android:layout_height="wrap_content"
6975
android:padding="10dp"
76+
android:onClick="onDoNetworkRequestClicked"
7077
android:text="@string/action_do_network_request" />
7178

7279
<LinearLayout

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
buildscript {
44
repositories {
55
jcenter()
6+
google()
67
}
78
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.3.3'
9+
classpath 'com.android.tools.build:gradle:3.0.0'
910
}
1011
}
1112

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Thu Mar 09 17:34:02 EET 2017
1+
#Wed Nov 01 12:44:15 EET 2017
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

0 commit comments

Comments
 (0)