0.0.15 • Published 6 years ago

react-native-bpg v0.0.15

Weekly downloads
26
License
MIT
Repository
github
Last release
6 years ago

react-native-bpg

Getting started

$ npm install react-native-bpg --save

Mostly automatic installation

$ react-native link react-native-bpg

Manual installation

NDK should be installed. This can be done with SDK manager.

Project should contain ./android/local.properties with correct paths to SDK/NDK (it is possible to set up environment variables).

Windows example:

sdk.dir=D\:\\Development\\_SDK\\AndroidSDK\\AndroidSDK
ndk.dir=D\:\\Development\\_SDK\\AndroidSDK\\ndk-bundle

There will be the warnings during the native libraries build phase.

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.kornell.bpg.RNReactNativeBpgPackage; to the imports at the top of the file
  • Add new RNReactNativeBpgPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-bpg'
    project(':react-native-bpg').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-bpg/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-bpg')

iOS

Not implemented for iOS

Windows

Not implemented for Windows

Usage

Example project can be found in links section

Links

Thank to the author of this article

BPG

GIT:react-native-bpg-example

ToDo list

filter getList with .bpg$ pattern

add png support

add gif support

add download from web (check with self-signed ssl and provide option to enable skip-checking)

add methods for *AsPromise

rename current methods to *AsCallback

Troubleshooting

If native libs are not building, try several techniques to clean cache:

npm start -- --reset-cache

remove node_modules and install dependencies again with npm i

On Windows remove %USER_HOME%.gradle\caches\

On Mac or Linux: > rm -rf $HOME/.gradle/caches/

On Both

> cd android

> gradlew cleanBuildCache

then rebuild an application.

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago