npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-bqgame

v2.0.1

Published

bqgame for react native

Readme

react-native-bqgame

react native bqgame

安装

yarn add react-native-bqgame

Android 配置

1.android/app/src/main/androidManifest.xml

<manifest ..>

<!-- 广告需要使用 http client 在 Android 9.0 会 class not found 而加的配置 -->
<uses-library android:name="org.apache.http.legacy" android:required="false" />

</manifest>

2.依赖冲突 / 启用X5

参阅 build.gradle 解决以下问题

  • 若编译过程,相关依赖版本冲突
  • x5 内核集成的相关设置

X5 不支持64 位,若集成 X5,需要修改 android/app/build.gradle,移除 abi 中的 arm64-v8a

...
splits {
    abi {
        reset()
        enable enableSeparateBuildPerCPUArchitecture
        universalApk false  // If true, also generate a universal APK
        include "armeabi-v7a", "x86", ["arm64-v8a",] "x86_64"
    }
}
...

iOS 配置

还未开发 iOS 版本,TODO

使用

import {Platform} from 'react-native';
import {initSdk, BqGameCenter} from 'react-native-bqgame'

const x5 = Platform.OS === 'android' && Platform.Version < 22 ? null : false;

// 初始化 链式设置参数
initSdk({
    .....
})

// 初始化之后 使用组件载入游戏列表
<BqGameCenter onLoad={callback}/>

initSdk 参数见:index.js

更多API

import * as bqgame from 'react-native-bqgame'

// 若自行渲染列表, 调用该函数登录
bqgame.initAccount()

// 设置游戏账户, 需使用 onLogin 回调得到的 account
bqgame.setAccount(String account)

// 退出当前账户
bqgame.clearAccount()

// 是否启用x5
bqgame.isX5().then((Boolean x5) => { })

// 静音
bqgame.isMute().then((Boolean mute) => { })
bqgame.mute(Boolean mute)

// 屏幕常亮
bqgame.isScreenOn().then((Boolean screenOn) => { })
bqgame.setScreenOn(Boolean mute)

// 退出游戏 是否显示二次确认框
bqgame.isQuitConfirm().then((Boolean screenOn) => { })
bqgame.setQuitConfirm(Boolean yes);

// 设置退出游戏 是否显示推荐游戏
bqgame.isQuitRecommend().then((Boolean screenOn) => { })
bqgame.setQuitRecommend(Boolean yes);

// 是否显示列表的 福利入口
bqgame.isRewarded().then((Boolean screenOn) => { })
bqgame.setRewarded(Boolean yes);

// 所有游戏列表
bqgame.getGameList().then( lists => { } )

// 热门推荐游戏列表
bqgame.getHotList().then( lists => { } )

// 最近上新游戏列表
bqgame.getNewList().then( lists => { } )

// 获取最近3个常玩游戏
bqgame.getLastPlayList().then( lists => { } )

// 由 gameId 获取单个游戏信息
bqgame.getLastPlayList(String gameId).then( info => { } )

// 由 gameId 获取在线人数
bqgame.getPlayNumbers(String gameId).then( numbers => { } )

// 游戏是否存在
bqgame.hasGame(String gameId).then( has => { } )

// 开始游戏
bqgame.startGame(String gameId)