0

I am going to enter the Samsung 2013 app contest, and one of the requirements is that you use their Chord API http://developer.samsung.com/chord.

I plan on allowing users to send messages to all phones that have my app installed. From what I gathered from the information in the previous link, this means that I will need to have a constantly running background process for users to receive the messages when they are not looking at the app at the time.

I want to know if this is true, and if so, is this viable? I am considering using the method detailed here: Android: keeping a background service alive (preventing process death) if I go ahead with this.

Community
  • 1
  • 1
Kay-tee
  • 1
  • 1
  • its a content and you give everyone your idea? – CQM Jul 25 '13 at 11:36
  • I haven't told anyone anything they didn't already know. The Chord API developers guide explicitly states that Chord can be used to send messages to others. – Kay-tee Jul 25 '13 at 18:17

1 Answers1

0

I'm trying to use Samsung Chord too. I thing you don't need to do this. Samsung's API Chord already provides this control.

According Chord's API: "If a Chord node doesn’t receive a UDP signal within a specified amount of time, it considers the “missing” node to no longer be part of the network."

And, the only thing you have to do is: "A node cannot receive a UDP broadcast if it is in LCD-off status. Therefore, if developers want the node to discover other nodes while the application is running, the node’s status should be set to LCD-on. To do this, use Android’s PowerManager.WakeLock."

Best regards, Adriano

  • Thanks for a reply! The issue I'm having is that I want users to be able to receive messages while the app is not running and display a notification (basically something similar to what Facebook does). – Kay-tee Jul 18 '13 at 21:10
  • @user2457609 with this information, you will need to use GCM to send a message to that user's device from a server, this would then tell it to listen for the samsung chord. At this point you can also instruct the phone to wake up using PowerManager.WakeLock – CQM Jul 25 '13 at 18:35