Skip to content

Commit 9e0db33

Browse files
committed
Merge branch 'ht/SDK-4385-Android-Bindings-Add-retryPendingConnections-and-requestLastGreen' into 'develop'
CHT-1356 Android Bindings - Add retryPendingConnections and requestLastGreen Closes SDK-4385 See merge request megachat/MEGAchat!2000
2 parents 6dfe667 + 48e246c commit 9e0db33

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

bindings/java/nz/mega/sdk/MegaChatApiJava.java

+34
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,17 @@ public void retryPendingConnections(boolean disconnect, MegaChatRequestListenerI
519519
megaChatApi.retryPendingConnections(disconnect, createDelegateRequestListener(listener));
520520
}
521521

522+
/**
523+
* Refresh DNS servers and retry pending connections
524+
*
525+
* The associated request type with this request is MegaChatRequest::TYPE_RETRY_PENDING_CONNECTIONS
526+
*
527+
* @param disconnect boolean
528+
*/
529+
public void retryPendingConnections(boolean disconnect){
530+
megaChatApi.retryPendingConnections(disconnect);
531+
}
532+
522533
/**
523534
* Refresh URLs and establish fresh connections
524535
*
@@ -1750,6 +1761,29 @@ public void requestLastGreen(long userid, MegaChatRequestListenerInterface liste
17501761
megaChatApi.requestLastGreen(userid, createDelegateRequestListener(listener));
17511762
}
17521763

1764+
/**
1765+
* Request the number of minutes since the user was seen as green by last time.
1766+
*
1767+
* Apps may call this function to retrieve the minutes elapsed since the user was seen
1768+
* as green (MegaChatApi::STATUS_ONLINE) by last time.
1769+
* Apps must NOT call this function if the current status of the user is already green.
1770+
*
1771+
* The number of minutes since the user was seen as green by last time, if any, will
1772+
* be notified in the MegaChatListener::onChatPresenceLastGreen callback. Note that,
1773+
* if the user was never seen green by presenced or the user has disabled the visibility
1774+
* of the last-green with MegaChatApi::setLastGreenVisible, there will be no notification
1775+
* at all.
1776+
*
1777+
* The associated request type with this request is MegaChatRequest::TYPE_LAST_GREEN
1778+
* Valid data in the MegaChatRequest object received on callbacks:
1779+
* - MegaChatRequest::getUserHandle() - Returns the handle of the user
1780+
*
1781+
* @param userid MegaChatHandle from user that last green has been requested
1782+
*/
1783+
public void requestLastGreen(long userid){
1784+
megaChatApi.requestLastGreen(userid);
1785+
}
1786+
17531787
/**
17541788
* Signal there is some user activity
17551789
*

0 commit comments

Comments
 (0)