Myket Install Referrer — LLM reference The Myket Android Install Referrer SDK reads the referrer recorded when an app's detail page is opened through Myket and the app is installed from Myket. Official sample: https://github.com/myketstore/referrer-sample Setup: - Add the Myket Maven repository (https://maven.myket.ir) to dependencyResolutionManagement in settings.gradle.kts. - Add implementation("ir.myket:referrersdk:1.0.3") to the app module; this is the SDK version used by the sample. - The SDK manifest declares permission ir.mservices.market.INSTALL_REFERRER and a package-visibility query for ir.mservices.market; inspect the merged manifest. - Myket must be installed with versionCode >= 1030. The SDK checks this before connecting. Flow: 1. Create MyketReferrerClient and call startConnection(InstallReferrerStateListener). 2. Read data only after InstallReferrerResponse.OK. SDK tries AIDL, then automatically falls back to Broadcast if AIDL connection fails. 3. Call getInstallReferrer() on a background thread; the Broadcast fallback may wait for a response or timeout. 4. Always call endConnection() when finished. Create a new client for another attempt. ReferrerDetails fields: - installReferrer: captured referrer string; may be empty. - referrerClickTimestampSeconds: Myket detail-page open time, Unix seconds. - installBeginTimestampSeconds: install-begin time, Unix seconds. - Timestamp 0 means unknown. Response codes: OK=0; SERVICE_DISCONNECTED=-1; FEATURE_NOT_SUPPORTED=1; DEVELOPER_ERROR=5; NOT_FOUND=6. Myket only returns a record for a package owned by the calling UID. FEATURE_NOT_SUPPORTED means Myket is missing, below version code 1030, or its service is unavailable. NOT_FOUND means no referrer record exists. Testing: Open the Myket page with a referrer parameter, install the app from Myket (do not sideload), launch it, and fetch the record. Sample package: ir.myket.referrersample. Test URI: myket://details?id=ir.myket.referrersample&referrer=my-referrer. A sideloaded install or an unrecorded referrer may return NOT_FOUND. For minified release builds, preserve com.myket.installreferrer.** with the ProGuard/R8 keep rules in the guide. Handle referrer data according to the app's privacy and attribution requirements.