05/15/2024 15:19:45

Bugly Channel Description

I. Overview

I. Overview

Tencent Bugly provides professional exception reporting and operation statistics for mobile app developers, so as to help the developers quickly find and resolve exceptions while grasping product operation trends and following up user feedbacks in a timely manner.

Note: Bugly and Firebase both have crash monitoring functions and are not incompatible to each other, so they cannot be accessed at the same time
II. Developer Platform Configuration

II. Developer Platform Configuration

If your game has registered the application on Bugly's official website and obtained the AppID parameter, it can directly use the parameters generated by the official website without making additional configurations in the Feiying system.

If your game does not register any application on Bugly's official website and has no application registration requirement on Bugly's official website, it can directly use the Feiying system to register the application and automatically generate BuglyID parameter (Parameter acquisition path: Feiying System> Game Management List Page> Game Details Page> SDK Parameters> BuglyID).

Note: The parameters generated by Bugly's official website and the parameters generated by the Feiying system cannot be mixed. When registering in the Feiying system, you can directly register a Bugly account. After adding the corresponding administrator, you can log into the Bugly management system. Adding path: Feiying System> Game Management List Page> Game Details Page> Function Synchronization> Add Account:

After entering the "Add Account" page, you can select the adding platform (Android/iOS) and operator type (administrator/normal member), enter the QQ account that needs to be added and then click the "Add" button to add the corresponding administrator. You can also choose to modify or delete the account's permissions if necessary:

2.1 Register an Account

Open Bugly Official Website , and select QQ login.

2.2 Create an App

  • Click on the menu bar in the top right corner: My Product.

  • Click on the new app

2.3 Configure App

After creating a new app, fill in the required content on the product page according to the requirements.

2.4 Other Steps

After the configuration is completed, get the app's APP ID

III. Android Project Configuration

III. Android Project Configuration

3.1 Permission Configuration

  • [Required] Permission list

    <uses-permission android: name="android.permission.INTERNET" />
    <uses-permission android: name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android: name="android.permission.ACCESS_WIFI_STATE" />
    

    [info] Precaution READ_PHONE_STATE is sensitive permission, mainly used to get device identifier
    READ_LOGS is sensitive permission, mainly used to read the device log

3.2 App ID Configuration

In the project file assets/MSDKConfig.ini, add configuration

[Bugly channel configuration ]
BUGLY_APP_ID_ANDROID = {BUGLY_APP_ID_ANDROID}
# [Optional configuration]
# Callbacks of error type are shielded, and other types of callbacks can normally trigger reporting. This configuration is disabled by default. The configuration is only available on Android
BUGLY_CLOSE_ERROR_CALLBACK_ANDROID = 0

[info] {MSDK_DEBUG} 1 means to turn on the debug mode, 0 means to turn off the debug mode {MSDK_DEBUG_CHANNEL} This switch is set to Bugly, which means to enable Bugly debugging. This switch takes effect only when {MSDK_DEBUG} is 1. They are in the same configuration file
{BUGLY_CLOSE_ERROR_CALLBACK_ANDROID} 1 means to shield the callback of error type, 0 means not to shield. 5.10 version adds this configuration.

3.3 [Optional]App Version Configuration

In the project file assets/MSDKConfig.ini, add configuration

[Bugly channel configuration ]
BUGLY_APP_VERSION = {YOUR_BUGLY_APP_VERSION}

[info]

  1. Change {YOUR_BUGLY_APP_VERSION} to the App version number defined by the game itself
  2. MSDK will ignore the BUGLY_APP_VERSION configuration defined by the game itself in AndroidManifest.xml
IV. iOS Project Configuration

IV. iOS Project Configuration

4.1 MSDK Environment Configuration

In the project, find MSDKAppSetting.bundle/MSDKConfig.ini file, and add the following configuration

[Bugly channel configuration ]
BUGLY_APP_ID_IOS = {BUGLY_APP_ID_IOS}
BUGLY_DEBUG = 1
# Block monitoring switch, which is disabled by default. If it is enabled, it is necessary to configure the block monitoring judgment interval, in seconds. This configuration is only available on iOS
BUGLY_BLOCK_MONITOR_ENABLE_IOS = 1
BUGLY_BLOCK_MONITOR_TIMEOUT_IOS = 3

4.2 System Library Dependency

    + SystemConfiguration.framework
    + Security.framework
    + libz.dylib or libz.tbd
    + libc++.dylib or libc++.tbd
V. Function Description

V. Function Description

5.1 Exception Reporting Function

For details about the example code, please refer to Exception Reporting module, corresponding to Bugly channel in it.

1) Introduction to reported information
1)Report the stack of the crash process, including error stack, system log, etc.;
2)Report the basic information of the current mobile phone, including device name (manufacturer, model), system version, the available proportion of disk, the available proportion of SD card, the available proportion of memory, etc.;

3)Report the User's openid, as shown in "User ID" in the figure below. The default user ID reported is MSDK openid, and setting user-defined user ID is also supported.

4)User-defined reported information
A. You can customize the log reported when your app crashes, as shown in the figure below. Select "User-defined Log" in "Track Log" to view logs:

B. You can set the key-value pair for key data and report it with crash information. As shown in the figure below, view the data in the valueMapOther.txt file of "Track Data >Attached Information":

C. You can set additional log/binary data report when crashing. Android's additional log and binary data are in extraMessage.txt and userExtraByteData of "Track Data >Attached Information":

The extra log of iOS is in crash_attach.log of "Track Data > Attached Information". Due to the design of Bugly platform, iOS does not have a binary file: userExtraByteData

5.2 Dynamically close Bugly reporting

  1. In some scenarios, apps do not need to report a crash, such as: some apps do not want to report to Bugly crashes triggered during the killing of processes; at this time, they can call this interface to close crash reporting, but other Bugly functions will not be affected; crashes triggered by the restart of the apps will be reported normally.
  2. Dynamically close Crash reporting. Crash reporting can be closed by calling this interface, but other Bugly functions will not be affected; crashes triggered by the restart of the app will be reported normally
  3. For the specific interface call, please refer to the "2.7 Dynamically Close Crash Reporting (Currently only supported by Bugly channel)" section in "Exception Reporting Module".
VI. FAQs

VI. FAQs

6.1 Unity Exception Capture Test

  • Proactively throw exception debugging, such as throw new System.ArgumentException ("Parameter cannot be null", "original");,
  • The reporting of scripts, exceptions, etc. is displayed in the Error Analysis list, and Crash Analysis list only shows the problems that cause the app to crash

    • In the console, view the exception report details in Exception report -> Error analysis

6.2 Precautions on Bugly Timeout Check Mechanism

  1. Crash callback cannot do long-term read/write operations;
  2. Bugly reporting timeout is 3 seconds;

6.3 Bugly initializes Crash

If Crash initialization fails, the "initCrash failed at GCloud.MSDK.MSDKCrash.InitCrash ()" stack will appear. In most cases, this is because the game does not access Firebase plugins, but CRASH_CHANNEL in MSDKConfig.ini adds "This is caused by Firebase".
Solution : Just delete Firebase in CRASH_CHANNEL.
Common stacks are as follows:

    GCloud.MSDK.MSDKCrash.InitCrash()
    GCloud.MSDK.MSDK.Init()
    MSDKMgr.Awake()
    AppRoot.OnAwakeInternal()
    LGame.Framework.SingletonMonoBehavior`1.Awake()



Copyright © 2024 MSDK.
All rights reserved.

results matching ""

    No results matching ""