
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
react-native-add-shortcut
Advanced tools
React Native Add Shortcut - Adding shortcuts on android
Library for creating Android App Shortcuts in React Native.
Google Official intro for App Shortcuts
If your app targets Android 7.1 (API level 25) or higher, you can define shortcuts to specific actions in your app. These shortcuts can be displayed in a supported launcher. Shortcuts let your users quickly start common or recommended tasks within your app.
25
0.40
$ npm install react-native-add-shortcut --save
$ react-native link react-native-add-shortcut
android/app/src/main/java/[...]/MainActivity.java
new AddShortcutPackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:
include ':react-native-add-shortcut'
project(':react-native-add-shortcut').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-add-shortcut/android')
android/app/build.gradle
:
compile project(':react-native-add-shortcut')
25
in android/app/build.gradle
: android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.test"
minSdkVersion 16
targetSdkVersion 25
}
Import the package
import AddShortcut from 'react-native-add-shortcut';
Add Dynamic App Shortcut
AddShortcut.setDynamicShortcuts([
{
name: 'Android',
imageUrl: 'https://sdtimes.com/wp-content/uploads/2017/03/android-1904852_1920.jpg',
deepLink: 'fb://profile/423556347'
},
{
name: 'Android Studio',
imageUrl: 'https://sdtimes.com/wp-content/uploads/2018/09/image1a.png',
deepLink: 'fb://page/346556456'
},
{
name: 'Apple',
imageUrl: 'https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Apple-Apple.svg/1000px-Apple-Apple.svg.png',
deepLink: 'fb://group/234536456'
}
])
Add Pinned App Shortcut
AddShortcut.setPinnedShortcuts({
name: 'Apple',
imageUrl: 'https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Apple-Apple.svg/1000px-Apple-Apple.svg.png',
deepLink: 'fb://group/234536456'
})
Options Meaning
Name | Type | Description |
---|---|---|
name | String | Short label, Long label and ID. |
imageUrl | String | Image url to fetch for the icons. |
deepLink | String | Deep link to open when tapping the shortcut. |
Remove All Dynamic Shortcuts
AddShortcut.removeAllDynamicShortcuts()
Get Dynamic Shortcuts - return List<ShortcutInfo>
AddShortcut.getDynamicShortcuts()
FAQs
React Native Add Shortcut - Adding shortcuts on android
The npm package react-native-add-shortcut receives a total of 129 weekly downloads. As such, react-native-add-shortcut popularity was classified as not popular.
We found that react-native-add-shortcut demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.