Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JS library #4

Open
wants to merge 37 commits into
base: main
Choose a base branch
from
Open

Add JS library #4

wants to merge 37 commits into from

Conversation

pavel-kuznetsov-hypertrack
Copy link
Collaborator

Add JS library wrapper around WebView Java-JS interface for users to be able to properly call HyperTrack SDK from WebView JS code

Copy link

@ferologics ferologics left a comment

Choose a reason for hiding this comment

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

nice progress

Choose a reason for hiding this comment

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

what sorcery is this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's generated from TS code

Choose a reason for hiding this comment

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

i suppose these need to be defined still?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Generated code

Comment on lines 215 to 217
const HyperTrack = (function () {
return hyperTrackInstance;
})();

Choose a reason for hiding this comment

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

we need this instance why?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Generated code

Comment on lines 318 to 319
var HyperTrackError;
(function (HyperTrackError) {

Choose a reason for hiding this comment

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

i suppose this PR is still wip, the error is already declared elsewhere if I read this correctly

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Generated code

Comment on lines +55 to +68
override fun onPause() {
super.onPause()
webView?.onPause()
}

override fun onResume() {
super.onResume()
webView?.onResume()
}

override fun onDestroy() {
webView?.destroy()
super.onDestroy()
}

Choose a reason for hiding this comment

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

why do we sometimes call we view before super and vice versa?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We need to destroy the view before everything else is destroyed (I am not sure why, it's just seems to be more correct way)

Choose a reason for hiding this comment

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

yeah i get that, but why not always call the view first before the super then?

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.

2 participants