Android Question SMS from tablet to phone doesn't work

Discussion in 'Android Questions' started by Gerrard, Mar 10, 2015.

  1. Gerrard

    Gerrard Member Licensed User

    I have a Samsung tablet model P1000 running android 2.3.3, and a Samsung phone running android 4.1.2. I am able to send an SMS manually from the tablet to the phone and it works. However, using the app below on the tablet nothing happens and the SMS does not come to the phone.
    Code:
    #Region  Project Attributes
       
    #ApplicationLabel: TrialSMS
       
    #VersionCode: 1
       
    #VersionName:
       
    'SupportedOrientations possible values: unspecified, landscape or portrait.
       #SupportedOrientations: unspecified
       
    #CanInstallToExternalStorage: False
    #End Region

    #Region  Activity Attributes
       
    #FullScreen: False
       
    #IncludeTitle: True
    #End Region

    Sub Process_Globals
       
    'These global variables will be declared once when the application starts.
       'These variables can be accessed from all modules.
       
    End Sub

    Sub Globals
       
    'These global variables will be redeclared each time the activity is created.
       'These variables can only be accessed from this module.
       Dim lblMobileNo As Label
       
    Dim lblMessage As Label
    End Sub

    Sub Activity_Create(FirstTime As Boolean)
       
    'Do not forget to load the layout file created with the visual designer. For example:
       Activity.LoadLayout("main")
       
    Dim Sms As PhoneSms
       
    Dim MobileNo As String
       MobileNo = 
    "+27613798660"
       lblMobileNo.Text = MobileNo
       
    Dim messagetext As String
       messagetext = 
    "hello there"
       lblMessage.Text = messagetext
       
    Log("msg=" & messagetext)
       
    Log("MobileNo=" & MobileNo)
       
    Sms.Send(MobileNo, messagetext)
       
    ToastMessageShow("sms " & messagetext & " to " & MobileNo, True)
       
    Log("sms " & messagetext & " to " & MobileNo)
    End Sub
    If I use the same app on the phone to send an SMS to the tablet it works.
    What can I do?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Your code looks correct. Does this tablet have a phone number?
     
  3. Gerrard

    Gerrard Member Licensed User

    Yes it does, and the app works on the phone and sends the sms okay to the tablet. And I can send an sms manually from the tablet to the phone.
    But the app doesn't work on the tablet and there is no error message! The sms never gets to the phone.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Check the unfiltered logs. Maybe there is a message there.
     
  5. Gerrard

    Gerrard Member Licensed User

    Hi Erel, i am pleased to let you know that I solved the problem. On the tablet, in Account and sync settings , then in General sync settings, I had to tick Background data ON. The sms from the tablet to the phone works perfectly.
    I got the clue by looking at my phone logs and there was no record in the logs of the sms sent from the phone to the tablet.
    Cheers
    Gerrard
     
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