Skip to content

TheLogicalBanya/GamificationReact-Native

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gamification for android & ios platform

This package provide integration with gamification provided by The Logical Banya.

Installation

You can install this package using npm:

npm install gamification-react-native

if getting any error install this package using npm:

npm install gamification-react-native react-native-webview react-native-orientation-locker --force

install pod for ios

pod install

Usage

1.create new page and import Gamification package & pass props.

import GamificationReactNative from "gamification-react-native";
import {useState} from "react";
import {Button} from "react-native";

export default (() => {
    const [open, setOpen] = useState(false);
    const baseUrl = "";
    const clientID = "";
    const clientKey = "";
    const userID = "";
    const username = "";
    const keyString = "";
    return (<>
        {open ?
            <GamificationReactNative
                baseUrl={baseUrl}
                clientID={clientID}
                clientKey={clientKey}
                userID={userID}
                username={username}
                keyString={keyString}
                onClose={() => setOpen(false)}/> :
            <Button title={'open'}
                    onPress={() => setOpen(true)}/>
        }

    </>);
})
Required parameters

baseUrl: "",
clientID: "",
key: "",
userID: "",
username: "",
keyString: "",

Take above parameters from provider.

*Note: for ios wrap in SafeAreaView for rendering.

also you can pass another optional props
1.utm_param1
2.utm_param2
3.utm_param3
4.utm_param4

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published