![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@1ziton/react-native-baidulocation
Advanced tools
Readme
$ npm install @1ziton/react-native-baidulocation --save
$ react-native link @1ziton/react-native-baidulocation
Libraries
➜ Add Files to [your project's name]
node_modules
➜ react-native-baidulocation
and add RNbaidulocation.xcodeproj
libRNbaidulocation.a
to your project's Build Phases
➜ Link Binary With Libraries
Cmd+R
)<android/app/src/main/java/[...]/MainApplication.java
import com.dashixiong.baidulocation.LocationReactPackage;
to the imports at the top of the filenew LocationReactPackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:
include ':@1ziton_react-native-baidulocation'
project(':@1ziton_react-native-baidulocation').projectDir = new File(rootProject.projectDir, '../node_modules/@1ziton/react-native-baidulocation/android')
android/app/build.gradle
:
implementation project(':@1ziton_react-native-baidulocation')
1.在主项目的build.gradle 配置key
defaultConfig {
manifestPlaceholders = [
BAIDU_APPKEY:'yourkey'
]
}
2.在主项目的AndroidManifest.xml配置
<meta-data
android:name="com.baidu.lbsapi.API_KEY"
android:value="${BAIDU_APPKEY}" />
import {
NativeModules
} from 'react-native';
const { LocationModule } = NativeModules;
componentDidMount() {
if (Platform.OS === ANDROID) {
LocationModule.locationNow();
}
}
LocationModule.getLocation()
.then((result) => {
const locationData = JSON.parse(result);
if (locationData.errorCode === 0) {
let { longitude, latitude } = locationData;
} else ToastUtil.center('定位失败,请重试');
})
.catch(() => {
ToastUtil.center('定位失败,请重试');
});
}
FAQs
The npm package @1ziton/react-native-baidulocation receives a total of 1 weekly downloads. As such, @1ziton/react-native-baidulocation popularity was classified as not popular.
We found that @1ziton/react-native-baidulocation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.