#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0

    Confusion on BroadcastReceiver() and Intents


    Hi,

    I am new in android development including basic Java knowledge. I want to create an app to broadcast announcements in a working/school environment. What I want to do is simply broadcast announcements so those who have this app installed in their phones will also receive these announcements. I have these questions:

    1. Is it possible to do so using BroadcastReceiver? If so, how will I be able to test this using two different emulators? Do I have to configure some networking features?
    2. Do I need to use some sort of networking permissions in manifest.xml file to allow for these other devices to receive a particular broadcasted announcement? If I'll be using BroadcastReceiver class with the onReceive() method, is that capable enough to be able to send the announcement over to those devices with the installed app?
    3. Using Intents, are they able to capture the string message in an activity and send it to the receiving class and be displayed there? If it's possible, how so?

    If anyone could shed some light on the above matters, it'll be greatly appreciated.
    Thanks in advance
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0
    Well,
    Apparently, intents have
    Code:
    intent.putExtra("Message", yourStringParameterHere)
    so I have that solved!! But not the rest of my questions!!


    Originally Posted by keen2learn
    Hi,

    I am new in android development including basic Java knowledge. I want to create an app to broadcast announcements in a working/school environment. What I want to do is simply broadcast announcements so those who have this app installed in their phones will also receive these announcements. I have these questions:

    1. Is it possible to do so using BroadcastReceiver? If so, how will I be able to test this using two different emulators? Do I have to configure some networking features?
    2. Do I need to use some sort of networking permissions in manifest.xml file to allow for these other devices to receive a particular broadcasted announcement? If I'll be using BroadcastReceiver class with the onReceive() method, is that capable enough to be able to send the announcement over to those devices with the installed app?
    3. Using Intents, are they able to capture the string message in an activity and send it to the receiving class and be displayed there? If it's possible, how so?

    If anyone could shed some light on the above matters, it'll be greatly appreciated.
    Thanks in advance

IMN logo majestic logo threadwatch logo seochat tools logo