Мероприятие мигало и закрывалось после отправки текста из действия в другое - PullRequest
0 голосов
/ 29 января 2020

В этом проекте я пытаюсь передать полученное имя пользователя и био-информацию другому виду деятельности. Раньше все работало нормально, но теперь, когда я нажимаю кнопку, которая помогает передать это другому действию, целевое задание будет отображаться с правильным именем пользователя и биографией менее секунды, а затем завершится сбоем. Кто-нибудь знает, что может быть причиной и как ее решить? Заранее спасибо!

Информация об ошибке: Экран экспонируется менее 1000 мс. Событие не отправлено. время: 494

Функция для передачи пользовательской информации после ее извлечения из базы данных

 public void retrieveUserInfo() {
        String UID = getUserID();
        mDocRef.collection("users").document(UID).get()
                .addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {
                    @Override
                    public void onComplete(@NonNull Task<DocumentSnapshot> task) {
                        if (task.isSuccessful()) {
                            DocumentSnapshot document = task.getResult();
                            if (document.exists()) {
                                Log.d(TAG, "DocumentSnapshot data: " + document.getData());
                                String userName = document.getString(USERNAME);
                                String shortBio = document.getString(BIO);
                                String URL = document.getString(PROFILE_URL);

                                    UserInfoConca = userName + "," + shortBio;
                                    Intent passUserInfo = new Intent(SignupActivity.this, HomeActivity.class);
                                    passUserInfo.putExtra("UserInfo", UserInfoConca);
                                    Log.d(TAG, "passed to home activity");
                                    startActivity(passUserInfo);

                            } else {
                                Log.d(TAG, "No such document");

                            }
                        } else {
                            Log.d(TAG, "get failed with ", task.getException());
                        }
                    }
                });
    }

Функция для установки отображаемого текста

public void displayProfile () {
        String[] UserInfo;
        try {
            UserInfo = getIntent().getExtras().getString("UserInfo").split(",");
        } catch (Exception e) {
            UserInfo = new String[] {"username", "bio"};
        }
        displayUserName = findViewById(R.id.usernameView);
        displayUserName.setText(UserInfo[0]);
        displayBio = findViewById(R.id.shortBio);
        displayBio.setText(UserInfo[1]);
}

Обновление трассировки стека:

01/29 13:13:36: Launching 'app' on Pixel 2 API 28.
$ adb shell am start -n "com.test.testauth/com.test.testauth.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Waiting for process to come online...
Connected to process 3280 on device 'Pixel_2_API_28 [emulator-5554]'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
I/m.test.testaut: Background concurrent copying GC freed 6707(2MB) AllocSpace objects, 4(80KB) LOS objects, 50% free, 1502KB/2MB, paused 5.886ms total 147.004ms
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
V/FA: Registered activity lifecycle callback
I/FirebaseInitProvider: FirebaseApp initialization successful
I/FirebaseAuth: [FirebaseAuth:] Preparing to create service connection to gms implementation
W/m.test.testaut: Accessing hidden method Landroid/graphics/drawable/Drawable;->getOpticalInsets()Landroid/graphics/Insets; (light greylist, linking)
    Accessing hidden field Landroid/graphics/Insets;->left:I (light greylist, linking)
    Accessing hidden field Landroid/graphics/Insets;->right:I (light greylist, linking)
    Accessing hidden field Landroid/graphics/Insets;->top:I (light greylist, linking)
    Accessing hidden field Landroid/graphics/Insets;->bottom:I (light greylist, linking)
V/FA: onActivityCreated
W/m.test.testaut: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection)
    Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection)
W/m.test.testaut: Accessing hidden method Landroid/widget/TextView;->getTextDirectionHeuristic()Landroid/text/TextDirectionHeuristic; (light greylist, linking)
D/OpenGLRenderer: Skia GL Pipeline
D/HostConnection: HostConnection::get() New Host Connection established 0xdd92b5f0, tid 3329
D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 
I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
    android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 1
W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
D/OpenGLRenderer: Swap behavior 0
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation: eglCreateContext: 0xdd905720: maj 3 min 0 rcv 3
D/EGL_emulation: eglMakeCurrent: 0xdd905720: ver 3 0 (tinfo 0xdd9039f0)
D/HostConnection: createUnique: call
    HostConnection::get() New Host Connection established 0xdd92b9b0, tid 3329
D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 
E/eglCodecCommon: GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1
V/FA: App measurement collection enabled
V/FA: App measurement enabled for app package, google app id: com.test.testauth, 1:1025582759602:android:e5c8e9405c19cbd62653ab
I/FA: App measurement initialized, version: 21028
    To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
    To enable faster debug mode event logging run:
      adb shell setprop debug.firebase.analytics.app com.test.testauth
D/FA: Debug-level message logging enabled
D/EGL_emulation: eglMakeCurrent: 0xdd905720: ver 3 0 (tinfo 0xdd9039f0)
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
I/AssistStructure: Flattened final assist data: 3136 bytes, containing 1 windows, 11 views
V/FA: Connecting to remote service
D/EGL_emulation: eglMakeCurrent: 0xdd905720: ver 3 0 (tinfo 0xdd9039f0)
D/EGL_emulation: eglMakeCurrent: 0xdd905720: ver 3 0 (tinfo 0xdd9039f0)
D/EGL_emulation: eglMakeCurrent: 0xdd905720: ver 3 0 (tinfo 0xdd9039f0)
V/FA: Connection attempt already in progress
V/FA: Activity resumed, time: 156035723
I/FA: Tag Manager is not found and thus will not be used
V/FA: Connection attempt already in progress
    Connection attempt already in progress
D/FA: Connected to remote service
V/FA: Processing queued up service tasks: 4
D/EGL_emulation: eglMakeCurrent: 0xdd905720: ver 3 0 (tinfo 0xdd9039f0)
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@40c521f
V/FA: Recording user engagement, ms: 3036
V/FA: Activity paused, time: 156038747
V/FA: onActivityCreated
W/DynamiteModule: Local module descriptor class for providerinstaller not found.
I/DynamiteModule: Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller: Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
I/m.test.testaut: The ClassLoaderContext is a special shared library.
I/chatty: uid=10087(com.test.testauth) AsyncTask #1 identical 1 line
I/m.test.testaut: The ClassLoaderContext is a special shared library.
D/EGL_emulation: eglMakeCurrent: 0xdd905720: ver 3 0 (tinfo 0xdd9039f0)
V/NativeCrypto: Registering com/google/android/gms/org/conscrypt/NativeCrypto's 286 native methods...
I/m.test.testaut: IncrementDisableThreadFlip blocked for 10.116ms
V/FA: Activity resumed, time: 156038962
W/m.test.testaut: Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (light greylist, reflection)
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
I/ProviderInstaller: Installed default security provider GmsCore_OpenSSL
V/FA: Screen exposed for less than 1000 ms. Event not sent. time: 437
V/FA: Activity paused, time: 156038971
V/FA: Activity resumed, time: 156039153
V/FA: Recording user engagement, ms: 1180
V/FA: Activity paused, time: 156040293
D/EGL_emulation: eglMakeCurrent: 0xdd905720: ver 3 0 (tinfo 0xdd9039f0)
D/FA: Application going to the background
V/FA: Activity resumed, time: 156045086
D/EGL_emulation: eglMakeCurrent: 0xdd905720: ver 3 0 (tinfo 0xdd9039f0)
I/AssistStructure: Flattened final assist data: 4296 bytes, containing 1 windows, 14 views
V/FA: Inactivity, disconnecting from the service
I/AssistStructure: Flattened final assist data: 4360 bytes, containing 1 windows, 14 views
I/AssistStructure: Flattened final assist data: 4384 bytes, containing 1 windows, 14 views
I/AssistStructure: Flattened final assist data: 4408 bytes, containing 1 windows, 14 views
I/AssistStructure: Flattened final assist data: 4448 bytes, containing 1 windows, 14 views
D/EmailPassword: createAccount:adlfjkdl@1234.com
I/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzaq@8c51d8a
W/m.test.testaut: Accessing hidden field Ljava/net/Socket;->impl:Ljava/net/SocketImpl; (light greylist, reflection)
W/m.test.testaut: Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (light greylist, linking)
W/m.test.testaut: Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (light greylist, linking)
W/m.test.testaut: Accessing hidden field Ljava/io/FileDescriptor;->descriptor:I (light greylist, JNI)
W/m.test.testaut: Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
W/m.test.testaut: Accessing hidden method Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V (light greylist, reflection)
W/m.test.testaut: Accessing hidden method Ldalvik/system/BlockGuard;->getThreadPolicy()Ldalvik/system/BlockGuard$Policy; (light greylist, linking)
    Accessing hidden method Ldalvik/system/BlockGuard$Policy;->onNetwork()V (light greylist, linking)
I/m.test.testaut: Background concurrent copying GC freed 27482(1295KB) AllocSpace objects, 14(952KB) LOS objects, 49% free, 4MB/9MB, paused 11.718ms total 324.168ms
D/UploadTask: Increasing chunk size to 524288
D/EmailPassword: DocumentSnapshot data: {profileURL=https://firebasestorage.googleapis.com/v0/b/ece1778-85aac.appspot.com/o/user%2Fprofile.jpg?alt=media&token=d035d6b4-d237-4ca8-ad91-b3e94f4702e1, bio=dakfjdkfjdk, username=daflakjfdkk}
D/EmailPassword: passed to home activity
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@372dee4
V/FA: Recording user engagement, ms: 13248
V/FA: Connecting to remote service
V/FA: Activity paused, time: 156058326
V/FA: onActivityCreated
W/m.test.testaut: Accessing hidden method Landroid/graphics/FontFamily;-><init>()V (light greylist, reflection)
    Accessing hidden method Landroid/graphics/FontFamily;->addFontFromAssetManager(Landroid/content/res/AssetManager;Ljava/lang/String;IZIII[Landroid/graphics/fonts/FontVariationAxis;)Z (light greylist, reflection)
    Accessing hidden method Landroid/graphics/FontFamily;->addFontFromBuffer(Ljava/nio/ByteBuffer;I[Landroid/graphics/fonts/FontVariationAxis;II)Z (light greylist, reflection)
    Accessing hidden method Landroid/graphics/FontFamily;->freeze()Z (light greylist, reflection)
    Accessing hidden method Landroid/graphics/FontFamily;->abortCreation()V (light greylist, reflection)
    Accessing hidden method Landroid/graphics/Typeface;->createFromFamiliesWithDefault([Landroid/graphics/FontFamily;Ljava/lang/String;II)Landroid/graphics/Typeface; (light greylist, reflection)
D/EGL_emulation: eglMakeCurrent: 0xdd905720: ver 3 0 (tinfo 0xdd9039f0)
D/userInfo: Document has been saved
V/FA: Connection attempt already in progress
V/FA: Activity resumed, time: 156058396
V/FA: Connection attempt already in progress
V/FA: Connection attempt already in progress
D/FA: Connected to remote service
V/FA: Processing queued up service tasks: 4
D/FirebaseAuth: Notifying id token listeners about user ( gwzQ7YpDaAWIn6HeJI7AzMDwCqv1 ).
    Notifying auth state listeners about user ( gwzQ7YpDaAWIn6HeJI7AzMDwCqv1 ).
D/EmailPassword: createUserWithEmail:success
V/FA: Screen exposed for less than 1000 ms. Event not sent. time: 494
V/FA: Activity paused, time: 156058878
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@d450e1a
V/FA: onActivityCreated
V/FA: Activity resumed, time: 156058965
D/EGL_emulation: eglMakeCurrent: 0xdd905720: ver 3 0 (tinfo 0xdd9039f0)
D/EGL_emulation: eglMakeCurrent: 0xdd905720: ver 3 0 (tinfo 0xdd9039f0)
D/EGL_emulation: eglMakeCurrent: 0xdd905720: ver 3 0 (tinfo 0xdd9039f0)
D/EGL_emulation: eglMakeCurrent: 0xdd905720: ver 3 0 (tinfo 0xdd9039f0)
D/EmailPassword: upload profile image successful
V/FA: Inactivity, disconnecting from the service
W/m.test.testaut: Accessing hidden method Ldalvik/system/CloseGuard;->close()V (light greylist, linking)
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...