Skip to content

Commit

Permalink
onesignal_default_sound fix
Browse files Browse the repository at this point in the history
* Fixed issue where onesignal_default_sound was not used by default.
  • Loading branch information
jkasten2 committed Jan 19, 2016
1 parent f513a8f commit 19a3bba
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ public void onUnsubscribeClicked(View v) {
@Override
protected void onPause() {
super.onPause();
mHelper.dispose();
if (mHelper != null)
mHelper.dispose();
}

@Override
Expand Down Expand Up @@ -135,7 +136,6 @@ public boolean onOptionsItemSelected(MenuItem item) {
}

// NotificationOpenedHandler is implemented in its own class instead of adding implements to MainActivity so we don't hold on to a reference of our first activity if it gets recreated.
@OneSignal.TiedToCurrentActivity
private class ExampleNotificationOpenedHandler implements NotificationOpenedHandler {
/**
* Callback to implement in your app to handle when a notification is opened from the Android status bar or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,10 @@ private static int getDrawableId(String name) {

private static Uri getCustomSound(JSONObject gcmBundle) {
int soundId;
String sound;
String sound = null;
try {
sound = gcmBundle.getString("sound");
if (gcmBundle.has("sound"))
sound = gcmBundle.getString("sound");
} catch (Throwable t) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
class OSUtils {
int getDeviceType() {
try {
// Class only available on the FireOS and only when the following is in the AndroidManifest.xml.
// <amazon:enable-feature android:name="com.amazon.device.messaging" android:required="false"/>
Class.forName("com.amazon.device.messaging.ADM");
return 2;
} catch (ClassNotFoundException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public void init() {
private static TrackGooglePurchase trackGooglePurchase;
private static TrackAmazonPurchase trackAmazonPurchase;

public static final String VERSION = "020007";
public static final String VERSION = "020008";

private static AdvertisingIdentifierProvider mainAdIdProvider = new AdvertisingIdProviderGPS();

Expand Down

0 comments on commit 19a3bba

Please sign in to comment.