Giter Site home page Giter Site logo

Android 预加载问题 about vassonic HOT 4 CLOSED

tencent avatar tencent commented on May 2, 2024
Android 预加载问题

from vassonic.

Comments (4)

vasdeveloper avatar vasdeveloper commented on May 2, 2024

你的理解是对的,没有效果的原因是少了第二步:

1.调用preCreateSession之后,sonic会进行页面预加载;

2.用户点击页面的时候,需要触发绑定WebView;

上述逻辑可以在demo中了解~

from vassonic.

caoqianghui avatar caoqianghui commented on May 2, 2024

SonicEngine.getInstance().preCreateSession(url,sessionConfigBuilder.build());总是返回的false,为什么呢?用户点击页面的时候,需要触发绑定WebView,这个是怎么绑定的,在demo中也没有发现相关代码

from vassonic.

vasdeveloper avatar vasdeveloper commented on May 2, 2024
  1. preCreateSession返回false,要么当前预加载池里面已经存在该会话了,要么当前Session已经被绑定Webview加载了;

2.仅需要提前进行preCreateSession,用户点击页面的时候,按照正常的Sonic加载即可,框架会自动关联预加载的会话。

from vassonic.

yingguohuo avatar yingguohuo commented on May 2, 2024

下载DEMO,点了preCreateSession,显示success。但是运行LOAD WITH SONIC,依然无效果,每次都是显示:非Sonic模式,耗时没有少于1300ms。和用LOAD WITHOUT SONIC效果一摸一样啊

from vassonic.

Related Issues (20)

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.