GithubHelp home page GithubHelp logo

ionic-portals-android's Introduction


⚡️ A supercharged native Web View for Android ⚡️

Follow @ionicframework


Ionic Portals is a supercharged native Web View component for iOS and Android that lets you add web-based experiences to native mobile apps. It enables native and web teams to better collaborate and bring new and existing web experiences to mobile in a safe, controlled way.

Getting Started

See our docs to get started with Portals.

Registration

The Ionic Portals libraries for Android and iOS require a free license key to use. Once you have integrated Portals into your project, login to your ionic account to get a key. See our doc on how to register for free and get your Portals license key and refer to the Android or iOS getting started guides to see where to add your key.

FAQ

What is the pricing for Portals use?

Businesses with more than USD $1 million in annual revenue are required to purchase a license from Ionic before using Portals in production.

Is Portals Open Source?

See our license.

How is Portals Related to Capacitor and Ionic?

Ionic Portals is a solution that lets you add web-based experiences to your native mobile apps. Portals uses Capacitor as a bridge between the native code and the web code to allow for cross-communication between the two layers. Because Portals uses Capacitor under the hood, you are able to use any existing Capacitor Plugins while continuing to use your existing native workflow.

Ionic Framework is the open-source mobile app development framework that makes it easy to build top quality native and progressive web apps with web technologies. Your web experiences can be developed with Ionic, but it is not necessary to use Portals.

ionic-portals-android's People

Contributors

carlpoole avatar jthoms1 avatar steven0351 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ionic-portals-android's Issues

Jetpack compose crash

java.lang.ClassCastException: androidx.compose.ui.tooling.PreviewActivity cannot be cast to androidx.appcompat.app.AppCompatActivity
at io.ionic.portals.PortalView.loadPortal(PortalView.kt:79)
at io.ionic.portals.PortalView.(PortalView.kt:41)
at io.ionic.portals.PortalView.(PortalView.kt:34)
at com.terra.app.MainActivityKt$MainContent$1$1$1.invoke(MainActivity.kt:62)
at com.terra.app.MainActivityKt$MainContent$1$1$1.invoke(MainActivity.kt:61)`

PortalView has an unnecessary dependency on AppCompatActivity, and fails without throwing a proper exception.

PortalView requires its containing activity to implement AppCompatActivity. This is bad for applications using Jetpack Compose, because AppCompatActivity requires you to use a theme (AppCompatTheme) that is incompatible with the recommended Material theme in Compose apps.

This is an overly restrictive approach, for two reasons:

  1. The only method PortalView uses from AppCompatActivity, getSupportFragmentManager, is actually from AppCompatActivity's base class, FragmentActivity. The cast here could be to FragmentActivity, which is from androidx.fragment and has a minSDK of 14 vs Portals overall min SDK of 22.
  2. Because all that's required is the FragmentManager, PortalView could optionally take a Lazy-valued FragmentManager as a required constructor parameter. This would be first evaluated at load time, after the view has been attached, and remove the dependency on a particular implementation of Activity.

Finally, if after all this the PortalView is still in an invalid context, the code should check the cast and throw a proper exception with an informative error message, as opposed to a class cast exception.

Duplicate Class

Having a problem compiling my project, getting the following error.

Duplicate class androidx.lifecycle.ViewModelLazy found in modules lifecycle-viewmodel-2.5.1-runtime (androidx.lifecycle:lifecycle-viewmodel:2.5.1) and lifecycle-viewmodel-ktx-2.3.1-runtime (androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1)

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.