Example usage for android.os Message setData

List of usage examples for android.os Message setData

Introduction

In this page you can find the example usage for android.os Message setData.

Prototype

public void setData(Bundle data) 

Source Link

Document

Sets a Bundle of arbitrary data values.

Usage

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

static void show_status_bar_wrapper() {
    try {/*from   w ww .  jav  a  2 s . c o m*/
        Message msg = Navit.Navit_progress_h.obtainMessage();
        Bundle b = new Bundle();
        msg.what = 27;
        msg.setData(b);
        Navit.Navit_progress_h.sendMessage(msg);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

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

static void hide_status_bar_wrapper() {
    try {/* w  w  w  .ja  va2  s.  com*/
        Message msg = Navit.Navit_progress_h.obtainMessage();
        Bundle b = new Bundle();
        msg.what = 28;
        msg.setData(b);
        Navit.Navit_progress_h.sendMessage(msg);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

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

static void default_brightness_screen_wrapper() {
    try {//w ww.  j  a  v a  2s .  com
        Message msg = Navit.Navit_progress_h.obtainMessage();
        Bundle b = new Bundle();
        msg.what = 21;
        msg.setData(b);
        Navit.Navit_progress_h.sendMessage(msg);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

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

static void set_zoom_level(int want_zoom_level) {
    try {/*from  ww w  . j  ava  2  s.co  m*/
        Bundle b = new Bundle();
        Message msg = new Message();
        b.putInt("Callback", 33);
        b.putString("s", Integer.toString(want_zoom_level));
        msg.setData(b);
        NavitGraphics.callback_handler.sendMessage(msg);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

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

static void set_zoom_level_no_draw(int want_zoom_level) {
    try {//from  ww w. ja  v a2s  .c o  m
        Bundle b = new Bundle();
        Message msg = new Message();
        b.putInt("Callback", 105);
        b.putString("s", Integer.toString(want_zoom_level));
        msg.setData(b);
        NavitGraphics.callback_handler.sendMessage(msg);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

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

private static void set_TurnRestrictions_layers() {
    int on_ = 59; // on

    if (!p.PREF_show_turn_restrictions) {
        on_ = 60; // off
    }/*from   w w w  .  ja v  a 2  s .  co m*/

    Message msg = new Message();
    Bundle b = new Bundle();
    b.putInt("Callback", on_);
    b.putString("s", "TurnRestrictions");
    msg.setData(b);
    NavitGraphics.callback_handler.sendMessage(msg);
}

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

public static void follow_button_on() {
    SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(Navit.getBaseContext_);
    SharedPreferences.Editor editor = prefs.edit();
    Navit.follow_current = Navit.follow_on;
    p.PREF_follow_gps = true;/* www.  j a v a2  s  .c  o  m*/
    editor.putBoolean("follow_gps", p.PREF_follow_gps);
    editor.commit();

    // hold all map drawing -----------
    Message msg = new Message();
    Bundle b = new Bundle();
    b.putInt("Callback", 69);
    msg.setData(b);
    try {
        NavitGraphics.callback_handler.sendMessage(msg);
    } catch (Exception e) {
        e.printStackTrace();
    }
    // hold all map drawing -----------

    msg = Navit_progress_h.obtainMessage();
    b = new Bundle();
    msg.what = 32;
    try {
        Navit_progress_h.sendMessage(msg);
    } catch (Exception e) {
    }

    getPrefs();
    activatePrefs(1);

    // follow mode ON -----------
    msg = new Message();
    b = new Bundle();
    b.putInt("Callback", 74);
    msg.setData(b);
    try {
        NavitGraphics.callback_handler.sendMessage(msg);
    } catch (Exception e) {
        e.printStackTrace();
    }
    // follow mode ON -----------

    // allow all map drawing -----------
    msg = new Message();
    b = new Bundle();
    b.putInt("Callback", 70);
    msg.setData(b);
    try {
        NavitGraphics.callback_handler.sendMessage(msg);
    } catch (Exception e) {
    }
    // allow all map drawing -----------

    NavitVehicle.set_last_known_pos_fast_provider();

    // JB fix
    //NavitGraphics.NavitAOSDJava_.postInvalidate();
    //System.out.println("xx paint 12 xx");
    NavitGraphics.OSD_new.postInvalidate();
    NavitGraphics.NavitAOverlay_s.postInvalidate();
}

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

public static void set_debug_messages3_wrapper(String text) {
    try {//from ww w  .  j a  v a2 s.com
        Message msg = Navit_progress_h.obtainMessage();
        Bundle b = new Bundle();
        msg.what = 15;
        b.putString("text", text);
        msg.setData(b);
        Navit_progress_h.sendMessage(msg);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

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

public static void set_debug_messages_say_wrapper(String text) {
    try {//ww w. j a v  a  2 s.  c o  m
        Message msg = Navit_progress_h.obtainMessage();
        Bundle b = new Bundle();
        msg.what = 30;
        b.putString("text", text);
        msg.setData(b);
        Navit_progress_h.sendMessage(msg);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

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

private static void set_poi_layers() {
    int on_ = 59;
    int off_ = 60;

    // System.out.println("POI:1");
    if (p.PREF_show_poi_on_map) {
        // System.out.println("POI:2");
        on_ = 60;/* w w w.java  2  s  . c o  m*/
        off_ = 59;
    }

    // toggle the normal POI layers (to avoid double POIs)
    Message msg = new Message();
    Bundle b = new Bundle();
    b.putInt("Callback", on_);
    b.putString("s", "POI Symbols");
    msg.setData(b);
    NavitGraphics.callback_handler.sendMessage(msg);

    msg = new Message();
    b = new Bundle();
    b.putInt("Callback", on_);
    b.putString("s", "POI Labels");
    msg.setData(b);
    NavitGraphics.callback_handler.sendMessage(msg);

    // toggle full POI icons on/off
    msg = new Message();
    b = new Bundle();
    b.putInt("Callback", off_);
    b.putString("s", "Android-POI-Icons-full");
    msg.setData(b);
    NavitGraphics.callback_handler.sendMessage(msg);

    msg = new Message();
    b = new Bundle();
    b.putInt("Callback", off_);
    b.putString("s", "Android-POI-Labels-full");
    msg.setData(b);
    NavitGraphics.callback_handler.sendMessage(msg);

    // draw_map();
}