Skip to content

Commit

Permalink
Merge branch 'ht/SDK-4385-Android-Bindings-Add-retryPendingConnection…
Browse files Browse the repository at this point in the history
…s-and-requestLastGreen' into 'develop'

CHT-1356 Android Bindings - Add retryPendingConnections and requestLastGreen

Closes SDK-4385

See merge request megachat/MEGAchat!2000
mega-ht committed Sep 30, 2024
2 parents 6dfe667 + 48e246c commit 9e0db33
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions bindings/java/nz/mega/sdk/MegaChatApiJava.java
Original file line number Diff line number Diff line change
@@ -519,6 +519,17 @@ public void retryPendingConnections(boolean disconnect, MegaChatRequestListenerI
megaChatApi.retryPendingConnections(disconnect, createDelegateRequestListener(listener));
}

/**
* Refresh DNS servers and retry pending connections
*
* The associated request type with this request is MegaChatRequest::TYPE_RETRY_PENDING_CONNECTIONS
*
* @param disconnect boolean
*/
public void retryPendingConnections(boolean disconnect){
megaChatApi.retryPendingConnections(disconnect);
}

/**
* Refresh URLs and establish fresh connections
*
@@ -1750,6 +1761,29 @@ public void requestLastGreen(long userid, MegaChatRequestListenerInterface liste
megaChatApi.requestLastGreen(userid, createDelegateRequestListener(listener));
}

/**
* Request the number of minutes since the user was seen as green by last time.
*
* Apps may call this function to retrieve the minutes elapsed since the user was seen
* as green (MegaChatApi::STATUS_ONLINE) by last time.
* Apps must NOT call this function if the current status of the user is already green.
*
* The number of minutes since the user was seen as green by last time, if any, will
* be notified in the MegaChatListener::onChatPresenceLastGreen callback. Note that,
* if the user was never seen green by presenced or the user has disabled the visibility
* of the last-green with MegaChatApi::setLastGreenVisible, there will be no notification
* at all.
*
* The associated request type with this request is MegaChatRequest::TYPE_LAST_GREEN
* Valid data in the MegaChatRequest object received on callbacks:
* - MegaChatRequest::getUserHandle() - Returns the handle of the user
*
* @param userid MegaChatHandle from user that last green has been requested
*/
public void requestLastGreen(long userid){
megaChatApi.requestLastGreen(userid);
}

/**
* Signal there is some user activity
*

0 comments on commit 9e0db33

Please sign in to comment.