Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification/local notify #439

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from
Open

Conversation

shreya-mishra
Copy link
Contributor

@shreya-mishra shreya-mishra commented Aug 28, 2024

Date: 29-09-2024

Developer Name: @divyansh0908


Issue Ticket Number

#438

Description

This update marks the completion of the remaining tasks from TCR. The rest of the changes made for this TCR can be found in this (https://github.com/Real-Dev-Squad/mobile-app/pull/439)[PR]. Additionally, This update also include a script that creates google-services.json, with support from env.

Documentation Updated?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Screenshots

Screenshot 1
Screenshot 2024-10-02 at 9 32 33AM Screenshot 2024-10-02 at 9 52 10AM
WhatsApp.Video.2024-10-01.at.23.15.03.mp4

Test Coverage

Screenshot 1
Screenshot 2024-10-01 at 10 46 40PM Screenshot 2024-10-01 at 10 54 15PM

Additional Notes

@divyansh0908 divyansh0908 mentioned this pull request Sep 29, 2024
10 tasks
"@react-native-masked-view/masked-view": "^0.2.6",
"@react-native-picker/picker": "^2.7.7",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • why are we adding this package in this pr?

@@ -0,0 +1,22 @@
import PushNotification from 'react-native-push-notification';

const LocalNotification = () => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Can we export this directly instead of using the default export? It would be easy to find references to LocalNotification once they are used in multiple places.

const key = Date.now().toString(); // Key must be unique everytime
PushNotification.createChannel(
{
channelId: key, // (required)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • how will the notification work if the channelId is different everytime?

importance: 4, // (optional) default: 4. Int value of the Android notification importance
vibrate: true, // (optional) default: true. Creates the default vibration patten if true.
},
(created) => console.log(`createChannel returned '${created}'`), // (optional) callback returns whether the channel was created, false means it already existed.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • do we need this? where are the logs stored?

// process the notification here
},
// Android only: GCM or FCM Sender ID
senderID: '1234567890',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • why are we hardcoding this id?

userNameDropDown: {
padding: 20,
borderBottomColor: 'white',
width: '90%',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 90% seems random can you please paste a screenshot of how this looks and is there any other way to achieve the same thing?

padding: scale(10),
borderRadius: 8,
backgroundColor: StyleConfig.colors.whiteInput,
fontSize: scale(12),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • do we just scale the font to set a font size or is there another way to handle this?

@@ -191,6 +183,7 @@ const AuthScreen = () => {
device_id: deviceId,
}),
});
console.log('🚀 ~ getAuthStatus ~ data:', data);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

@@ -209,6 +202,7 @@ const AuthScreen = () => {
]);
} else {
await data.json();
console.log('dataa>>>', data.json());
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

@@ -442,3 +446,46 @@ export const overallTaskProgress = async (
console.error('API error:', err);
}
};

export const postFcmToken = async (fcmToken: string, token: string) => {
console.log('token is ', `${Config.RDS_SESSION}=${token}`);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants