我在一些我无法测试的手机上遇到问题(这是第一个问题)我正在尝试构建一个可以从camera2 API录制的服务.但是当我将应用程序发送到后台时,在某些手机上似乎存在我目前无法解决的问题.我只有日志,无法弄清楚应用程序无法正常工作的主要原因.
由于这个类太大而不能在这里显示为代码,你可以在这里找到它:https: //github.com/Astyan42/RecordingService/blob/master/RecordingService.java
这是给定的日志文件:https: //github.com/Astyan42/RecordingService/blob/master/logcat.txt
谢谢你的帮忙
我使用 ASP.NET Core 作为 api,但找不到配置身份以返回 401 而不是重定向到登录页面的方法。我使用 IdentityServerAuthentication 中间件。
在 Startup.cs 中,我提供了以下选项:
var options = new IdentityServerAuthenticationOptions
{
Authority = Configuration.GetConnectionString("Authority"),
ScopeName = "scopeName",
RequireHttpsMetadata = false,
};
app.UseIdentityServerAuthentication(options);
Run Code Online (Sandbox Code Playgroud)