Skip to content

Commit

Permalink
release 1.0.0-alpha.38
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarahm-ed committed Jun 18, 2023
1 parent 066bed7 commit 8d728aa
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 33 deletions.
2 changes: 1 addition & 1 deletion packages/core/package-for-npm.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@open-native/core",
"version": "1.0.0-alpha.37",
"version": "1.0.0-alpha.38",
"description": "Open Native helps cross platform communities work better together.",
"main": "index",
"types": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@open-native/core",
"version": "1.0.0-alpha.37",
"version": "1.0.0-alpha.38",
"description": "Open Native helps cross platform communities work better together.",
"main": "index",
"types": "index.d.ts",
Expand Down
59 changes: 28 additions & 31 deletions packages/core/src/android/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,38 +145,35 @@ function attachActivityLifecycleListeners(reactContext: ReactContext) {
Application.android.on(
AndroidApplication.activityResultEvent,
(args: AndroidActivityResultEventData) => {
if (args.activity.getIntent().getData()) {
reactContext.onActivityResult(
args.activity,
args.requestCode,
args.resultCode,
args.activity.getIntent()
);
return;
}
const callback = (_args: Partial<AndroidActivityNewIntentEventData>) => {
reactContext.onActivityResult(
args.activity,
args.requestCode,
_args.intent.getData() ? -1 : args.resultCode,
_args.intent
);
Application.android.off(
AndroidApplication.activityNewIntentEvent,
callback
);
};
Application.android.on(
AndroidApplication.activityNewIntentEvent,
callback
reactContext.onActivityResult(
args.activity,
args.requestCode,
args.resultCode,
args.intent
);
setTimeout(() => {
Application.android.off(
AndroidApplication.activityNewIntentEvent,
callback
);
callback({ intent: args.activity.getIntent() });
}, 1000);
// const callback = (_args: Partial<AndroidActivityNewIntentEventData>) => {
// reactContext.onActivityResult(
// args.activity,
// args.requestCode,
// args.resultCode,
// _args.intent
// );
// Application.android.off(
// AndroidApplication.activityNewIntentEvent,
// callback
// );
// };
// Application.android.on(
// AndroidApplication.activityNewIntentEvent,
// callback
// );
// setTimeout(() => {
// Application.android.off(
// AndroidApplication.activityNewIntentEvent,
// callback
// );
// callback({ intent: args.activity.getIntent() });
// }, 1000);
}
);
}
Expand Down

0 comments on commit 8d728aa

Please sign in to comment.