iOS Question About B4i notification Alert and Sound

Discussion in 'iOS Questions' started by roddy, Mar 17, 2015.

  1. roddy

    roddy Member Licensed User

    Receive message from B4J Push server is Okay. (message show in Logs window)
    I added a short program on notification sound,but my phone does not respond.
    In debug mode is no response yet? or my code is wrong?


    Code:
    Private Sub Application_RemoteNotification (Message As Map)
        
    'Log("Remote notification: " & Message)
        Dim m As Map = Message.Get("aps")
        
    Dim Data As String
        Data = m.Get(
    "alert")
        
    Log(Data)
        
    Dim n As Notification
        n.Initialize(
    DateTime.Now + 2 * DateTime.TicksPerSecond)
        n.PlaySound = 
    True
        n.AlertBody = Data
        n.Register
    End Sub
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You cannot test it in debug mode unless you are sending the message while the debugger is attached.
     
  3. roddy

    roddy Member Licensed User

    Sorry,my question is: Why this program has no effect on the phone?

    Code:
    ...
    Log(Data)
        
    Dim n As Notification
        n.Initialize(
    DateTime.Now + 2 * DateTime.TicksPerSecond)
        n.PlaySound = 
    True
        n.AlertBody = Data
        n.Register
    Update...
    The programe is right.
    I found the answer.
     
    Last edited: Mar 17, 2015
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice