use of android.os.Message in project nmid-headline by miao1007.
the class OnekeyShare method onError.
public void onError(Platform platform, int action, Throwable t) {
t.printStackTrace();
Message msg = new Message();
msg.what = MSG_ACTION_CCALLBACK;
msg.arg1 = 2;
msg.arg2 = action;
msg.obj = t;
UIHandler.sendMessage(msg, this);
// 分享失败的统计
ShareSDK.logDemoEvent(4, platform);
}
use of android.os.Message in project c-geo by just-radovan.
the class cgeocaches method switchList.
public void switchList(int id, int order) {
cgList list = null;
if (id >= 0) {
list = app.getList(id);
} else if (order >= 0) {
lists = app.getLists();
list = lists.get(order);
} else {
return;
}
if (list == null) {
return;
}
listId = list.id;
title = list.title;
settings.saveLastList(listId);
base.showProgress(activity, true);
setLoadingCaches();
Handler handlerMove = new Handler() {
@Override
public void handleMessage(Message msg) {
Thread threadPure = new geocachesLoadByOffline(loadCachesHandler, latitude, longitude, msg.what);
threadPure.start();
}
};
(new moveCachesToList(listId, handlerMove)).start();
}
use of android.os.Message in project c-geo by just-radovan.
the class cgeogpxes method listDir.
private void listDir(ArrayList<File> list, File directory) {
if (directory == null || directory.isDirectory() == false || directory.canRead() == false) {
return;
}
final File[] listPre = directory.listFiles();
if (listPre != null && listPre.length > 0) {
final int listCnt = listPre.length;
for (int i = 0; i < listCnt; i++) {
if (endSearching == true) {
return;
}
if (listPre[i].canRead() == true && listPre[i].isFile() == true) {
final String[] nameParts = listPre[i].getName().split("\\.");
if (nameParts.length > 1) {
final String extension = nameParts[(nameParts.length - 1)].toLowerCase();
if (extension.equals("gpx") == false) {
continue;
}
} else {
// file has no extension
continue;
}
// add file to list
list.add(listPre[i]);
} else if (listPre[i].canRead() == true && listPre[i].isDirectory() == true) {
final Message msg = new Message();
String name = listPre[i].getName();
if (name.substring(0, 1).equals(".") == true) {
// skip hidden directories
continue;
}
if (name.length() > 16) {
name = name.substring(0, 14) + "...";
}
msg.obj = name;
changeWaitDialogHandler.sendMessage(msg);
// go deeper
listDir(list, listPre[i]);
}
}
}
return;
}
use of android.os.Message in project qksms by moezbhatti.
the class ShouldIAnswerBinder method getNumberRating.
public void getNumberRating(String number) throws RemoteException {
Message msg = new Message();
msg.what = 1;
Bundle data = new Bundle();
data.putString("number", number);
msg.setData(data);
msg.replyTo = messenger;
serviceMessenger.send(msg);
}
use of android.os.Message in project okhttp-OkGo by jeasonlzy.
the class DownloadTask method postMessage.
private void postMessage(String errorMsg, Exception e) {
//发消息前首先更新数据库
DownloadDBManager.INSTANCE.update(mDownloadInfo);
DownloadUIHandler.MessageBean messageBean = new DownloadUIHandler.MessageBean();
messageBean.downloadInfo = mDownloadInfo;
messageBean.errorMsg = errorMsg;
messageBean.e = e;
Message msg = mDownloadUIHandler.obtainMessage();
msg.obj = messageBean;
mDownloadUIHandler.sendMessage(msg);
}
Aggregations