android - How to set dynamic channel name -


I'm trying to PubNub setup in your Android app. It works perfectly well except for one thing: How do I set up a dynamic channel name:

For example, I need a channel name:

App.Count_14. General_channel

Account ID (14) will be dynamic which user is logged in.

I am using this exact code from PBPN:

Thanks for all help!

can be a time when you started your PubNub instance, you can subscribe to as many as you want channels Are there. Many developers will subscribe to the global channel for updates to their customers, and then a user channel for personal communication.

Right now in your code, you are subscribing to a channel:

  string channel = "Hello_world";   

... and then later:

  try {pubnub.subscribe (new string [] {channel}, new callback () {  

You can feel free to write your own channel name on the basis of your user's ID and subscribe to this channel in addition to your existing channel, or additionally (if this ID continues continuously If needed, check for information about storing that data in a bundle.)

Let me know that How it goes!

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -