Hirdetés
Új hozzászólás Aktív témák
-
#39560925
törölt tag
Ok, ezt nem értem.
public static void testEventBus(final Set<ExceptionChangeListener> exceptionChangeListeners) {
GraphRequest request = GraphRequest.newMyFriendsRequest(accessToken, new GraphRequest.GraphJSONArrayCallback() {
@Override
public void onCompleted(JSONArray jsonArray, GraphResponse graphResponse) {
// request successfully returned
if (graphResponse.getError() == null) {
Log.d("response length: ", Integer.toString(jsonArray.length()));
Set<Friend> friends = new TreeSet<>(new Friend.NameComparator());
for (ExceptionChangeListener listener : exceptionChangeListeners) {
listener.onExceptionsChanged();
}
if (firstStart) {
friendListListener.onFirstAppStart(friends);
} else {
friendListListener.onAppStart(friends);
}
}
}
});
Bundle parameters = new Bundle();
parameters.putString("fields", "id,name,picture");
request.setParameters(parameters);
request.executeAsync();
}Facebook doksiból:
executeAsync():
Executes the request asynchronously. This function will return immediately, and the request will be processed on a separate thread. In order to process result of a request, or determine whether a request succeeded or failed, a callback must be specified (see the setCallback.setCallback(Callback) method).This should only be called from the UI thread.
Gombnyomásra meghívom az executeAsync()-et, meghívódik az onCompleted(), abban meghívom notifyDataSetChanged()-et, és nem áll le kivétellel az alkalmazás. Ez a callback a main szálon fut, vagy micsoda? Hogy lehet az?
Új hozzászólás Aktív témák
- Dell 14 Latitude 7450 WUXGA 2in1 Touch X360 Ultra5 135U 12mag 16GB 512GB Win11 Pro WiFi7 Garancia
- Eladó Apple iPhone SE 2020 64GB / 12 hó jótállás
- ÚJ Lenovo ThinkPad X13 Gen 5 - 13.3" WUXGA IPS - Ultra 5 135U - 16GB - 512GB - Win11 - 2,5 év gari
- M5! KÉSZLETKISÖPRÉSI ULTRAAKCIÓ!!! TÜZES EZÜST MacBook Pro 14" M5!!! 10C/10G 16GB 512GB Gar!
- Apple iPhone 15Pro 128GB Kártyafüggetlen 1év Garanciával
Állásajánlatok
Cég: Laptopszaki Kft.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest


