Skip to content

Commit 7fe51d9

Browse files
committed
Use v2.5.1
1 parent f05265a commit 7fe51d9

File tree

5 files changed

+39
-48
lines changed

5 files changed

+39
-48
lines changed

CHANGELOG.md

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

4+
Version 2.5.1 *(2016-07-11)*
5+
----------------------------
6+
7+
* Various bug fixes
8+
49
Version 2.5.0 *(2016-06-27)*
510
----------------------------
611

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,38 +28,38 @@ Using Instabug is as easy as "Get ready, Get set, Go".
2828

2929
Grab your desired flavour via Gradle:
3030
```groovy
31-
compile 'com.instabug.library:instabug:2.5.0'
31+
compile 'com.instabug.library:instabug:2.5.1'
3232
```
3333
or
3434
```groovy
35-
compile 'com.instabug.library:instabugcompat:2.5.0'
35+
compile 'com.instabug.library:instabugcompat:2.5.1'
3636
```
3737
or
3838
```groovy
39-
compile 'com.instabug.library:instabugabs:2.5.0'
39+
compile 'com.instabug.library:instabugabs:2.5.1'
4040
```
4141
or via Maven: (if you're that kind of person :bowtie:)
4242
```xml
4343
<dependency>
4444
<groupId>com.instabug.library</groupId>
4545
<artifactId>instabug</artifactId>
46-
<version>2.5.0</version>
46+
<version>2.5.1</version>
4747
</dependency>
4848
```
4949
or
5050
```xml
5151
<dependency>
5252
<groupId>com.instabug.library</groupId>
5353
<artifactId>instabugcompat</artifactId>
54-
<version>2.5.0</version>
54+
<version>2.5.1</version>
5555
</dependency>
5656
```
5757
or
5858
```xml
5959
<dependency>
6060
<groupId>com.instabug.library</groupId>
6161
<artifactId>instabugabs</artifactId>
62-
<version>2.5.0</version>
62+
<version>2.5.1</version>
6363
</dependency>
6464
```
6565

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ dependencies {
3636
compile 'com.android.support:design:23.2.0'
3737
compile 'com.android.support:appcompat-v7:23.2.0'
3838
// 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
39-
compile 'com.google.android.gms:play-services:9.0.0'
39+
compile 'com.google.android.gms:play-services:9.2.0'
4040
// TODO add the following 2 lines if you exclude io.reactivex from Instabug
4141
// compile 'io.reactivex:rxjava:1.0.13'
4242
// compile 'io.reactivex:rxandroid:1.0.1'
43-
compile('com.instabug.library:instabug:2.5.0') {
43+
compile('com.instabug.library:instabug:2.5.1') {
4444
// TODO uncomment this line to exclude RxJava from Instabug and use your own version
4545
// exclude group: 'io.reactivex'
4646

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.example.instabug.gcm;
2+
3+
/**
4+
* Created by vezikon on 6/27/16.
5+
*/
6+
public class QuickstartPreferences {
7+
public static final String SENT_TOKEN_TO_SERVER = "sentTokenToServer";
8+
public static final String REGISTRATION_COMPLETE = "registrationComplete";
9+
public static final String SENDER_ID = "1069386656344";
10+
}

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

Lines changed: 16 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@
99
import com.example.instabug.R;
1010
import com.example.instabug.ui.views.CustomGoogleMap;
1111
import com.google.android.gms.maps.GoogleMap;
12+
import com.google.android.gms.maps.OnMapReadyCallback;
1213
import com.google.android.gms.maps.SupportMapFragment;
1314
import com.google.android.gms.maps.model.LatLng;
1415
import com.google.android.gms.maps.model.MarkerOptions;
1516
import com.instabug.library.Instabug;
1617

17-
public class GoogleMapsActivity extends AppCompatActivity {
18+
public class GoogleMapsActivity extends AppCompatActivity implements OnMapReadyCallback {
1819

1920
private GoogleMap mMap; // Might be null if Google Play services APK is not available.
20-
private CustomGoogleMap customGoogleMap;
21+
private SupportMapFragment mapFragment;
2122

2223
@Override
2324
protected void onCreate(Bundle savedInstanceState) {
@@ -30,45 +31,10 @@ public void onClick(View v) {
3031
Toast.makeText(GoogleMapsActivity.this, "File saved to be uploaded", Toast.LENGTH_SHORT).show();
3132
}
3233
});
33-
setUpMapIfNeeded();
34-
}
35-
36-
@Override
37-
protected void onResume() {
38-
super.onResume();
39-
setUpMapIfNeeded();
40-
}
41-
42-
/**
43-
* Sets up the map if it is possible to do so (i.e., the Google Play services APK is correctly
44-
* installed) and the map has not already been instantiated.. This will ensure that we only ever
45-
* call {@link #setUpMap()} once when {@link #mMap} is not null.
46-
* <p/>
47-
* If it isn't installed {@link com.google.android.gms.maps.SupportMapFragment} (and
48-
* {@link com.google.android.gms.maps.MapView MapView}) will show a prompt for the user to
49-
* install/update the Google Play services APK on their device.
50-
* <p/>
51-
* A user can return to this FragmentActivity after following the prompt and correctly
52-
* installing/updating/enabling the Google Play services. Since the FragmentActivity may not
53-
* have been completely destroyed during this process (it is likely that it would only be
54-
* stopped or paused), {@link #onCreate(Bundle)} may not be called again so we should call this
55-
* method in {@link #onResume()} to guarantee that it will be called.
56-
*/
57-
private void setUpMapIfNeeded() {
58-
// Do a null check to confirm that we have not already instantiated the map.
59-
if (mMap == null) {
60-
// Try to obtain the map from the SupportMapFragment.
61-
mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))
62-
.getMap();
63-
customGoogleMap = new CustomGoogleMap(getSupportFragmentManager().findFragmentById(R.id.map).getView(), mMap);
64-
// TODO add this so that instabug recognizes you have a map and show it in the screenshot
65-
Instabug.addCapturableView(customGoogleMap);
6634

67-
// Check if we were successful in obtaining the map.
68-
if (mMap != null) {
69-
setUpMap();
70-
}
71-
}
35+
mapFragment =
36+
(SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
37+
mapFragment.getMapAsync(this);
7238
}
7339

7440
/**
@@ -80,4 +46,14 @@ private void setUpMapIfNeeded() {
8046
private void setUpMap() {
8147
mMap.addMarker(new MarkerOptions().position(new LatLng(0, 0)).title("Marker"));
8248
}
49+
50+
@Override
51+
public void onMapReady(GoogleMap googleMap) {
52+
mMap = googleMap;
53+
CustomGoogleMap customGoogleMap = new CustomGoogleMap(mapFragment.getView(), mMap);
54+
// TODO add this so that instabug recognizes you have a map and show it in the screenshot
55+
Instabug.addCapturableView(customGoogleMap);
56+
57+
setUpMap();
58+
}
8359
}

0 commit comments

Comments
 (0)