Skip to content

Add more comments to sample code - #25

Merged
yangling1985 merged 1 commit into
mainfrom
yangling/update_demo_app_sample_code
Oct 7, 2025
Merged

yangling1985 merged 1 commit into
mainfrom
yangling/update_demo_app_sample_code

Conversation

@yangling1985

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds instructional comments to sample code for an advertising SDK, providing guidance to developers on replacing placeholder values with their own provisioned IDs and parameters.

  • Added comments instructing developers to replace app ID, org ID, and user ID placeholders
  • Updated existing comments to be more descriptive and actionable
  • Improved documentation for SDK initialization parameters and custom parameters

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
NativeBannerMultiFormatActivity.kt Added comments for app ID, org ID, and user ID parameters
InterstitialFormatActivity.kt Added comments for app ID, org ID, and user ID parameters
BannerActivity.kt Added comments for app ID, org ID, and user ID parameters with slight wording variations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

.setPlacement(placementId)
.setAdSize(AdSize(300, 250, false, false))
.setCustomParams(mapOf("user_id" to "177905312"))
.setCustomParams(mapOf("user_id" to "177905312")) // Please replace with current app user id (ppid))

Copilot AI Oct 7, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra closing parenthesis in comment - should be single closing parenthesis.

Suggested change
.setCustomParams(mapOf("user_id" to "177905312")) // Please replace with current app user id (ppid))
.setCustomParams(mapOf("user_id" to "177905312")) // Please replace with current app user id (ppid)

Copilot uses AI. Check for mistakes.
// 1. init MSP SDK
val initParams = object : MSPInitializationParameters {
override fun getAppId(): Int {
// Please replace with your own provisioned app id

Copilot AI Oct 7, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Comment wording is inconsistent with other files. Should use 'current' instead of 'your own' to match the pattern used in other activity files.

Suggested change
// Please replace with your own provisioned app id
// Please replace with current provisioned app id

Copilot uses AI. Check for mistakes.
}

override fun getOrgId(): Int {
// Please replace with your own provisioned org id

Copilot AI Oct 7, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Comment wording is inconsistent with other files. Should use 'current' instead of 'your own' to match the pattern used in other activity files.

Suggested change
// Please replace with your own provisioned org id
// Please replace with current provisioned org id

Copilot uses AI. Check for mistakes.
@yangling1985
yangling1985 merged commit af88637 into main Oct 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants