Skip to content

Commit

Permalink
feat(android): add moveToBackground method
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga committed Mar 19, 2024
1 parent e963c72 commit 0c14835
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,11 @@ public String harmonizedColor(String value)
return String.format("#%06X",
(0xFFFFFF & MaterialColors.harmonizeWithPrimary(TiApplication.getAppCurrentActivity(), color)));
}
@Kroll.method
public void moveToBackground()
{
TiApplication.getAppRootOrCurrentActivity().moveTaskToBack(true);
}

@Override
public String getApiName()
Expand Down
5 changes: 5 additions & 0 deletions apidoc/Titanium/UI/Android/Android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ methods:
type: String
since: { android: "12.0.0" }

- name: moveToBackground
summary: Moves the app to the background
platforms: [android]
since: { android: "12.4.0" }

- name: hideSoftKeyboard
summary: |
Hides the soft keyboard.
Expand Down

0 comments on commit 0c14835

Please sign in to comment.