Skip to content

Conversation

@lposen
Copy link
Contributor

@lposen lposen commented Oct 10, 2025

🔹 JIRA Ticket(s) if any

✏️ Description

Adds the embedded tab to example app

Tests

  1. cd into the example folder and run:
    yarn install
    watchman watch-del-all
    yarn start --reset-cache
  2. In a separate terminal, cd into the example folder then build for either ios (yarn ios) or android (yarn android)
  3. The example app should open, and should contain a tab which reads "Embedded":
    Screenshot 2025-10-14 at 3 42 55 PM

@lposen lposen changed the base branch from master to loren/embedded/master October 10, 2025 22:10
@github-actions
Copy link

github-actions bot commented Oct 10, 2025

Lines Statements Branches Functions
Coverage: 51%
52.02% (283/544) 27.14% (57/210) 50.24% (101/201)

@qltysh
Copy link

qltysh bot commented Oct 10, 2025

Diff Coverage: The code coverage on the diff in this pull request is 100.0%.

Total Coverage: This PR will decrease coverage by 0.27%.

File Coverage Changes
Path File Coverage Δ Indirect
src/core/classes/Iterable.ts -0.3
🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

This is from Qlty Cloud, the successor to Code Climate Quality. Learn more.

@qltysh
Copy link

qltysh bot commented Oct 10, 2025

1 new issue

Tool Category Rule Count
qlty Structure Function with high complexity (count = 15): requestNotificationPermission 1

This is from Qlty Cloud, the successor to Code Climate Quality. Learn more.

@lposen lposen changed the base branch from loren/embedded/master to jwt/MOB-12298-new-improve-logger October 10, 2025 23:43
@lposen lposen added the embedded Issues/PRs related to Embedded Messages label Oct 14, 2025
@lposen lposen changed the base branch from jwt/MOB-12298-new-improve-logger to loren/embedded/master October 14, 2025 20:25
Comment on lines +14 to +47
const requestNotificationPermission = async () => {
if (Platform.OS === 'android') {
const apiLevel = Platform.Version; // Get the Android API level

if (apiLevel >= 33) {
// Check if Android 13 or higher
try {
const granted = await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS,
{
title: 'Notification Permission',
message:
'This app needs access to your notifications for push, in-app messages, embedded messages and more.',
buttonNeutral: 'Ask Me Later',
buttonNegative: 'Cancel',
buttonPositive: 'OK',
}
);
if (granted === PermissionsAndroid.RESULTS.GRANTED) {
console.log('Notification permission granted');
} else {
console.log('Notification permission denied');
}
} catch (err) {
console.warn(err);
}
} else {
// For Android versions below 13, notification permission is generally not required
// or is automatically granted upon app installation.
console.log(
'Notification permission not required for this Android version.'
);
}
}
Copy link

Choose a reason for hiding this comment

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

Function with high complexity (count = 15): requestNotificationPermission [qlty:function-complexity]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

embedded Issues/PRs related to Embedded Messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants