I am trying to create a sample app for Android which can have push notification feature using urban airpush. Urban airpush provides 2 options for push notifications 1. C2DM 2. Helium
https://docs.urbanairship.com/display/DOCS/Android+Getting+Started
As Google do not allow accounts for C2DM now, I am left with helium option only.
So I start with sample helium push project provided by UA
https://docs.urbanairship.com/display/DOCS/Getting+Started%3A+Android%3A+Helium+Push
This is what my airshipconfig.properties look like
developmentAppKey = AY1v8U6WQQOJMyNAkv2VDA
developmentAppSecret = -VwPeOUPTqiX_llY7uvPtg
#productionAppKey = Your Production App Key
#productionAppSecret = Your Production Secret
#transport is "c2dm", "helium" or "hybrid".
#note: the helium and hybrid transports are premium features.
#for complete pricing information, see http://urbanairship.com/pricing/
transport = helium
c2dmSender = myemailid@gmail.com
inProduction = false
iapEnabled = false
# 2 = Log.VERBOSE; 3 = Log.DEBUG; 4 = Log.INFO;
# 5 = Log.WARN; 6 = Log.ERROR; 7 = Log.ASSERT;
developmentLogLevel = 3
productionLogLevel = 6
And added these 2 lines in MainActivity OnCreate
PushPreferences prefs = PushManager.shared().getPreferences();
Logger.info("My Application onCreate - App ID " + prefs.getPushId());
But nothing seems to work according to the tutorial
- prefs.getPushId() is returning null, so I cannot test APID specific alerts
- UA allows me to send the broadcast alert but it is not being received by the app
- Does use of helium need GCM or C2DM registration
- Can I use helium with free account, the site says pro feature are available for first 45 days.
It seems I am missing a lot of things here and the documentation is not complete. If anyone has used UA with helium, please suggest how to create a sample app
I was missing one major step, that is we need to register separately to use helium with free account https://go.urbanairship.com/apps/free-trial/
prefs.getPushId() is returning null, so I cannot test APID specific alerts
A. It started working fine after the registration
UA allows me to send the broadcast alert but it is not being received by the app
A. A broadcast is sent only to registered devices
Does use of helium need GCM or C2DM registration
A. No
Can I use helium with free account, the site says pro feature are available for first 45 days.
A. Yes, need to fill the form https://go.urbanairship.com/apps/free-trial/