vybekiit 0.7.26 → 0.7.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/dist/bin.js +3891 -1301
  2. package/dist/global-skills/aws-cdk/SKILL.md +19 -5
  3. package/dist/global-skills/aws-cdk/references/fast-deployments.md +191 -0
  4. package/dist/global-skills/aws-cdk/references/troubleshooting-deployment.md +16 -0
  5. package/dist/global-skills/aws-cloudformation/SKILL.md +16 -26
  6. package/dist/global-skills/aws-cloudformation/references/check-cloudformation-template-compliance.script.md +7 -3
  7. package/dist/global-skills/aws-cloudformation/references/cloudformation-language-server.md +177 -0
  8. package/dist/global-skills/aws-cloudformation/references/cloudformation-pre-deploy-validation.script.md +8 -2
  9. package/dist/global-skills/aws-cloudformation/references/persist-template-context.script.md +5 -8
  10. package/dist/global-skills/aws-cloudformation/references/retrieve-template-context.script.md +1 -1
  11. package/dist/global-skills/aws-cloudformation/references/security-considerations.md +51 -0
  12. package/dist/global-skills/aws-cloudformation/references/troubleshoot-failed-stack.script.md +138 -0
  13. package/dist/global-skills/aws-cloudformation/references/{validate-cloudformation-template.script.md → validate-with-cfn-lint.script.md} +15 -27
  14. package/dist/global-skills/aws-cloudformation/references/validate-with-cloudformation-validate.script.md +181 -0
  15. package/dist/global-skills/aws-cloudformation/references/validation-tool-selection.md +44 -0
  16. package/dist/global-skills/aws-serverless/SKILL.md +9 -1
  17. package/dist/global-skills/aws-serverless/references/architecture.md +3 -1
  18. package/dist/global-skills/aws-serverless/references/lambda.md +3 -1
  19. package/dist/global-skills/aws-serverless/references/orchestration.md +1 -0
  20. package/dist/global-skills/better-auth-best-practices/SKILL.md +18 -8
  21. package/dist/global-skills/eas-app-stores/SKILL.md +31 -15
  22. package/dist/global-skills/eas-app-stores/agents/openai.yaml +2 -2
  23. package/dist/global-skills/eas-app-stores/references/ios-app-store.md +37 -32
  24. package/dist/global-skills/eas-app-stores/references/native-ios.md +167 -0
  25. package/dist/global-skills/eas-app-stores/references/play-store.md +3 -7
  26. package/dist/global-skills/eas-app-stores/references/testflight.md +39 -35
  27. package/dist/global-skills/eas-simulator/SKILL.md +48 -26
  28. package/dist/global-skills/eas-simulator/references/controllers.md +32 -3
  29. package/dist/global-skills/eas-simulator/references/run-your-app.md +34 -4
  30. package/dist/global-skills/eas-simulator/references/troubleshooting.md +8 -4
  31. package/dist/global-skills/eas-update/SKILL.md +146 -0
  32. package/dist/global-skills/eas-update/agents/openai.yaml +4 -0
  33. package/dist/global-skills/expo-animation/RECIPES.md +2 -2
  34. package/dist/global-skills/expo-animation/SKILL.md +9 -2
  35. package/dist/global-skills/expo-brownfield/SKILL.md +18 -11
  36. package/dist/global-skills/expo-brownfield/agents/openai.yaml +2 -2
  37. package/dist/global-skills/expo-brownfield/references/brownfield-integrated.md +94 -69
  38. package/dist/global-skills/expo-brownfield/references/brownfield-isolated.md +40 -42
  39. package/dist/global-skills/expo-brownfield/references/comparison.md +5 -5
  40. package/dist/global-skills/expo-brownfield/references/feature-integration.md +163 -0
  41. package/dist/global-skills/expo-brownfield/references/troubleshooting.md +17 -17
  42. package/dist/global-skills/expo-brownfield/references/version-compatibility.md +40 -0
  43. package/dist/global-skills/expo-data-fetching/SKILL.md +27 -6
  44. package/dist/global-skills/expo-design-system/SKILL.md +27 -7
  45. package/dist/global-skills/expo-design-system/references/audit.md +7 -2
  46. package/dist/global-skills/expo-design-system/references/native-slop.md +74 -0
  47. package/dist/global-skills/expo-examples/SKILL.md +0 -1
  48. package/dist/global-skills/expo-examples/references/catalog.md +1 -1
  49. package/dist/global-skills/expo-migrate-module/SKILL.md +21 -10
  50. package/dist/global-skills/expo-migrate-module/references/compatibility.md +80 -23
  51. package/dist/global-skills/expo-migrate-module/references/migration-map.md +162 -11
  52. package/dist/global-skills/expo-native-ui/SKILL.md +25 -16
  53. package/dist/global-skills/expo-native-ui/agents/openai.yaml +2 -2
  54. package/dist/global-skills/expo-native-ui/references/controls.md +5 -46
  55. package/dist/global-skills/expo-native-ui/references/icons.md +21 -2
  56. package/dist/global-skills/expo-native-ui/references/media.md +15 -20
  57. package/dist/global-skills/expo-native-ui/references/visual-effects.md +12 -11
  58. package/dist/global-skills/expo-overview/SKILL.md +17 -12
  59. package/dist/global-skills/expo-router/SKILL.md +5 -3
  60. package/dist/global-skills/expo-router/references/tabs.md +5 -5
  61. package/dist/global-skills/expo-upgrade/SKILL.md +3 -1
  62. package/dist/global-skills/expo-web-to-native/references/false-friends.md +2 -2
  63. package/dist/global-skills/expo-web-to-native/references/native-patterns.md +1 -1
  64. package/dist/global-skills/firebase-ai-logic-basics/SKILL.md +13 -16
  65. package/dist/global-skills/firebase-ai-logic-basics/references/ios_setup.md +4 -5
  66. package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_android.md +4 -4
  67. package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_web.md +3 -3
  68. package/dist/global-skills/firebase-auth-basics/SKILL.md +11 -6
  69. package/dist/global-skills/firebase-auth-basics/references/client_sdk_android.md +4 -5
  70. package/dist/global-skills/firebase-auth-basics/references/client_sdk_web.md +3 -3
  71. package/dist/global-skills/firebase-auth-basics/references/flutter_setup.md +24 -25
  72. package/dist/global-skills/firebase-auth-basics/references/security_rules.md +4 -2
  73. package/dist/global-skills/firebase-crashlytics/references/android_setup.md +7 -4
  74. package/dist/global-skills/firebase-crashlytics/references/ios_setup.md +2 -3
  75. package/dist/global-skills/firebase-data-connect/SKILL.md +2 -1
  76. package/dist/global-skills/firebase-data-connect/examples.md +4 -4
  77. package/dist/global-skills/firebase-data-connect/reference/config.md +5 -4
  78. package/dist/global-skills/firebase-data-connect/reference/realtime.md +1 -2
  79. package/dist/global-skills/firebase-data-connect/reference/sdk_flutter.md +2 -2
  80. package/dist/global-skills/firebase-data-connect/reference/sdk_ios.md +2 -2
  81. package/dist/global-skills/firebase-data-connect/reference/sdk_web.md +17 -6
  82. package/dist/global-skills/firebase-data-connect/reference/security.md +5 -5
  83. package/dist/global-skills/firebase-data-connect/templates.md +2 -1
  84. package/dist/global-skills/firebase-firestore/SKILL.md +20 -8
  85. package/dist/global-skills/firebase-firestore/references/enterprise/android_sdk_usage.md +5 -4
  86. package/dist/global-skills/firebase-firestore/references/enterprise/data_model.md +12 -3
  87. package/dist/global-skills/firebase-firestore/references/enterprise/indexes.md +16 -18
  88. package/dist/global-skills/firebase-firestore/references/enterprise/provisioning.md +1 -1
  89. package/dist/global-skills/firebase-firestore/references/enterprise/python_sdk_usage.md +5 -1
  90. package/dist/global-skills/firebase-firestore/references/enterprise/web_sdk_usage.md +7 -7
  91. package/dist/global-skills/firebase-firestore/references/standard/android_sdk_usage.md +5 -5
  92. package/dist/global-skills/firebase-firestore/references/standard/flutter_setup.md +4 -4
  93. package/dist/global-skills/firebase-firestore/references/standard/indexes.md +16 -18
  94. package/dist/global-skills/firebase-firestore/references/standard/provisioning.md +1 -1
  95. package/dist/global-skills/firebase-remote-config-basics/SKILL.md +0 -5
  96. package/dist/global-skills/firebase-remote-config-basics/references/android_setup.md +36 -8
  97. package/dist/global-skills/firebase-remote-config-basics/references/ios_setup.md +1 -7
  98. package/dist/global-skills/firebase-security-rules-auditor/SKILL.md +17 -6
  99. package/dist/global-skills/{firebase-firestore/references/standard/security_rules.md → firestore-rules-creation/SKILL.md} +24 -13
  100. package/dist/global-skills/grow-my-customers/SKILL.md +23 -0
  101. package/dist/global-skills/instrument-feature-flags/SKILL.md +25 -25
  102. package/dist/global-skills/instrument-feature-flags/references/adding-feature-flag-code.md +141 -285
  103. package/dist/global-skills/instrument-feature-flags/references/android.md +6 -15
  104. package/dist/global-skills/instrument-feature-flags/references/api.md +4 -11
  105. package/dist/global-skills/instrument-feature-flags/references/best-practices.md +1 -13
  106. package/dist/global-skills/instrument-feature-flags/references/django.md +14 -27
  107. package/dist/global-skills/instrument-feature-flags/references/dotnet.md +20 -79
  108. package/dist/global-skills/instrument-feature-flags/references/elixir.md +1 -9
  109. package/dist/global-skills/instrument-feature-flags/references/flask.md +13 -13
  110. package/dist/global-skills/instrument-feature-flags/references/flutter.md +3 -24
  111. package/dist/global-skills/instrument-feature-flags/references/go.md +3 -15
  112. package/dist/global-skills/instrument-feature-flags/references/ios.md +4 -17
  113. package/dist/global-skills/instrument-feature-flags/references/java.md +5 -13
  114. package/dist/global-skills/instrument-feature-flags/references/laravel.md +13 -17
  115. package/dist/global-skills/instrument-feature-flags/references/next-js.md +25 -32
  116. package/dist/global-skills/instrument-feature-flags/references/nodejs.md +8 -15
  117. package/dist/global-skills/instrument-feature-flags/references/php.md +1 -15
  118. package/dist/global-skills/instrument-feature-flags/references/python.md +2 -15
  119. package/dist/global-skills/instrument-feature-flags/references/react-native.md +13 -15
  120. package/dist/global-skills/instrument-feature-flags/references/react.md +17 -21
  121. package/dist/global-skills/instrument-feature-flags/references/ruby-on-rails.md +37 -83
  122. package/dist/global-skills/instrument-feature-flags/references/ruby.md +2 -15
  123. package/dist/global-skills/instrument-feature-flags/references/rust.md +13 -25
  124. package/dist/global-skills/instrument-feature-flags/references/usage.md +14 -63
  125. package/dist/global-skills/instrument-feature-flags/references/web.md +9 -14
  126. package/dist/global-skills/instrument-product-analytics/SKILL.md +29 -29
  127. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-hybrid.md +3 -1
  128. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-ssr.md +3 -1
  129. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-static.md +3 -1
  130. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-view-transitions.md +3 -1
  131. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-ruby-on-rails.md +3 -1
  132. package/dist/global-skills/instrument-product-analytics/references/android.md +72 -107
  133. package/dist/global-skills/instrument-product-analytics/references/angular.md +26 -28
  134. package/dist/global-skills/instrument-product-analytics/references/astro.md +13 -24
  135. package/dist/global-skills/instrument-product-analytics/references/configuration.md +45 -63
  136. package/dist/global-skills/instrument-product-analytics/references/django.md +14 -27
  137. package/dist/global-skills/instrument-product-analytics/references/dotnet.md +20 -79
  138. package/dist/global-skills/instrument-product-analytics/references/elixir.md +47 -49
  139. package/dist/global-skills/instrument-product-analytics/references/flask.md +13 -13
  140. package/dist/global-skills/instrument-product-analytics/references/flutter.md +60 -90
  141. package/dist/global-skills/instrument-product-analytics/references/go.md +17 -56
  142. package/dist/global-skills/instrument-product-analytics/references/identify-users.md +15 -15
  143. package/dist/global-skills/instrument-product-analytics/references/ios.md +11 -15
  144. package/dist/global-skills/instrument-product-analytics/references/laravel.md +13 -17
  145. package/dist/global-skills/instrument-product-analytics/references/next-js.md +25 -32
  146. package/dist/global-skills/instrument-product-analytics/references/nuxt-js-3-6.md +13 -27
  147. package/dist/global-skills/instrument-product-analytics/references/nuxt-js.md +14 -28
  148. package/dist/global-skills/instrument-product-analytics/references/php.md +33 -84
  149. package/dist/global-skills/instrument-product-analytics/references/posthog-python.md +229 -9
  150. package/dist/global-skills/instrument-product-analytics/references/python.md +415 -106
  151. package/dist/global-skills/instrument-product-analytics/references/react-native.md +161 -155
  152. package/dist/global-skills/instrument-product-analytics/references/react-router-v6.md +12 -33
  153. package/dist/global-skills/instrument-product-analytics/references/react-router-v7-data-mode.md +15 -33
  154. package/dist/global-skills/instrument-product-analytics/references/react-router-v7-declarative-mode.md +12 -33
  155. package/dist/global-skills/instrument-product-analytics/references/react-router-v7-framework-mode.md +26 -41
  156. package/dist/global-skills/instrument-product-analytics/references/ruby-on-rails.md +37 -83
  157. package/dist/global-skills/instrument-product-analytics/references/ruby.md +48 -108
  158. package/dist/global-skills/instrument-product-analytics/references/svelte.md +18 -24
  159. package/dist/global-skills/instrument-product-analytics/references/tanstack-start.md +17 -19
  160. package/dist/global-skills/instrument-product-analytics/references/usage.md +14 -63
  161. package/dist/global-skills/instrument-product-analytics/references/vue-js.md +29 -28
  162. package/dist/global-skills/manifest.json +8 -2
  163. package/dist/global-skills/mongodb-search-and-ai/SKILL.md +28 -37
  164. package/dist/global-skills/mongodb-search-and-ai/references/automated-embedding.md +438 -0
  165. package/dist/global-skills/mongodb-search-and-ai/references/hybrid-search.md +60 -4
  166. package/dist/global-skills/mongodb-search-and-ai/references/vector-search.md +46 -108
  167. package/dist/global-skills/neon/SKILL.md +207 -213
  168. package/dist/global-skills/neon/references/auth.md +12 -0
  169. package/dist/global-skills/neon/references/claimable-neon.md +10 -14
  170. package/dist/global-skills/neon/references/function-triggers.md +53 -0
  171. package/dist/global-skills/neon/references/logs-loki.md +61 -0
  172. package/dist/global-skills/neon/references/parse-env.md +32 -0
  173. package/dist/global-skills/neon/references/sdk.md +7 -0
  174. package/dist/global-skills/neon-ai-gateway/SKILL.md +14 -16
  175. package/dist/global-skills/neon-auth/SKILL.md +155 -0
  176. package/dist/global-skills/neon-auth/references/managed-auth.md +173 -0
  177. package/dist/global-skills/neon-auth/references/self-managed.md +25 -0
  178. package/dist/global-skills/neon-functions/SKILL.md +159 -84
  179. package/dist/global-skills/neon-functions/references/ai-sdk.md +4 -6
  180. package/dist/global-skills/neon-functions/references/function-triggers.md +249 -0
  181. package/dist/global-skills/neon-functions/references/mastra-studio.md +3 -3
  182. package/dist/global-skills/neon-functions/references/mcp.md +1 -1
  183. package/dist/global-skills/neon-functions/references/production-hardening.md +340 -0
  184. package/dist/global-skills/neon-functions/references/sse.md +8 -5
  185. package/dist/global-skills/neon-object-storage/SKILL.md +10 -11
  186. package/dist/global-skills/neon-postgres/SKILL.md +120 -17
  187. package/dist/global-skills/neon-postgres/references/full-text-search.md +99 -0
  188. package/dist/global-skills/neon-postgres/references/hybrid-search.md +90 -0
  189. package/dist/global-skills/neon-postgres/references/lakebase-search-drizzle.md +172 -0
  190. package/dist/global-skills/neon-postgres/references/vector-search.md +137 -0
  191. package/dist/global-skills/neon-postgres-branches/SKILL.md +3 -3
  192. package/dist/global-skills/neon-postgres-egress-optimizer/SKILL.md +1 -1
  193. package/dist/global-skills/onboarding/SKILL.md +8 -6
  194. package/dist/global-skills/resend/SKILL.md +4 -2
  195. package/dist/global-skills/resend/references/broadcasts.md +6 -1
  196. package/dist/global-skills/resend/references/receiving.md +29 -10
  197. package/dist/global-skills/resend/references/sending/email-management.md +14 -4
  198. package/dist/global-skills/resend/references/topics.md +9 -6
  199. package/dist/global-skills/resend/references/usage.md +117 -0
  200. package/dist/global-skills/resend/references/webhooks.md +59 -2
  201. package/dist/global-skills/stripe-best-practices/SKILL.md +35 -29
  202. package/dist/global-skills/stripe-best-practices/references/billing.md +9 -2
  203. package/dist/global-skills/stripe-best-practices/references/payments.md +4 -2
  204. package/dist/global-skills/stripe-best-practices/references/security.md +3 -1
  205. package/dist/global-skills/stripe-best-practices/references/tax.md +39 -20
  206. package/dist/global-skills/supabase/SKILL.md +6 -0
  207. package/dist/global-skills/use-railway/SKILL.md +42 -22
  208. package/dist/global-skills/use-railway/references/analyze-db.md +7 -6
  209. package/dist/global-skills/use-railway/references/cloud-agents.md +70 -0
  210. package/dist/global-skills/use-railway/references/configure.md +17 -2
  211. package/dist/global-skills/use-railway/references/databases.md +107 -0
  212. package/dist/global-skills/use-railway/references/deploy.md +5 -5
  213. package/dist/global-skills/use-railway/references/feature-flags.md +25 -13
  214. package/dist/global-skills/use-railway/references/iac.md +66 -77
  215. package/dist/global-skills/use-railway/references/operate.md +26 -3
  216. package/dist/global-skills/use-railway/references/request.md +31 -23
  217. package/dist/global-skills/use-railway/references/setup.md +16 -5
  218. package/dist/global-skills/use-railway/references/tracing.md +261 -0
  219. package/dist/global-skills/use-railway/references/usage.md +52 -0
  220. package/dist/global-skills/validate-my-idea/SKILL.md +54 -0
  221. package/dist/global-skills/{feedback → vybekiit-feedback}/SKILL.md +16 -12
  222. package/dist/global-skills/watch-my-app/SKILL.md +53 -0
  223. package/dist/global-skills/workers-best-practices/SKILL.md +36 -103
  224. package/dist/global-skills/workers-best-practices/references/configuration.md +139 -0
  225. package/dist/global-skills/workers-best-practices/references/platform-apis.md +51 -0
  226. package/dist/global-skills/workers-best-practices/references/{rules.md → runtime-patterns.md} +13 -137
  227. package/dist/global-skills/wrangler/SKILL.md +48 -901
  228. package/dist/global-skills/xcode-project-setup/scripts/xcode_spm_setup/Sources/main.swift +19 -15
  229. package/package.json +9 -8
  230. package/dist/global-skills/expo-native-ui/references/animations.md +0 -220
  231. package/dist/global-skills/firebase-firestore/references/enterprise/security_rules.md +0 -577
  232. package/dist/global-skills/workers-best-practices/references/review.md +0 -174
@@ -1,10 +1,6 @@
1
1
  > AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt
2
2
 
3
- # Android - Docs
4
-
5
- Copy page
6
-
7
- # Android - Docs
3
+ # Android
8
4
 
9
5
  It uses an internal queue to make calls fast and non-blocking. It also batches requests and flushes asynchronously, making it perfect to use in any part of your mobile app.
10
6
 
@@ -14,8 +10,6 @@ The best way to install the PostHog Android library is with a build system like
14
10
 
15
11
  All you need to do is add the `posthog-android` module to your App's `build.gradle` or `build.gradle.kts`:
16
12
 
17
- PostHog AI
18
-
19
13
  ### app/build.gradle
20
14
 
21
15
  ```gradle
@@ -38,20 +32,22 @@ The best place to initialize the client is in your `Application` subclass.
38
32
 
39
33
  Kotlin
40
34
 
41
- PostHog AI
42
-
43
35
  ```kotlin
44
36
  import android.app.Application
45
37
  import com.posthog.android.PostHogAndroid
46
38
  import com.posthog.android.PostHogAndroidConfig
39
+
47
40
  class SampleApp : Application() {
41
+
48
42
  companion object {
49
43
  const val POSTHOG_API_KEY = "<ph_project_token>"
50
44
  // usually 'https://us.i.posthog.com' or 'https://eu.i.posthog.com'
51
45
  const val POSTHOG_HOST = "https://us.i.posthog.com"
52
46
  }
47
+
53
48
  override fun onCreate() {
54
49
  super.onCreate()
50
+
55
51
  val config = PostHogAndroidConfig(
56
52
  apiKey = POSTHOG_API_KEY,
57
53
  host = POSTHOG_HOST
@@ -67,10 +63,9 @@ You can send custom events using `capture`:
67
63
 
68
64
  Kotlin
69
65
 
70
- PostHog AI
71
-
72
66
  ```kotlin
73
67
  import com.posthog.PostHog
68
+
74
69
  PostHog.capture(event = "user_signed_up")
75
70
  ```
76
71
 
@@ -82,10 +77,9 @@ Optionally, you can include additional information with the event by including a
82
77
 
83
78
  Kotlin
84
79
 
85
- PostHog AI
86
-
87
80
  ```kotlin
88
81
  import com.posthog.PostHog
82
+
89
83
  PostHog.capture(
90
84
  event = "user_signed_up",
91
85
  properties = mapOf(
@@ -115,8 +109,6 @@ The `screenTitle` will be the [`<activity>`](https://developer.android.com/guide
115
109
 
116
110
  XML
117
111
 
118
- PostHog AI
119
-
120
112
  ```xml
121
113
  <activity
122
114
  android:name="com.example.app.ChildActivity"
@@ -131,10 +123,9 @@ This function requires a `screenTitle`. You may also pass in an optional `proper
131
123
 
132
124
  Kotlin
133
125
 
134
- PostHog AI
135
-
136
126
  ```kotlin
137
127
  import com.posthog.PostHog
128
+
138
129
  PostHog.screen(
139
130
  screenTitle = "Dashboard",
140
131
  properties = mapOf(
@@ -158,10 +149,9 @@ An `identify` call has the following arguments:
158
149
 
159
150
  Kotlin
160
151
 
161
- PostHog AI
162
-
163
152
  ```kotlin
164
153
  import com.posthog.PostHog
154
+
165
155
  PostHog.identify(
166
156
  distinctId = distinctID,
167
157
  userProperties = mapOf(
@@ -190,20 +180,21 @@ Use `tracingHeaders` to connect Android network requests to backend events, erro
190
180
 
191
181
  Kotlin
192
182
 
193
- PostHog AI
194
-
195
183
  ```kotlin
196
184
  import com.posthog.PostHogOkHttpInterceptor
197
185
  import com.posthog.android.PostHogAndroid
198
186
  import com.posthog.android.PostHogAndroidConfig
199
187
  import okhttp3.OkHttpClient
188
+
200
189
  val config = PostHogAndroidConfig(
201
190
  apiKey = POSTHOG_API_KEY,
202
191
  host = POSTHOG_HOST,
203
192
  ).apply {
204
193
  tracingHeaders = listOf("api.example.com")
205
194
  }
195
+
206
196
  PostHogAndroid.setup(this, config)
197
+
207
198
  val okHttpClient = OkHttpClient.Builder()
208
199
  .addInterceptor(PostHogOkHttpInterceptor())
209
200
  .build()
@@ -219,8 +210,6 @@ In this case, you can use `alias` to assign another distinct ID to the same user
219
210
 
220
211
  Kotlin
221
212
 
222
- PostHog AI
223
-
224
213
  ```kotlin
225
214
  /**
226
215
  * Create an alias for the current user.
@@ -228,7 +217,7 @@ PostHog AI
228
217
  PostHog.alias("distinct_id")
229
218
  ```
230
219
 
231
- We strongly recommend reading our docs on [alias](/docs/data/identify.md#alias-assigning-multiple-distinct-ids-to-the-same-user) to best understand how to correctly use this method.
220
+ We strongly recommend reading our docs on [alias](/docs/product-analytics/identify.md#alias-assigning-multiple-distinct-ids-to-the-same-user) to best understand how to correctly use this method.
232
221
 
233
222
  ## Anonymous and identified events
234
223
 
@@ -268,8 +257,6 @@ For example:
268
257
 
269
258
  Kotlin
270
259
 
271
- PostHog AI
272
-
273
260
  ```kotlin
274
261
  val config = PostHogAndroidConfig(
275
262
  apiKey = POSTHOG_API_KEY,
@@ -293,16 +280,15 @@ Alternatively, you can set `personProfiles` to `ALWAYS` to capture identified ev
293
280
 
294
281
  ## Setting person properties
295
282
 
296
- To set [properties](/docs/data/user-properties.md) on your users via an event, you can leverage the event properties `userProperties` and `userPropertiesSetOnce`.
283
+ To set [properties](/docs/product-analytics/person-properties.md) on your users via an event, you can leverage the event properties `userProperties` and `userPropertiesSetOnce`.
297
284
 
298
285
  When capturing an event, you can pass a property called `userProperties` as an event property, and specify its value to be an object with properties to be set on the user that will be associated with the user who triggered the event.
299
286
 
300
287
  Kotlin
301
288
 
302
- PostHog AI
303
-
304
289
  ```kotlin
305
290
  import com.posthog.PostHog
291
+
306
292
  PostHog.capture(
307
293
  event = "button_b_clicked",
308
294
  properties = mapOf("color" to "blue"),
@@ -317,10 +303,9 @@ PostHog.capture(
317
303
 
318
304
  Kotlin
319
305
 
320
- PostHog AI
321
-
322
306
  ```kotlin
323
307
  import com.posthog.PostHog
308
+
324
309
  PostHog.capture(
325
310
  event = "button_b_clicked",
326
311
  properties = mapOf("color" to "blue"),
@@ -341,10 +326,9 @@ For example, take a look at the following call:
341
326
 
342
327
  Kotlin
343
328
 
344
- PostHog AI
345
-
346
329
  ```kotlin
347
330
  import com.posthog.PostHog
331
+
348
332
  PostHog.register("team_id", 22)
349
333
  ```
350
334
 
@@ -358,10 +342,9 @@ Super Properties are persisted across sessions so you have to explicitly remove
358
342
 
359
343
  Kotlin
360
344
 
361
- PostHog AI
362
-
363
345
  ```kotlin
364
346
  import com.posthog.PostHog
347
+
365
348
  PostHog.unregister("team_id")
366
349
  ```
367
350
 
@@ -377,8 +360,6 @@ You can completely opt-out users from data capture. To do this, there are two op
377
360
 
378
361
  Kotlin
379
362
 
380
- PostHog AI
381
-
382
363
  ```kotlin
383
364
  val config = PostHogAndroidConfig(
384
365
  apiKey = "<ph_project_token>",
@@ -392,8 +373,6 @@ PostHogAndroid.setup(this, config)
392
373
 
393
374
  Kotlin
394
375
 
395
- PostHog AI
396
-
397
376
  ```kotlin
398
377
  PostHog.optOut()
399
378
  ```
@@ -402,8 +381,6 @@ Similarly, you can opt users in:
402
381
 
403
382
  Kotlin
404
383
 
405
- PostHog AI
406
-
407
384
  ```kotlin
408
385
  PostHog.optIn()
409
386
  ```
@@ -412,8 +389,6 @@ To check if a user is opted out:
412
389
 
413
390
  Kotlin
414
391
 
415
- PostHog AI
416
-
417
392
  ```kotlin
418
393
  PostHog.isOptOut()
419
394
  ```
@@ -426,10 +401,9 @@ You can also configure the flush interval with `flushIntervalSeconds` (default `
426
401
 
427
402
  Kotlin
428
403
 
429
- PostHog AI
430
-
431
404
  ```kotlin
432
405
  import com.posthog.android.PostHogAndroidConfig
406
+
433
407
  val config = PostHogAndroidConfig(apiKey = POSTHOG_API_KEY, host = POSTHOG_HOST).apply {
434
408
  flushAt = 20
435
409
  flushIntervalSeconds = 30
@@ -440,10 +414,9 @@ You can also manually flush the queue to start sending events immediately instea
440
414
 
441
415
  Kotlin
442
416
 
443
- PostHog AI
444
-
445
417
  ```kotlin
446
418
  import com.posthog.PostHog
419
+
447
420
  PostHog.flush()
448
421
  ```
449
422
 
@@ -455,10 +428,9 @@ To reset the user's ID and anonymous ID, call `reset`. Usually you would do this
455
428
 
456
429
  Kotlin
457
430
 
458
- PostHog AI
459
-
460
431
  ```kotlin
461
432
  import com.posthog.PostHog
433
+
462
434
  PostHog.reset()
463
435
  ```
464
436
 
@@ -470,13 +442,13 @@ PostHog's [feature flags](/docs/feature-flags.md) enable you to safely deploy an
470
442
 
471
443
  Kotlin
472
444
 
473
- PostHog AI
474
-
475
445
  ```kotlin
476
446
  import com.posthog.PostHog
447
+
477
448
  val result = PostHog.getFeatureFlagResult("flag-key")
478
449
  if (result?.enabled == true) {
479
450
  // Do something differently for this user
451
+
480
452
  // Optional: fetch the payload from the same evaluation result
481
453
  val matchedFlagPayload = result.payload
482
454
  }
@@ -486,13 +458,13 @@ if (result?.enabled == true) {
486
458
 
487
459
  Kotlin
488
460
 
489
- PostHog AI
490
-
491
461
  ```kotlin
492
462
  import com.posthog.PostHog
463
+
493
464
  val result = PostHog.getFeatureFlagResult("flag-key")
494
465
  if (result?.variant == "variant-key") { // replace "variant-key" with the key of your variant
495
466
  // Do something differently for this user
467
+
496
468
  // Optional: fetch the payload from the same evaluation result
497
469
  val matchedFlagPayload = result.payload
498
470
  }
@@ -504,10 +476,9 @@ You can inspect all currently loaded feature flags with `PostHog.getAllFeatureFl
504
476
 
505
477
  Kotlin
506
478
 
507
- PostHog AI
508
-
509
479
  ```kotlin
510
480
  import com.posthog.PostHog
481
+
511
482
  PostHog.getAllFeatureFlags()?.forEach { flag ->
512
483
  println("${flag.key} ${flag.enabled} ${flag.variant} ${flag.payload}")
513
484
  }
@@ -523,12 +494,11 @@ To handle this, you can use the `onFeatureFlags` callback to wait for the featur
523
494
 
524
495
  Kotlin
525
496
 
526
- PostHog AI
527
-
528
497
  ```kotlin
529
498
  import com.posthog.PostHog
530
499
  import com.posthog.android.PostHogAndroidConfig
531
500
  import com.posthog.PostHogOnFeatureFlags
501
+
532
502
  // During SDK initialization
533
503
  val config = PostHogAndroidConfig(apiKey = "<ph_project_token>").apply {
534
504
  onFeatureFlags = PostHogOnFeatureFlags {
@@ -537,6 +507,7 @@ val config = PostHogAndroidConfig(apiKey = "<ph_project_token>").apply {
537
507
  }
538
508
  }
539
509
  }
510
+
540
511
  // And/or after the SDK is initialized
541
512
  PostHog.reloadFeatureFlags {
542
513
  if (PostHog.isFeatureEnabled("flag-key")) {
@@ -551,10 +522,9 @@ Feature flag values are cached. If something has changed with your user and you'
551
522
 
552
523
  Kotlin
553
524
 
554
- PostHog AI
555
-
556
525
  ```kotlin
557
526
  import com.posthog.PostHog
527
+
558
528
  PostHog.reloadFeatureFlags()
559
529
  ```
560
530
 
@@ -564,10 +534,9 @@ To track when someone sees or interacts with a feature, use `captureFeatureView`
564
534
 
565
535
  Kotlin
566
536
 
567
- PostHog AI
568
-
569
537
  ```kotlin
570
538
  import com.posthog.PostHog
539
+
571
540
  PostHog.captureFeatureView("flag-key", flagVariant = "variant-key")
572
541
  PostHog.captureFeatureInteraction("flag-key", flagVariant = "variant-key")
573
542
  ```
@@ -582,10 +551,9 @@ Set `config.bootstrap` before calling `setup()` to seed identity and flag values
582
551
 
583
552
  Kotlin
584
553
 
585
- PostHog AI
586
-
587
554
  ```kotlin
588
555
  import com.posthog.PostHogBootstrapConfig
556
+
589
557
  val config = PostHogAndroidConfig(apiKey = POSTHOG_API_KEY, host = POSTHOG_HOST)
590
558
  config.bootstrap = PostHogBootstrapConfig(
591
559
  distinctId = "distinct_id_of_your_user",
@@ -613,10 +581,9 @@ Since [experiments](/docs/experiments/start-here.md) use feature flags, the code
613
581
 
614
582
  Kotlin
615
583
 
616
- PostHog AI
617
-
618
584
  ```kotlin
619
585
  import com.posthog.PostHog
586
+
620
587
  if (PostHog.getFeatureFlag("experiment-feature-flag-key") == "variant-name") {
621
588
  // do something
622
589
  }
@@ -634,10 +601,9 @@ Group analytics allows you to associate the events for that person's session wit
634
601
 
635
602
  Kotlin
636
603
 
637
- PostHog AI
638
-
639
604
  ```kotlin
640
605
  import com.posthog.PostHog
606
+
641
607
  // organization is the group type, company_id_in_your_db is the group ID
642
608
  PostHog.group(
643
609
  type = "company",
@@ -649,10 +615,9 @@ PostHog.group(
649
615
 
650
616
  Kotlin
651
617
 
652
- PostHog AI
653
-
654
618
  ```kotlin
655
619
  import com.posthog.PostHog
620
+
656
621
  PostHog.group(
657
622
  type = "company",
658
623
  key = "company_id_in_your_db",
@@ -697,8 +662,6 @@ You can enable debug mode by setting the `debug` option to `true` in the `PostHo
697
662
 
698
663
  Kotlin
699
664
 
700
- PostHog AI
701
-
702
665
  ```kotlin
703
666
  val config = PostHogAndroidConfig(apiKey = POSTHOG_API_KEY, host = POSTHOG_HOST).apply {
704
667
  debug = true
@@ -712,11 +675,10 @@ When creating the PostHog client, pass a `PostHogAndroidConfig`. It inherits the
712
675
 
713
676
  Kotlin
714
677
 
715
- PostHog AI
716
-
717
678
  ```kotlin
718
679
  import com.posthog.PersonProfiles
719
680
  import com.posthog.android.PostHogAndroidConfig
681
+
720
682
  val config = PostHogAndroidConfig(
721
683
  apiKey = POSTHOG_API_KEY,
722
684
  host = POSTHOG_HOST
@@ -724,20 +686,25 @@ val config = PostHogAndroidConfig(
724
686
  captureApplicationLifecycleEvents = true
725
687
  captureScreenViews = true
726
688
  captureDeepLinks = true
689
+
727
690
  flushAt = 20
728
691
  maxQueueSize = 1000
729
692
  maxBatchSize = 50
730
693
  maxRetries = 3
731
694
  flushIntervalSeconds = 30
695
+
732
696
  debug = false
733
697
  optOut = false
698
+
734
699
  sendFeatureFlagEvent = true
735
700
  featureFlagCalledCacheSize = 1000
736
701
  preloadFeatureFlags = true
737
702
  evaluationContexts = listOf("production", "android", "mobile")
703
+
738
704
  setDefaultPersonProperties = true
739
705
  personProfiles = PersonProfiles.IDENTIFIED_ONLY
740
706
  reuseAnonymousId = false
707
+
741
708
  sessionReplay = false
742
709
  errorTrackingConfig.autoCapture = false
743
710
  }
@@ -747,51 +714,51 @@ val config = PostHogAndroidConfig(
747
714
 
748
715
  | Option | Default | Description |
749
716
  | --- | --- | --- |
750
- | captureApplicationLifecycleEvents | true | Captures Application Installed, Application Updated, Application Opened, and Application Backgrounded. |
751
- | captureScreenViews | true | Captures $screen for foreground android.app.Activity screens. |
752
- | captureDeepLinks | true | Captures Deep Link Opened with URL/query/referrer properties. |
717
+ | `captureApplicationLifecycleEvents` | `true` | Captures `Application Installed`, `Application Updated`, `Application Opened`, and `Application Backgrounded`. |
718
+ | `captureScreenViews` | `true` | Captures `$screen` for foreground `android.app.Activity` screens. |
719
+ | `captureDeepLinks` | `true` | Captures `Deep Link Opened` with URL/query/referrer properties. |
753
720
 
754
721
  ### Core options
755
722
 
756
723
  | Option | Default | Description |
757
724
  | --- | --- | --- |
758
- | debug | false | Enables verbose SDK logs in Logcat. You can also call PostHog.debug(true). |
759
- | optOut | false | Prevents data capture when enabled. You can also call PostHog.optOut() and PostHog.optIn(). |
760
- | flushAt | 20 | Number of queued events that triggers a flush. |
761
- | maxQueueSize | 1000 | Maximum number of events kept across memory and disk before FIFO eviction. |
762
- | maxBatchSize | 50 | Maximum number of events sent in one batch request. |
763
- | maxRetries | 3 | Maximum retry attempts for failed requests. |
764
- | flushIntervalSeconds | 30 | Maximum delay before queued data is flushed. |
765
- | encryption | null | Optional PostHogEncryption implementation for encrypting persisted queued events. |
766
- | proxy | null | Optional java.net.Proxy for PostHog API requests. |
767
- | getAnonymousId | generated UUID | Optional hook to customize anonymous ID generation. |
768
- | reuseAnonymousId | false | Reuses one anonymous ID across user changes on the same device. |
769
- | personProfiles | PersonProfiles.IDENTIFIED_ONLY | Controls when person profiles are processed: IDENTIFIED_ONLY, ALWAYS, or NEVER. |
770
- | setDefaultPersonProperties | true | Includes default device and app properties in feature flag evaluation requests. |
771
- | releaseIdentifier | app/version fallback | Release identifier used by error tracking and uploaded ProGuard/R8 mappings. The Android Gradle plugin can inject this automatically. |
772
- | tracingHeaders | null | Exact hostnames that should receive PostHog tracing headers when using PostHogOkHttpInterceptor. |
725
+ | `debug` | `false` | Enables verbose SDK logs in Logcat. You can also call `PostHog.debug(true)`. |
726
+ | `optOut` | `false` | Prevents data capture when enabled. You can also call `PostHog.optOut()` and `PostHog.optIn()`. |
727
+ | `flushAt` | `20` | Number of queued events that triggers a flush. |
728
+ | `maxQueueSize` | `1000` | Maximum number of events kept across memory and disk before FIFO eviction. |
729
+ | `maxBatchSize` | `50` | Maximum number of events sent in one batch request. |
730
+ | `maxRetries` | `3` | Maximum retry attempts for failed requests. |
731
+ | `flushIntervalSeconds` | `30` | Maximum delay before queued data is flushed. |
732
+ | `encryption` | `null` | Optional `PostHogEncryption` implementation for encrypting persisted queued events. |
733
+ | `proxy` | `null` | Optional `java.net.Proxy` for PostHog API requests. |
734
+ | `getAnonymousId` | generated UUID | Optional hook to customize anonymous ID generation. |
735
+ | `reuseAnonymousId` | `false` | Reuses one anonymous ID across user changes on the same device. |
736
+ | `personProfiles` | `PersonProfiles.IDENTIFIED_ONLY` | Controls when person profiles are processed: `IDENTIFIED_ONLY`, `ALWAYS`, or `NEVER`. |
737
+ | `setDefaultPersonProperties` | `true` | Includes default device and app properties in feature flag evaluation requests. |
738
+ | `releaseIdentifier` | app/version fallback | Release identifier used by error tracking and uploaded ProGuard/R8 mappings. The Android Gradle plugin can inject this automatically. |
739
+ | `tracingHeaders` | `null` | Exact hostnames that should receive PostHog tracing headers when using `PostHogOkHttpInterceptor`. |
773
740
 
774
741
  ### Feature flag options
775
742
 
776
743
  | Option | Default | Description |
777
744
  | --- | --- | --- |
778
- | sendFeatureFlagEvent | true | Sends $feature_flag_called when a feature flag is evaluated. |
779
- | featureFlagCalledCacheSize | 1000 | Number of feature flag calls cached for deduplicating $feature_flag_called events. |
780
- | preloadFeatureFlags | true | Fetches feature flags automatically during setup. |
781
- | evaluationContexts | null | Context tags that constrain which feature flags are evaluated. Available in version 3.29.1+. The legacy evaluationEnvironments option is available in version 3.24.0+. |
782
- | onFeatureFlags | null | Callback invoked when feature flags are loaded. |
745
+ | `sendFeatureFlagEvent` | `true` | Sends `$feature_flag_called` when a feature flag is evaluated. |
746
+ | `featureFlagCalledCacheSize` | `1000` | Number of feature flag calls cached for deduplicating `$feature_flag_called` events. |
747
+ | `preloadFeatureFlags` | `true` | Fetches feature flags automatically during setup. |
748
+ | `evaluationContexts` | `null` | Context tags that constrain which feature flags are evaluated. Available in version 3.29.1+. The legacy `evaluationEnvironments` option is available in version 3.24.0+. |
749
+ | `onFeatureFlags` | `null` | Callback invoked when feature flags are loaded. |
783
750
 
784
751
  ### Product configuration objects
785
752
 
786
753
  | Option | Default | Description |
787
754
  | --- | --- | --- |
788
- | sessionReplay | false | Enables session replay when project settings also allow recording. |
789
- | sessionReplayConfig | PostHogSessionReplayConfig() | Configures masking, screenshots, Logcat capture, sampling, and custom drawable conversion. |
790
- | logs | PostHogLogsConfig() | Configures [Android logs](/docs/logs/installation/android.md). |
791
- | errorTrackingConfig | PostHogErrorTrackingConfig() | Configures error tracking. autoCapture defaults to false; set it to true to autocapture uncaught exceptions when project settings also enable error tracking. |
792
- | surveys | false | Internal/experimental native Android survey support. Native Android survey UI is not fully supported or documented yet. |
793
- | surveysConfig | PostHogSurveysConfig() | Internal/experimental survey display delegate configuration, primarily for hybrid SDKs. |
794
- | bootstrap | null | Seeds identity (distinctId, isIdentifiedId) and feature-flag state (featureFlags, featureFlagPayloads) before the first /flags response. Bootstrapped identity applies to the first session; only enabled flags are served, until the first /flags response replaces them. See [SDK bootstrapping](/docs/libraries/bootstrapping.md#behavior-on-mobile-sdks). |
755
+ | `sessionReplay` | `false` | Enables session replay when project settings also allow recording. |
756
+ | `sessionReplayConfig` | `PostHogSessionReplayConfig()` | Configures masking, screenshots, Logcat capture, sampling, and custom drawable conversion. |
757
+ | `logs` | `PostHogLogsConfig()` | Configures [Android logs](/docs/logs/installation/android.md). |
758
+ | `errorTrackingConfig` | `PostHogErrorTrackingConfig()` | Configures error tracking. `autoCapture` defaults to `false`; set it to `true` to autocapture uncaught exceptions when project settings also enable error tracking. |
759
+ | `surveys` | `false` | Internal/experimental native Android survey support. Native Android survey UI is not fully supported or documented yet. |
760
+ | `surveysConfig` | `PostHogSurveysConfig()` | Internal/experimental survey display delegate configuration, primarily for hybrid SDKs. |
761
+ | `bootstrap` | `null` | Seeds identity (`distinctId`, `isIdentifiedId`) and feature-flag state (`featureFlags`, `featureFlagPayloads`) before the first `/flags` response. Bootstrapped identity applies to the first session; only enabled flags are served, until the first `/flags` response replaces them. See [SDK bootstrapping](/docs/libraries/bootstrapping.md#behavior-on-mobile-sdks). |
795
762
 
796
763
  ### Event filtering with `beforeSend`
797
764
 
@@ -799,11 +766,10 @@ Use `addBeforeSend` to redact, modify, or drop events before they are queued. Re
799
766
 
800
767
  Kotlin
801
768
 
802
- PostHog AI
803
-
804
769
  ```kotlin
805
770
  config.addBeforeSend { event ->
806
771
  event.properties?.remove("password")
772
+
807
773
  if (event.event == "internal_debug_event") {
808
774
  null
809
775
  } else {
@@ -820,10 +786,9 @@ Because it's just a function, you can filter however you like – an **ignorelis
820
786
 
821
787
  Kotlin
822
788
 
823
- PostHog AI
824
-
825
789
  ```kotlin
826
790
  val ignoredScreens = setOf("Splash", "Debug")
791
+
827
792
  config.addBeforeSend { event ->
828
793
  val screenName = event.properties?.get("$screen_name") as? String
829
794
  if (event.event == "$screen" && screenName in ignoredScreens) {