小编Mik*_*Lin的帖子

如何在 Google Play Console 中发布 Android App Bundle?

如何在 Google Play Console 中发布 Android App Bundle?

环境:Android Studio 3.2

在“生成签名包或APK”之后,我得到了一个文件“app.aab”。如何在 Google Play Console 中发布此文件以及“Bundle”和 APK 之间有何不同?

谢谢。

android google-play google-play-console android-app-bundle

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

Cloud Functions-Cloud Firestore错误:无法获取serverTimestamp

Cloud Functions-Cloud Firestore错误:无法获取serverTimestamp

const admin = require('firebase-admin');
    exports.userlog = functions.firestore
    .document('user/{userId}')
    .onUpdate((change, context) => 
    { 
        const db = admin.firestore();
        //var timestamp = db.FieldValue.serverTimestamp();
        var timestamp = db.ServerValue.TIMESTAMP;
        ...
        return db.collection('userlog').add(
        {
            userId : previousValue.userId,
            ...
            timestamp: timestamp
        }).then(ref => 
        {
            return console.log('Added document with ID: ', ref.id);
        });
    });
Run Code Online (Sandbox Code Playgroud)

我分别遇到两个错误:

TypeError:无法读取未定义的属性“ serverTimestamp”

TypeError:无法读取未定义的属性“ TIMESTAMP”

javascript google-cloud-functions google-cloud-firestore

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

不推荐使用getPlaceDetectionClient(android.app.Activity,com.google.android.gms.location.places.PlacesOptions)

Android Studio 3.1.4

placeDetectionClient = Places.getPlaceDetectionClient(this, null);
Run Code Online (Sandbox Code Playgroud)

给出错误:

getPlaceDetectionClient(android.app.Activity, com.google.android.gms.location.places.PlacesOptions) is deprecated
Run Code Online (Sandbox Code Playgroud)

任何想法使用什么代替?谢谢

android google-places-api

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

如何从firebase-admin@5.12.0更新到firebase-admin@6.0.0?

1. D:\ Firebase> npm install firebase-functions @ latest firebase-admin @ latest --save

firebase-functions@2.0.5 postinstall D:\ Firebase \node_modules\firebase-functions

节点./upgrade-warning

======== WARNING! ========

This upgrade of firebase-functions contains breaking changes if you are upgrading from a version below v1.0.0.

To see a complete list of these breaking changes, please go to:

https://firebase.google.com/docs/functions/beta-v1-diff

npm WARN saveError ENOENT: no such file or directory, open 'D:\Firebase\package.json'

- mime-db@1.35.0 node_modules\compressible\node_modules\mime-db

- mime-db@1.35.0 node_modules\request\node_modules\mime-db

- mime-types@2.1.19 node_modules\request\node_modules\mime-types

D:\Firebase

+-- firebase-admin@6.0.0

| +-- @google-cloud/storage@1.7.0

| | +-- compressible@2.0.14 …
Run Code Online (Sandbox Code Playgroud)

npm firebase google-cloud-functions firebase-admin

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

使用JavaScript获取Firestore中按文档ID排序的数据?

使用Javascript在Firestore中获取按文档ID排序的数据

在Andorid中,我可以使用查询转到特定的文档

mQuery = docRef.whereEqualTo("name", name)
                .whereEqualTo("valid",true)
                .orderBy(FieldPath.documentId())
                .startAt(lastDocId)
                .limit(LIMIT);
Run Code Online (Sandbox Code Playgroud)

它可以工作,但是在Javascript中,我尝试复制一个类似的查询,但是没有用。

var db = firebase.firestore();
    var goQuery = docRef.where("name", "==", name)
                        .where("valid", "==", true)
                        .orderBy(db.FieldPath.documentId())
                        .startAfter("id0070")
                        .limit(LIMIT);
Run Code Online (Sandbox Code Playgroud)

它给出一个错误:

未捕获的TypeError:无法读取HTMLButtonElement.document.getElementById.onclick上未定义的属性“ documentId”

任何的想法?谢谢您的帮助。

javascript google-cloud-firestore

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

Firestore:如何从外部读取数据 void onComplete 方法

我从 Cloud Firestore 读取数据:

      firestoreDB.collection("events")
                .whereEqualTo("type", eventType)
                .get()
                .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
                    @Override
                    public void onComplete(@NonNull Task<QuerySnapshot> task) {
                        if (task.isSuccessful()) {
                           List<Event> eventList = new ArrayList<>();

                           for(DocumentSnapshot doc : task.getResult()){
                              Event e = doc.toObject(Event.class);
                              e.setId(doc.getId());
                               eventList.add(e);
                           }
               //do something with list of pojos retrieved

                        } else {
                            Log.d(TAG, "Error getting documents: ", task.getException());
                        }
                    }
 }); 
Run Code Online (Sandbox Code Playgroud)

由于 onComplete 是一个 void 方法,我如何从外部方法获取 eventList?

例如,我尝试过:

List<Event> ReadCollection()
{
   final List<Event> eventList = new ArrayList<>();
firestoreDB.collection("events")
                    .whereEqualTo("type", eventType)
                    .get()
                    .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
                        @Override …
Run Code Online (Sandbox Code Playgroud)

java android firebase google-cloud-firestore

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