Technology Encyclopedia Home >How to get the package name in the live SDK?

How to get the package name in the live SDK?

In the Live SDK, the package name is typically required for app identification, especially when integrating with platforms like Android that use package names for app uniqueness. Here's how to get it:

  1. For Android Apps:
    The package name is defined in your app's AndroidManifest.xml file. Look for the package attribute in the <manifest> tag.
    Example:

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.example.yourapp">
    

    Here, com.example.yourapp is the package name.

  2. For iOS Apps:
    iOS doesn't use "package names" like Android, but the equivalent identifier is the Bundle ID, found in your app's Info.plist file under CFBundleIdentifier.
    Example:

    <key>CFBundleIdentifier</key>
    <string>com.example.yourapp</string>
    
  3. Using Tencent Cloud Live SDK:
    When integrating with Tencent Cloud Live SDK, you'll need to provide the package name (Android) or Bundle ID (iOS) during SDK initialization or when configuring services like push notifications or analytics. For example, in Tencent Cloud's Android SDK, you might set the package name programmatically or via configuration files.

If you're using Tencent Cloud services, ensure the package name or Bundle ID matches the one registered in your Tencent Cloud developer console to avoid authentication or service access issues.