Skip to content

Commit

Permalink
Set proper icon for disable location notification (Only for android) (#…
Browse files Browse the repository at this point in the history
…1339)

* proper app icon is set before disable location notification for android

* change color of icon

* Formatted file
  • Loading branch information
shilpashendre authored Aug 5, 2020
1 parent 1adb125 commit 1a6cbaa
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions app/services/LocationService.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import PushNotification from 'react-native-push-notification';
import { CROSSED_PATHS } from '../constants/storage';
import { GetStoreData } from '../helpers/General';
import languages from '../locales/languages';
import { Colors } from '../styles';

let isBackgroundGeolocationConfigured = false;
const LOCATION_DISABLED_NOTIFICATION_ID = '55';
Expand Down Expand Up @@ -94,6 +95,8 @@ export default class LocationServices {
id: LOCATION_DISABLED_NOTIFICATION_ID,
title: languages.t('label.location_disabled_title'),
message: languages.t('label.location_disabled_message'),
smallIcon: 'ic_notificationicon',
color: Colors.primaryBlue,
});
} else {
PushNotification.cancelLocalNotifications({
Expand Down Expand Up @@ -128,6 +131,8 @@ export default class LocationServices {
PushNotification.localNotification({
title: languages.t('label.location_disabled_title'),
message: languages.t('label.location_disabled_message'),
smallIcon: 'ic_notificationicon',
color: Colors.primaryBlue,
});
console.log('[INFO] stop');
});
Expand Down Expand Up @@ -156,6 +161,8 @@ export default class LocationServices {
PushNotification.localNotification({
title: languages.t('label.location_disabled_title'),
message: languages.t('label.location_disabled_message'),
smallIcon: 'ic_notificationicon',
color: Colors.primaryBlue,
});

BackgroundGeolocation.removeAllListeners();
Expand Down

0 comments on commit 1a6cbaa

Please sign in to comment.