openuispec 0.2.6 → 0.2.8

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.
@@ -272,15 +272,20 @@ export async function installAndLaunch(
272
272
  // Install (replace existing)
273
273
  await adbExec(adb, serial, `install -r "${apkPath}"`);
274
274
 
275
- // Force-stop any existing instance
275
+ // Force-stop and clear saved navigation state
276
276
  await adbShell(adb, serial, `am force-stop ${appInfo.applicationId}`);
277
277
 
278
+ // FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK = 0x10008000
279
+ // Clears saved navigation state so deep links route correctly
280
+ const clearFlags = `-f 0x10008000`;
281
+
278
282
  if (route) {
279
- // Navigate via deep link
280
- await adbShell(adb, serial, `am start -a android.intent.action.VIEW -d "${route}" ${appInfo.applicationId}`);
283
+ await adbShell(adb, serial,
284
+ `am start -W -a android.intent.action.VIEW -d "${route}" ${clearFlags} ` +
285
+ `${appInfo.applicationId}/${appInfo.launchActivity}`);
281
286
  } else {
282
- // Launch the main activity
283
- await adbShell(adb, serial, `am start -n ${appInfo.applicationId}/${appInfo.launchActivity}`);
287
+ await adbShell(adb, serial,
288
+ `am start -W ${clearFlags} -n ${appInfo.applicationId}/${appInfo.launchActivity}`);
284
289
  }
285
290
  }
286
291
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openuispec",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "A semantic UI specification format for AI-native, platform-native app development",