Coder Social home page Coder Social logo

ccxwebview's Introduction

CCXWebview

A example code of show Webview in a cocos2d-x games on both iOS and Android platform, If you want to use the code please fork this project, and I am happy to know that.

This project is under MIT License.

##Main Info

Base cocos2d-x version: 2.0.4

##Usage

###iOS usage

Just open the project in XCode, build & run.

###Andriod usage

  1. In terminal: cd CCXWebview/CCXWebview/CCXWebview/proj.android (this is a example, maybe diffirent with yours).

    ./build_native.sh , run this c++ .so build shell, this will result in a .so file.

  2. New Android project from existing code, choose the android.proj folder.

    Build and run your code.

  3. (Optional) If you wanna use this CCXWebview in your project, please notice the /Classes/webview/android/BFWebView.cpp file. Please modify the kJNIPakageName constant varible on the top of this .cpp file.

warning!!!! can't find jni.h
Do not add the /Classes/webview/android folder into any platform project other than Android, this folder is for android only, if you add it into other platform there may be some build errors.
check the Android.mk to learn how to handle this.


If you don't know much about JNI please read articles below(all written in chinese).

How to use JNI

How show webview in coco2d-x games

ccxwebview's People

Contributors

go3k avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.