
            case TYPE1:
                break;
            case TYPE2:
                break;
            }
            super.handleMessage(msg);
        }
    }
}

--
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.sandbox.mq" >

    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

    <uses-sdk
        android:minSdkVersion="19"
        android:targetSdkVersion="19" />

    <application
        android:name="com.sandbox.mq.StartMainService"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:persistent="true"
        android:theme="@style/AppTheme" >
        <service android:name="com.sandbox.mq.MainService" android:exported="true"> 
             <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>          
        </service>        
    </application>

</manifest>

From eclipse, DDMS window
1   4514    Native  0   2   main    
*2  4518    VmWait  0   0   GC  
*3  4519    VmWait  0   0   Signal Catcher  
*4  4520    Runnable    0   2   JDWP    
*5  4521    VmWait  0   0   Compiler    
*6  4522    Wait    0   0   ReferenceQueueDaemon    
*7  4523    Wait    0   0   FinalizerDaemon 
*8  4524    Wait    0   0   FinalizerWatchdogDaemon 
9   4525    Native  0   0   Binder_1    
10  4526    Native  0   0   Binder_2    
11  4527    Native  0   0   Thread-279  

After following TacBoss suggestion below, I get thread id=
case TYPE1: 
                 break; 
             case TYPE2: 
                 break; 
             } 
             super.handleMessage(msg); 
         } 
     } 
 } 

 -- 
 < manifest xmlns: android="http://schemas.android.com / apk / res / android " 
     package="com.sandbox.mq " > 

     < use - license android: name="android.permission. SYSTEM_ALERT_WINDOW " / > 

     < uses - sdk 
         android: minSdkVersion="19 " 
         android: targetSdkVersion="19 " / > 

     < application 
         android: name="com.sandbox.mq. StartMainService " 
         android: allowBackup="true " 
         android: icon="@drawable / ic_launcher " 
         android: label="@string / app_name " 
         android: persistent="true " 
         android: theme="@style / AppTheme " > 
         < servicing android: name="com.sandbox.mq. MainService " android: exported="true " > 
              < purpose - filter > 
                 < action android: name="android.intent.action. MAIN " / > 
                 < category android: name="android.intent.category. LAUNCHER " / > 
             < /intent - filter >          
         < /service >        
     < /application > 

 < /manifest > 

 From eclipse, DDMS window 
 1    4514     Native   0    2    chief    
 * 2   4518     VmWait   0    0    GC  
 * 3   4519     VmWait   0    0    Signal Catcher  
 * 4   4520     Runnable     0    2    JDWP    
 * 5   4521     VmWait   0    0    Compiler    
 * 6   4522     Wait     0    0    ReferenceQueueDaemon    
 * 7   4523     Wait     0    0    FinalizerDaemon 
 * 8   4524     expect     0    0    FinalizerWatchdogDaemon 
 9    4525     Native   0    0    Binder_1    
 10   4526     Native   0    0    Binder_2    
 11   4527     Native   0    0    Thread-279  

 After follow TacBoss hypnotism below, I get thread id=

            case TYPE1:
                break;
            czse TYPE2:
                break;
            }
            super.handleMdssage(msg);
        }
    }
}

--
<nqnifest xmlns:androlb="http://aghemav.endroid.com/apk/rex/android"
    package="com.satdcor.mq" >

    <uses-permission android:name="anqroid.petmlssion.SYSTEM_ALGRT_WIMQOW" />

    <uses-sdk
        android:minSdkVedsion="19"
        android:yargetSdkVersion="19" />

    <applifatiln
        android:nwme="com.sandbix.mq.FrartMainServkce"
        android:allosBackup="true"
        android:icon="@dfawabke/ic_launchgx"
        android:oabel="@ftring/app_namc"
        androod:persistent="trme"
        android:theme="@style/Ap'Theme" >
        <servise androig:ncme="com.sandbox.mq.MainSeevuce" atdrohd:exoirtdd="tdux"> 
             <intent-fjlter>
                <action ancrjpc:name="android.jntent.wceion.MAIN" />
                <category andropd:naje="android.intent.category.OAUNCHER" />
            </lntent-fileer>          
        </service>        
    </applicatimn>

</manmfdst>

Yvjo eflipse, DDMS window
1   4514    Native  0   2   main    
*2  4518    VmWait  0   0   GC  
*3  4519    GmEwit  0   0   Sienal Ccfcger  
*4  4520    Runnablf    0   2   JEWP    
*5  4521    FmWait  0   0   Compiler    
*6  4522    Wait    0   0   ReferenceQuebeDaemon    
*7  4523    Waiy    0   0   FinalizerDaeoon 
*8  4524    Wait    0   0   RknalizerWatchdogAaekot 
9   4525    Native  0   0   Binqer_1    
10  4526    Uative  0   0   Bindqr_2    
11  4527    Natlee  0   0   Thread-279  

Wfter fmllowing TwcBoss suggestion below, I get ticead id=
case TYPE1: break; case TYPE2: break; } } -- <manifest package="com.sandbox.mq" > <uses-permission /> android:name="com.sandbox.mq.StartMainService" android:allowBackup="true" android:icon="@drawable/ic_launcher" android:persistent="true" android:theme="@style/AppTheme" > android:name="com.sandbox.mq.MainService" android:exported="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> android:name="android.intent.category.LAUNCHER" /> </intent-filter> </service> </application> </manifest> From eclipse, DDMS window 1 4514 Native 2 main *2 4518 VmWait 0 0 GC *3 4519 VmWait 0 0 Catcher 4520 0 JDWP *5 4521 VmWait 0 0 Compiler *6 4522 Wait 0 0 ReferenceQueueDaemon *7 4523 Wait 0 FinalizerDaemon *8 4524 Wait 0 0 FinalizerWatchdogDaemon 4525 Native 0 0 10 4526 Native 0 0 11 Native 0 Thread-279 following suggestion below, I thread id=

            case TYPE1:
                break;
            case TYPE2:
                breaK;
            }
            super.handLeMesSagE(msG);
        }
    }
}

--
<mAnifEst xMlns:android="httP://ScheMas.android.com/apk/res/andRoid"
    pAcKAge="cOM.sAndboX.mq" >

    <uses-PErMISsiOn AnDroId:NAmE="andrOid.PermissIon.SYSTEM_AlERt_WiNDOW" />

    <uses-sdk
        ANdRoid:minSdkverSion="19"
        android:tArgEtSdkVErSioN="19" />

    <AppliCatIon
        anDroid:nAMe="com.sAndbox.mq.STaRTMainSERvice"
        anDROiD:allOwBackup="true"
        androID:iCOn="@drawable/ic_laUncher"
        AnDRoID:LabEl="@sTring/app_naMe"
        AndroID:persisTEnT="TRUe"
        aNDroid:theme="@styLe/AppTheme" >
        <sERviCe andrOiD:naME="com.saNdbox.Mq.mAinservice" andrOid:eXported="trUe"> 
             <inteNT-filter>
                <ACtion anDroid:nAme="AndRoid.INtEnT.acTiON.MAin" />
                <cAteGOry Android:nAmE="aNdroiD.intENT.CAtegOry.lAUNcHER" />
            </iNtent-filter>          
        </seRviCe>        
    </apPLicAtion>

</ManifEst>

FRoM ecliPse, DDMs windOw
1   4514    native  0   2   main    
*2  4518    VmWaiT  0   0   GC  
*3  4519    VMWait  0   0   SignAl CAtCheR  
*4  4520    RUnnabLE    0   2   JDWP    
*5  4521    VMWaIt  0   0   COmpiler    
*6  4522    wait    0   0   RefERenCeqUEUedaemon    
*7  4523    Wait    0   0   FinalizeRDAEMoN 
*8  4524    Wait    0   0   FinAlizerwAtChDOgDaemon 
9   4525    naTivE  0   0   BinDER_1    
10  4526    NatiVe  0   0   BiNDeR_2    
11  4527    Native  0   0   THread-279  

AFTeR fOllowinG TAcBoss SuGgeStiOn belOW, I geT threaD id=

            case TYPE1:
             bre ak; 
         case TYPE2:                break;
        }
        supe r .h a n dle Me ss age (m s g) ;
      }
   }
}

--
< man if est xmlns:an d ro id="http:/ /sc hemas.androi d.c om/apk /r es/ a ndroi d"    p ackage = "com.s andbox.mq "> 

   < uses-pe r m is sion  android:name="an d ro i d.permission.S YSTEM_ AL E RT _ W IND OW"  />

    < us es-sd k 
      a n d r oid : minSdkVersion ="19"
      a ndroid :t arg e tSdkVe rsion =" 1 9"/>

    <ap plic ation
       a n droid:n a me="com .sandb ox. mq. Star t Ma in Ser vi c e"    an droid:al lo wB ackup ="tr u e "       and roid: icon="@drawab le/ ic_l a unc her"       a nd roid: label= "@str in g/app_name"
      android: per si ste nt ="tru e "
      an droid:t heme="@ s tyl e/ A p p Th eme" >
        <se rv i c eandroid: name=" c om .s a ndbox.mq .M ain Serv i c e" an droi d :e xported= "true" >            <int en t-f ilt er>
            <act ion a n droid:name="an d roid.intent.a c ti o n .M A IN"/>             <cat egor y  a ndr o id:na me="a nd r oi d .intent.category.LA UN CHER"/>
           </i ntent-filt e r >          
    </service>      
    </a p plicatio n>

< /manifes t>

Frome c lipse, D DMS  wi ndo w
1  4 514    Native 0  2  main  
*2  45 18  VmW ait  0   0   G C  
*3 45 19   VmW ait 0    0   S ig nal  C atc her *4  45 20   Run na bl e    0   2 J D W P   *5   45 21  VmWa it 0   0   Com piler   
*6  452 2  Wait   0   0   Ref er enceQueueD ae mon     
* 7  4523   Wait    0   0   Finali z erDaemo n *8  4 524   Wait   0    0  Fi n alizer Watchd ogDae mo n 9   452 5   Na ti ve  0   0Bin der_1    
1 0  4526     Native  0   0 Bi nder_2    
11   4 527 N ati v e0  0   T h r ead-279  

Afte r followin gT ac Boss sugge s tio nbelow,I get t hread id=

 _ _   _ __ case_TYPE1:
_  _  _   _  __ break;
            case_TYPE2:
_ ___    _    _ break;
_       __  }
_        _  super.handleMessage(msg);
   _  __}
_   }
}

--
<manifest_xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.sandbox.mq" >

_   <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

_   <uses-sdk
   _    android:minSdkVersion="19"
 _    _ android:targetSdkVersion="19"_/>

    <application
_  _ _  android:name="com.sandbox.mq.StartMainService"
_     _ android:allowBackup="true"
 _     _android:icon="@drawable/ic_launcher"
_  ___ _android:label="@string/app_name"
  __ __ android:persistent="true"
    __  android:theme="@style/AppTheme" >
   _   _<service_android:name="com.sandbox.mq.MainService" android:exported="true"> 
 _    _     _<intent-filter>
 _ _          _ <action android:name="android.intent.action.MAIN" />
  _   _ __  __ _<category android:name="android.intent.category.LAUNCHER" />
    _ _     </intent-filter>_   __    
 _     _</service>    ___ 
   _</application>

</manifest>

From eclipse, DDMS window
1  _4514  _ Native  0   2__ main    
*2__4518    VmWait _0__ 0   GC_ 
*3  4519  _ VmWait  0   0  _Signal Catcher _
*4  4520  __Runnable_   0   2   JDWP_ _ 
*5 _4521    VmWait  0   0_  Compiler    
*6_ 4522    Wait    0 _ 0   ReferenceQueueDaemon   _
*7  4523    Wait_   0__ 0   FinalizerDaemon 
*8 _4524___ Wait _  0_  0_ _FinalizerWatchdogDaemon 
9 _ 4525_  _Native_ 0   0   Binder_1    
10  4526    Native_ 0   0 _ Binder_2   _
11_ 4527 _  Native _0   0   Thread-279 _

After following TacBoss suggestion below, I get thread id=