小编Kon*_*ras的帖子

Android 7意图附加功能缺失

有没有人知道Android 7.0(Nougat)与Android 6.0(Lollipop)相比如何处理意图附加功能有什么变化?

长话短说:我的应用程序可以在4.1(16)到6.0(23)的所有版本上运行,但在android 7.0(24)上崩溃了!

该应用程序创建一个待定意图,意图是具有附加功能的自定义广播接收器.然而,在android 7上,广播接收器接收的意图中不存在任何附加内容.

MainActivity.java

Intent intent = new Intent(context, PollServerReceiver.class);

// TODO:  Remove after DEBUGGING is completed!
intent.putExtra("TESTING1", "testing1");
intent.putExtra("TESTING2", "testing2");
intent.putExtra("TESTING3", "testing3");

 // PendingIntent to be triggered when the alarm goes off.
 final PendingIntent pIntent = PendingIntent.getBroadcast(context,
            PollServerReceiver.REQUEST_CODE, intent, PendingIntent.FLAG_UPDATE_CURRENT);

// Setup alarm to schedule our service runs.
AlarmManager alarm = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
alarm.setRepeating(AlarmManager.RTC_WAKEUP, firstRun, freqMilis, pIntent);
Run Code Online (Sandbox Code Playgroud)

PollServerReceiver.java

Bundle extras = intent.getExtras();
Log.d(TAG, "onReceive: TESTING1 = " + extras.getString("TESTING1")); // null here

// None of …
Run Code Online (Sandbox Code Playgroud)

android android-intent android-pendingintent android-broadcastreceiver android-7.0-nougat

7
推荐指数
1
解决办法
2966
查看次数

无法在 Google Play 商店中链接“Google Cloud Project”以进行 API 访问

我遇到一个问题,当我尝试将我的 PlayStore 链接到 Google Cloud 项目时,会显示错误。有 2 个选项:

  • 链接现有项目 - 下拉列表实际上在下拉列表中显示了我的云项目以供选择。
  • 创建新项目选择其中之一并单击“链接项目”会出现“发生意外错误。请重试。(76F5052F)”。旋转器无限旋转。

在此输入图像描述

我尝试了不同的浏览器,并且已经这样做了几天,只是为了确保这不是暂时的问题。

我还在 Google Cloud“API 和服务”中启用了“Google Play Android Developer API”。如果有任何差异,它也成功链接到 Firebase 项目。

我需要将该项目链接到 Google can 项目,以便我可以使用“Google Play Developer API”来验证应用程序购买收据。

我已阅读并尝试以下内容但没有成功。

任何指示/帮助将不胜感激。提前致谢!

android google-api google-cloud-platform google-play-console

5
推荐指数
1
解决办法
3310
查看次数

为什么正则表达式[az]*不会在字符串`The`中加工任何东西?

这似乎是一个基本的东西,但我无法理解它.

字符串: The

为什么正则表达式[a-z]+匹配,he但正则表达式[a-z]*根本不匹配?我看到它的方式是因为量词*匹配零次或多次,它应该与+前一个例子中的匹配相同he.量词+是如何在大写"T"之后处理字符串但量词*不是?

编辑:关于正则表达式工具我只是使用在线资源:http: //regexr.com/https://regex101.com/

regex

2
推荐指数
1
解决办法
129
查看次数

JS select2插件在选项打开时不滚动

我正在使用 JS Select2 库作为多个选项选择。选择位于内div其通过它的父滚动divcss- overflow-y: scroll。嵌套div滚动良好,直到打开一个选项。打开选项时,除非在“选择选项”上div滚动,否则变得无法滚动。不确定问题的根源是我的 html/css 还是它的select2lib。

在此先感谢您的帮助!

我的标记:

<div id="topcontainer" style="padding-top: 100px; overflow-y: scroll;  position: absolute; height: 1000px; width: 500px; background: #6d3353">
<div id="parent" style="position: relative; height: 3000px; width: 200px; background: #e4b9b9">
    <select class="js-example-basic-multiple" name="states[]" multiple="multiple">
        <option value="AL">aaaaaaa</option>
        <option value="AL">bbbbbbb</option>
        <option value="AL">ccccccc</option>
        <option value="WY">ddddddd</option>
    </select>
    <script>

        $(document).ready(function () {
            $('.js-example-basic-multiple').select2();
        });
    </script>
</div>
Run Code Online (Sandbox Code Playgroud)

html javascript css jquery-select2

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