local notifications = require( "plugin.notifications" )
notifications.registerForPushNotifications()
local json = require("json")
local function notificationListener( event )
    if ( event.type == "remoteRegistration" ) then 
				helpshift.registerDeviceToken(event.token)
    else -- handle data
    	print( json.prettify( event.custom))
    end
end
local launchArgs = ...

if ( launchArgs and launchArgs.notification ) then
    notificationListener( launchArgs.notification )
end

Runtime:addEventListener( "notification", notificationListener )