Example usage for android.os Handler sendMessage

List of usage examples for android.os Handler sendMessage

Introduction

In this page you can find the example usage for android.os Handler sendMessage.

Prototype

public final boolean sendMessage(Message msg) 

Source Link

Document

Pushes a message onto the end of the message queue after all pending messages before the current time.

Usage

From source file:com.zoffcc.applications.zanavi.Navit.java

private static void activatePrefs_mapdir(Boolean at_startup) {
    // if (Navit.METHOD_DEBUG) Navit.my_func_name(0);

    // activate the new directory
    NavitDataDirectory_Maps = sanity_check_maps_dir(NavitDataDirectory_Maps);
    MAP_FILENAME_PATH = NavitDataDirectory_Maps;
    MAPMD5_FILENAME_PATH = NavitDataDirectory_Maps + "/../md5/";
    CFG_FILENAME_PATH = NavitDataDirectory_Maps + "/../";
    NAVIT_DATA_DEBUG_DIR = CFG_FILENAME_PATH + "../debug/";

    //System.out.println("xxxxxxxx************XXXXXXXXXXX");
    //System.out.println("xxxxxxxx************XXXXXXXXXXX");
    //System.out.println("xxxxxxxx************XXXXXXXXXXX");
    //System.out.println("xxxxxxxx************XXXXXXXXXXX");
    //System.out.println("xxxxxxxx************XXXXXXXXXXX");
    //System.out.println("xxxxxxxx************XXXXXXXXXXX");
    //System.out.println("xxxxxxxx************XXXXXXXXXXX");
    //System.out.println("xxxxxxxx************XXXXXXXXXXX");
    //System.out.println("xxxxxxxx************XXXXXXXXXXX");

    Handler h_temp = null;
    h_temp = NavitGraphics.callback_handler_s;
    //System.out.println("handler 1=" + h_temp.toString());

    Message msg1 = new Message();
    Bundle b1 = new Bundle();
    b1.putInt("Callback", 47);
    b1.putString("s", MAP_FILENAME_PATH);
    msg1.setData(b1);//  w  ww  .j av a 2s  .  c  o  m
    h_temp.sendMessage(msg1);

    if (!at_startup) {
        Message msg2 = new Message();
        Bundle b2 = new Bundle();
        b2.putInt("Callback", 18);
        msg2.setData(b2);
        h_temp.sendMessage(msg2);
    }

    // if (Navit.METHOD_DEBUG) Navit.my_func_name(1);
}

From source file:com.zoffcc.applications.zanavi.Navit.java

private static void activatePrefs_mapcache() {
    // if (Navit.METHOD_DEBUG) Navit.my_func_name(0);

    Handler h_temp2 = null;
    h_temp2 = NavitGraphics.callback_handler_s;
    System.out.println("activatePrefs_mapcache " + NavitGraphics.callback_handler_s);
    Message msg7 = new Message();
    Bundle b7 = new Bundle();
    b7.putInt("Callback", 55);
    b7.putString("s", String.valueOf(p.PREF_mapcache * 1024));
    msg7.setData(b7);/*from w ww  . j  a  v a 2  s . c  o m*/
    h_temp2.sendMessage(msg7);

    // if (Navit.METHOD_DEBUG) Navit.my_func_name(1);
}