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

feat(android): support for minimizeApp #743

Merged
merged 12 commits into from
Jan 12, 2022

Conversation

e-lazorenko
Copy link
Contributor

@e-lazorenko e-lazorenko commented Dec 21, 2021

I think it makes sense if this small feature will be part of app plugin.

closes #130

Copy link
Member

@jcesarmobile jcesarmobile left a comment

Choose a reason for hiding this comment

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

Made a few code change requests, can you resolve them?

Thanks for the PR!

@@ -9,4 +9,5 @@
CAP_PLUGIN_METHOD(getLaunchUrl, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(getState, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(removeAllListeners, CAPPluginReturnNone);
CAP_PLUGIN_METHOD(minimizeApp, CAPPluginReturnNone);
Copy link
Member

@jcesarmobile jcesarmobile Jan 7, 2022

Choose a reason for hiding this comment

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

The return type should be CAPPluginReturnPromise since in the types you said it returns Promise<void>;

app/ios/Plugin/AppPlugin.swift Outdated Show resolved Hide resolved
/**
* Minimizes application
*/
minimizeApp(): Promise<void>;
Copy link
Member

@jcesarmobile jcesarmobile Jan 7, 2022

Choose a reason for hiding this comment

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

Can you move it up before all the listener related functions?
Also, can mention that the feature is only available for Android?

@@ -9,4 +9,5 @@
CAP_PLUGIN_METHOD(getLaunchUrl, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(getState, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(removeAllListeners, CAPPluginReturnNone);
CAP_PLUGIN_METHOD(minimizeApp, CAPPluginReturnNone);
Copy link
Member

@jcesarmobile jcesarmobile Jan 7, 2022

Choose a reason for hiding this comment

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

The return type should be CAPPluginReturnPromise since in the types you said it returns Promise<void>;

@e-lazorenko
Copy link
Contributor Author

Thanks for review. Added changes.

@jcesarmobile
Copy link
Member

Not all comments are addressed, and you have removed a few android test classes, can you address the missing comments and put those classes back?

Copy link
Member

@jcesarmobile jcesarmobile left a comment

Choose a reason for hiding this comment

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

I've updated my comments with the things that are still missing.
And also the test java classes that were removed should be put back

@e-lazorenko
Copy link
Contributor Author

Hm. Looks like fmt script removed classes. I will address all comments. I'm sorry that I missed these things

@jcesarmobile
Copy link
Member

did some minor changes on texts, but other than that looks good, thanks!

@jcesarmobile jcesarmobile merged commit 3ec2008 into ionic-team:main Jan 12, 2022
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.

Feature Request: Please add support for App.minimizeApp()
2 participants