尝试让用户使用GOOGLE登录时出现以下错误
我尝试了很多东西而没有任何作用
我最初使用了以下代码
app.UseGoogleAuthentication(clientId: "APIKEY.apps.googleusercontent.com",
clientSecret: "SECRET-K");
Run Code Online (Sandbox Code Playgroud)
我也试过以下
app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions()
{
ClientId = "APIKEY.apps.googleusercontent.com",
ClientSecret = "SECRET-K",
CallbackPath = new PathString("/signin-google")
});
Run Code Online (Sandbox Code Playgroud)
没有运气,
我不知道我做错了什么,
有没有人遇到过这个问题并且有解决方案
非常感谢
干杯
我正在使用Msal来AcquireTokenInteractive
使用 Microsoft Graph SDK
简单的代码
try
{
string[] scopes = { "user.read", "files.read" };
IPublicClientApplication app = PublicClientApplicationBuilder.Create(appId).WithRedirectUri(redirectUri).Build();
AuthenticationResult result = null;
var accounts = await app.GetAccountsAsync();
try
{
result = await app.AcquireTokenSilent(scopes, accounts.FirstOrDefault()).ExecuteAsync();
}
catch (MsalUiRequiredException ex)
{
try
{
result = await app.AcquireTokenInteractive(scopes).ExecuteAsync();
}
catch (MsalException X)
{
ViewBag.ST = X.Message;
}
catch (Exception X)
{
ViewBag.ST = X.Message;
}
}
}
catch (Exception X)
{
ViewBag.ST = X.Message;
}
Run Code Online (Sandbox Code Playgroud)
我试图获得用户的同意以允许我的应用程序读取数据,但是当代码到达它时,app.AcquireTokenInteractive(scopes).ExecuteAsync();
它只会继续无限加载。
肯定在做一些奇怪的事情,知道那是什么吗?
今天我第一次开始研究 Chrome 扩展,我有一个非常愚蠢的问题,我确定根据谷歌搜索,答案是否定的,但我只是想从这里的社区中确定。
干杯
数周以来,我一直在寻找解决方案,同时将其保留在积压中。
我有一个简单的网络视图如下
WebView webView = FindViewById<WebView>(Resource.Id.webviewVideo);
webView.ClearCache(true);
webView.ClearHistory();
webView.SetWebChromeClient( new WebChromeClient { });
webView.Settings.JavaScriptEnabled = true;
webView.Settings.LoadWithOverviewMode = true;
webView.Settings.UseWideViewPort = true;
webView.LoadDataWithBaseURL("https://.", iFrameString, "text/html", "UTF-8", null);
Run Code Online (Sandbox Code Playgroud)
我将iFrame传递给它,视频加载并播放正常,但全屏选项不可用。
我尝试过的解决方案
启用JavaScript
设置WebChromeClient
LoadDataWithBaseURL与 https://
allowfullscreen
例如,我也有以下iframe
<iframe width="560" height="315" src="https://www.youtube.com/embed/somevideoID" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
Run Code Online (Sandbox Code Playgroud)
有什么解决办法吗?
首先,很抱歉提出这样的问题,但是在下载最新的Google IO
应用程序之后,
我只是喜欢底部的布局,如以下屏幕截图所示
作为android开发的新手,我不知道从哪里开始,有什么想法如何用XML中的圆圈星号实现此底部布局?有人知道这种设计叫什么吗?
layout android material-design floating-action-button material-components-android
我一直在尝试设置Bottomsheet
Google 在其应用程序(例如 GOOGLE NEWS 等)中使用的方式,
这就是 Google 的
Bottomsheet
样子,如下所示
我的
Bottomsheet
样子如下
马上你会注意到两件事,
我的代码bottomsheet
如下(为了简单起见,我删除了控件)
我的BottomSheet.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/bottom_sheet"
android:elevation="10dp"
android:minHeight="300dp"
app:behavior_peekHeight="120dp"
app:layout_behavior="android.support.design.widget.BottomSheetBehavior">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginBottom="30dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<!--controls here-->
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
我在我的代码中调用它如下
View view = LayoutInflater.Inflate(Resource.Layout.MyBottomSheet, null);
Dialog dialog = new BottomSheetDialog(this);
dialog.SetContentView(view);
Run Code Online (Sandbox Code Playgroud)
如何获得圆角并确保底部导航不透明?
我一直在阅读文章/论坛并遵循一些有关如何设置它的指南,但是我仍然无法运行引导程序和 jquery。
通过yarn安装了bootstrap、jquery和easyAutocomplete,之后我继续设置我的env.js以启用jquery。
const { environment } = require('@rails/webpacker')
const webpack = require("webpack")
environment.plugins.append('Provide',
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery/src/jquery',
Popper: ['popper.js', 'default']
}))
module.exports = environment
Run Code Online (Sandbox Code Playgroud)
在我的 application.js 中看起来像这样
import 'bootstrap'
import '../stylesheets/application'
import './popover'
import './carousel'
import 'easy-autocomplete'
import './autocomplete'
require("@rails/ujs").start()
require("turbolinks").start()
require("@rails/activestorage").start()
require("channels")
Run Code Online (Sandbox Code Playgroud)
在导入简单自动完成引导程序和 jquery 之前,可以正常工作并加载。可以使用自定义脚本进行轮播等,但是在我导入简单自动完成后,一切都中断了。似乎 jquery 不再被识别,因为我的轮播和弹出框停止工作,最重要的是我在控制台中收到以下错误
未捕获的类型错误:$(...).easyAutocomplete 不是 :1:12 的函数
有人可以给我一些关于如何解决这个问题的指示吗?
jquery twitter-bootstrap easyautocomplete webpacker ruby-on-rails-6
我在尝试创建.exe
文件来运行 JavaFX 应用程序时遇到了一些困惑。
在 Eclipse 中我使用 VM 参数:
--module-path "\path\to\javafx-sdk-14.0.1\lib" --add-modules javafx.controls,javafx.fxml
Run Code Online (Sandbox Code Playgroud)
但我不确定如何添加它Launch4j
才能运行它。有人可以告诉我如何添加它吗?
最近我更新了一个应用程序以使用通知通道在奥利奥上显示通知,因为奥利奥需要通知通道,这工作正常,但旧的 android 版本不支持通知通道,因此我试图检查你是否在奥利奥上运行然后使用创建通知通道功能。问题是当我使用以下内容进行检查时
Build.VERSION_CODES.O
Run Code Online (Sandbox Code Playgroud)
它说它已被弃用?互联网上的每个旧帖子都指的是 Build.VERSION_CODES.O,但它已被弃用。
有没有办法检查这个?我该怎么办?
不确定我在哪里犯了错误,但是ImageView
一旦用户在图像选择器中选择了图像,我已经尝试了所有方法来显示图像,但是让我们将图像选择器放在一边我什至无法通过直接提供 FullPath 来显示图像如下面的代码(也没有出现任何错误)
尝试 1 - 位图
string IMGpath = "/storage/emulated/0/DCIM/Camera/IMG_20151102_193132.jpg"
var imgFile = new File(IMGpath);
if (imgFile.Exists())
{
Bitmap bitmap = BitmapFactory.DecodeFile(imgFile.AbsolutePath);
_imageview.SetImageBitmap(bitmap);
}
else
{
Log.Info("AAABL", "No file");
}
Run Code Online (Sandbox Code Playgroud)
尝试 2 - 带选项的位图
string IMGpath = "/storage/emulated/0/DCIM/Camera/IMG_20151102_193132.jpg"
var imgFile = new File(IMGpath);
if (imgFile.Exists())
{
BitmapFactory.Options bmOptions = new BitmapFactory.Options();
Bitmap bitmap = BitmapFactory.DecodeFile(imgFile.AbsolutePath, bmOptions);
bitmap = Bitmap.CreateScaledBitmap(bitmap, 200,200, true);
_imageview.SetImageBitmap(bitmap);
}
else
{
Log.Info("AAABL", "No file");
}
Run Code Online (Sandbox Code Playgroud)
尝试3 - 自定义库 另外,我尝试使用一个库 如下 …
我在 firebase Messaging - Documentation 这里创建了一个设备组 并取回notification_key
现在,当我使用notification_key
Firebase 控制台使用它发送消息时,它们会被发送并传递到所有注册的设备。
但是在控制台之外(例如在邮递员中)做同样的事情是行不通的,但是我确实得到了所有设备的成功消息和零故障,但设备从未收到该消息。
邮差回复
{
"success": 7,
"failure": 0
}
Run Code Online (Sandbox Code Playgroud)
我的帖子请求如下
curl -X POST \
https://fcm.googleapis.com/fcm/send \
-H 'Authorization: key=***' \
-H 'Content-Type: application/json' \
-d '{
"to": "my_notification_key",
"data": {
"hello": "test !"
}
}'
Run Code Online (Sandbox Code Playgroud)
我觉得我错过了一些东西,但根据提供的文档,它应该需要发送消息
来自 Firebase 文档
https://fcm.googleapis.com/fcm/send
Content-Type:application/json
Authorization:key=AIzaSyZ-1u...0GBYzPu7Udno5aA
{
"to": "aUniqueKey",
"data": {
"hello": "This is a Firebase Cloud Messaging Device Group Message!",
}
}
Run Code Online (Sandbox Code Playgroud)
当我收到成功消息但该消息从未传递到设备时,知道这里出了什么问题吗?
我将 YouTube 链接复制并粘贴到iframe
标签内,播放视频时收到以下消息
“发生错误。请稍后重试”。
我将嵌入内容放在链接内。
这是我的代码:
<iframe width="450" height="200"
src="https://www.youtube.com/embed?v=xZs6nCUQuuM">
</iframe>
Run Code Online (Sandbox Code Playgroud) android ×5
asp.net-mvc ×3
xamarin ×3
c# ×2
firebase ×1
google-api ×1
google-oauth ×1
html ×1
iframe ×1
java ×1
javafx ×1
jquery ×1
launch4j ×1
layout ×1
material-components-android ×1
webpacker ×1