小编san*_*vys的帖子

使用NDEF Android应用程序记录(AAR)获取NFC标签

我正在研究NFC应用程序.要启动我的应用程序,我正在使用带有AAR NDEF记录的NDEF标记.

这很好用.但现在我想直接用app阅读标签内容.我怎样才能做到这一点?

(它已经有效,当我从手机中取出标签并再次触摸它时,但我想取消这一步.)

表现:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="nfctagscanner.mobileapps.lt.nfctagscanner" >
    <uses-feature android:name="android.hardware.nfc" android:required="true"/>
    <uses-permission android:name="android.permission.NFC" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />


            </intent-filter>


        </activity>
        <activity
            android:name=".NFCScanActivity"
            android:label="@string/app_name" >
            <intent-filter>

                <action android:name="android.nfc.action.NDEF_DISCOVERED" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="nfctagscanner.mobileapps.lt.nfctagscanner" android:host="ext"
                    android:pathPrefix="/android.com:pkg" />
            </intent-filter>
        </activity>
    </application>

</manifest>
Run Code Online (Sandbox Code Playgroud)

而我只想获得NDEF_DISCOVERED意图.但我总是得到action.MAIN/category.LAUNCHER意图与我的调试器.

任何帮助将不胜感激.我基于此做了我的工作:Android/NFC:在没有新Intent的情况下在onCreate()中获取标签

android nfc intentfilter ndef android-applicationrecord

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

无需 Oauth 令牌即可访问 Google 电子表格 API

我已经阅读了谷歌电子表格文档https://developers.google.com/sheets/api/guides/authorizing并且它说,如果文档是公开的,你不需要 Oauth 2.0 并且 API 密钥就足够了。我正在尝试使用 hurl 和 api 密钥作为 parameter.it 进行测试请求,但它仍然给我错误,我需要使用 Oauth,有什么想法吗?

发布https://sheets.googleapis.com/v4/spreadsheets/16woR-nfy6KYBbkQpC2YOT1GzIean8rTzjueUnlzLMiE/values/Sheet1!A1:E1:append?valueInputOption=USER_ENTERED

回复: "error": {"code": 401,"message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.","status": "UNAUTHENTICATED"}

google-authentication google-sheets google-spreadsheet-api google-developers-console

6
推荐指数
2
解决办法
4633
查看次数


GreenDao查询相关对象中的LIKE子句

如何使用绿色dao查询查询对象,在相关对象中有LIKE sting?

      QueryBuilder qb = mainDao.queryBuilder();
  qb.where(
      mainDao.Properties.Date.between(filter.getFrom().getTime(), filter.getTo().getTime()),
      qb.or(mainDao.Properties.Details.like("%"+ string + "%"),
          infoDao.Properties.Display_name.like("%" + string + "%"),
          infoDao.Properties.Email.like("%" + string + "%"),
          infoDao.Properties.Phone.like("%" + string + "%"),
          infoDao.Properties.Code.like("%" + string + "%")));
Run Code Online (Sandbox Code Playgroud)

我构建的这种查询不起作用?有关如何管理检查相关字段属性的查询的任何建议吗?

MainDao拥有InfoDao的关键

我想我想做这样的事情:

    SELECT *
    FROM Main
    INNER JOIN Info
    ON Main.InfoID=Info.InfoID;
    WHERE Info.SomeField LIKE "%string%"
Run Code Online (Sandbox Code Playgroud)

mysql select android greendao

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