小编Shi*_*S R的帖子

Android中的SVG支持

我们将开发一个Android应用程序,用于显示svg格式的autocad绘图文件,其中ecma脚本正在使用.我们在模拟器中测试了应用程序并在webview中打开了svg文件.我们的问题是XML标签中的ecmascript不是在android中的webview中执行的.我们知道android只支持3.0版的SVG.它不支持svg中的ecmascript吗?

提前致谢

        final String mimeType = "text/html"; 
        final String encoding = "utf-8"; 
        final String html = "<p><img height=\"600px\" width=\"600px \"src=\"file:///android_asset/drawing3.svg\" /></p>"; 


        WebView wv = (WebView) findViewById(R.id.webview_component); 
        wv.getSettings().setJavaScriptEnabled(true); 
        wv.loadDataWithBaseURL("fake://not/needed", html, mimeType, encoding, ""); 
Run Code Online (Sandbox Code Playgroud)

Ragards Shibu

svg android webview

6
推荐指数
1
解决办法
8556
查看次数

AppPool 回收后运行 ASP.Net Core 后台任务

我有一个在 Windows 服务器上运行的 asp.net 核心应用程序。这是使用一些后台任务来使用外部服务来获取数据。我们面临一个问题,在我们的应用程序池回收/重新启动后,后台任务没有运行。这仅在我们访问应用程序后运行。我们找到了一篇关于此的文章。

https://weblog.west-wind.com/posts/2013/Oct/02/Use-IIS-Application-Initialization-for-keeping-ASPNET-Apps-alive

由于本文描述了asp.net应用程序,下面的代码将在.net核心应用程序中替代上述解决方案

public class Startup 
{
    public void Configure(IApplicationBuilder app) 
    {
        var applicationLifetime = app.ApplicationServices.GetRequiredService<IApplicationLifetime>();
        applicationLifetime.ApplicationStopping.Register(OnShutdown);
    }

    private void OnShutdown()
    {
     // Do your cleanup here
    }
}
Run Code Online (Sandbox Code Playgroud)

有没有其他工作可以解决这个问题?

application-pool recycle asp.net-core

5
推荐指数
0
解决办法
913
查看次数

标签 统计

android ×1

application-pool ×1

asp.net-core ×1

recycle ×1

svg ×1

webview ×1