Git Product home page Git Product logo

cordova-adapter's Introduction

cordova-adapter - 安卓原生应用嵌入ionic/cordova

平台:Android minSdkVersion:19 工具:Android Studio 1

使用方法:

1.在Project的build.gradle中加入JitPack仓库,加在allprojects下面,buildscript中不要加

allprojects {
  repositories {
      ...
      maven { url 'https://jitpack.io' }
  }
}

2.在app的build.gradle中加入以下代码

dependencies {
    ...
    implementation 'com.github.macrine:cordova-adapter:2.2'
    ...
}

完成后同步一下

3.将ionic项目build安卓平台后的assets/www文件夹放到服务器上,得到一个url

4.在java代码中调用:

Intent intent=new Intent(MainActivity.this,CordovaViewerActivity.class);
intent.putExtra("url","https://url);
startActivity(intent);

MainActivity是当前的Activity https://url 是第3步得到的url

支持的cordova插件

1.Device,cordova-plugin-device
2.cordova-plugin-ionic-keyboard
3.cordova-plugin-camera

cordova-adapter's People

Contributors

macrine 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.