android - onReciever() method of Broadcastreciever is not called when i run the app Log.d() not show on log cat -


- I'm a new Android developer and BroadcastSear's Reciever () method is not called when I run Ap log D I am ) Not to show on log -inist file

   & Lt; Usage-permission Android: name = "android.permission.ACCESS_NETWORK_STATE" /> & Lt; Android Android: allowBackup = "true" android: icon = "@draubable / IC_Luncher" Android: label = "@ string / app_name" Android: Theme = "@ Style / Aaptim" & gt; & Lt; Receiver Android: name = ". MyReceiver" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.net.conn.CONNECTIVITY_CHANGE" /> & Lt; / Intent-Filter & gt; & Lt; / Receiver & gt; & Lt; Activity Android: name = "com.Audio.audioplayer.PlayerAudioActivity" android: label = "@ string / app_name" Android: Screen Orientation = "Portrait" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "android.intent.category.LAUNCHER" /> & Lt; Data Android: scheme = "tele" /> & Lt; / Intent-Filter & gt; & Lt; / Activity & gt; & Lt; Activity Android: name = ". PlayListActivity" android: label = "@ string / app_name" Android: Screen Orientation = "Portrait" & gt; & Lt; Meta-Data Android: name = "android.support.PARENT_ACTIVITY" Android: value = "com.Audio.audioplayer.PlayerAudioActivity" /> & Lt; / Activity & gt; & Lt; / Application & gt; & Lt; / Reveal & gt;   

My Broadcast Styles class is the following

  Package Com Audio Audio player; Import android.content.BroadcastReceiver; Import android.content.Context; Import android.content.Intent; Import android.net Connectivity Manager; Import android.util.log; Import android.widget.Toast; Public category Myracevar provides public zeros on the broadcast receiver (reference reference, intended intent) (if (intent.getAction). Equivalent (Connectivity Manager. CONNECTIVITY_ACTION)) {Toast. Make text (reference, "intent was detected.", Toast. LNNHH_LOG). Show (); Log.d ("BBBBBBBBBBBBBBBBBBBBBB", "OOOOOOOOOOO"); } Else {Toast.makeText (reference, "intent has not been detected.", Toast.LnnHH_LOG). Show (); Log.d ("nonsense", "o"); }}}}    

Bootstrap works when the system changes occur when you Connect to the network and disconnect it into the device

Try it

  & lt; Receiver Android: name = ". MyReceiver" Android: enabled = "true" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.net.wifi.WIFI_STATE_CHANGED" /> & lt; Action Android: name = "android.net.conn.CONNECTIVITY_CHANGE" /> & Lt; Action Android: name = "android.net conn.DATA_ACTIVITY_CHANGE" /> & Lt; / Intent-Filter & gt; & Lt; / Receiver & gt;    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -