want to send sms using java

I'm developing a stand-alone Java application that contains sms sending to certain numbers.

I want to send sms using java and my phone connected to my pc with a usb cable (and not via Bluetooth).

I use Linux operating system (Arch linux).

I tried a few libraries that uses the sms online portals, but for some reason, I don't want to pay these sites. (just to make my card SIM cause its economic want).

Help appreciated

880667 wrote:
I'm developing a stand-alone Java application that contains sms sending to certain numbers.

I want to send sms using java and my phone connected to my pc with a usb cable (and not via Bluetooth).

I use Linux operating system (Arch linux).

I tried a few libraries that uses the sms online portals, but for some reason, I don't want to pay these sites. (just to make my card SIM cause its economic want).

Help appreciatede

The first thing you need to check: are you able to access other services my connection your phone by USB to the computer (line GPRS, calling). Because it requires the call or SMS access to the port. And you said that it is economic by sending an SMS using mobile, that depends. But most of the time, it is best to use the SMS service provider getway. They provide details http or FTP, there just put or message in the form accepitng, things happen by providing it service.

Tags: Java

Similar Questions

  • sending sms using java

    Hi all! I do a web application project in j2ee because I need to put the sms Setup by using the java program and I have no idea about it so I kindly ask you help me on this...
    Thank you
    Vinoth...

    a friend this is not the forum for this :)... newways you need a way to portal sms for texting... do you have material hv supported

  • Send SMS using Oracle database automatically

    Hi all:

    I want to send SMS from Oracle 9i automatically database. What reg software. can I use?

    Hello

    Here's the Oracle Forms forum.
    You would have more chance of getting the answers by posting in the forum database ; D

    François

  • you want to send data using labVIEW to arduino using write visa and the process and to take action using arduino. A

    I want to send data using labVIEW to arduino using write visa and the process and to take action using arduino. After that, I want to arduino to send out necessary via a serial port to labVIEW which should be read using visa read and store in a chain. While I am able to write or read both individually, I can't do it consecutively. I used advanced read and write vi for checking my code, but nothing is helping. The wrong bed 'time delay before execution. " Please let me know where I can go wrong. Also is it possible to write code for hx711 using labVIEW

    1. you need not "\n" on your orders println().  This command adds an end of line character already in the message.

    2. you get the error because you have a loop around your reading.  After the first reading (well technically, the second because of you add an extra line end character), there is nothing left in the port.  As a result, you will get the timeout.

    3. you should really consider using a Structure of the event.  This way you just don't write and read when you press the Write button and you can also use the structure of the event to make the loop to stop.  I also go up to close the port inside the stop-> value Change event.

  • Sending sms using labview

    Hello!!

    It comes to my school project. I need to implement the design to send sms using labview. And I use iTegno 3000 modem and I have no idea where to start. Can someone has a basic idea for me? All the specific commands to use for the modem I use?

    Thank you very much for your help

    Good day! looking forward to all your kind reply...

    Your sequence of structures aren't absolutely necessary and are just getting in the way so delete.

    You do not have a phone number - the yyyyyy is not all correct and you do not send a CTRL-z character. You send the text "ctrl + z". Set the string to display hexadecimal constant and enter 1.

  • Problems sending SMS using SMSTransport

    I am trying to send an SMS using SMSTransport, but I get the following result when my application tries to send a message:

    TMTP::setupFdListener
    TMTP::handleConnected - Connected to ChatService
    New Session Request
    Open Success:
    Session Details "https://discoveryservice.blackberry.com/discoveryPoxmlServlet/" "1.0" "127.0.0.1" 8888
    creation of local SMS-MMS account succeeded
    Created instance of PIMCoreStatusManager
    PIMCoreStatusManager Constructor
    Calling AccountServicePrivate::defaultAccount for service type= "messages"
    Setting Curl Global Init 0
    GET 0x1
    URL Buffer: http://127.0.0.1:8888/accounts/default/messages 
    
    Curl Easy perform
    Curl Easy GetInfo response code
    Curl easy getInfo content_length_download
    Curl Error Code 0
    Response Code 200
    Get Contacts: (QVariant(int, 4) ) 
    
    PIMCoreAccessPool::getPca 0 Thread Id 0x1
    PIMCoreAccessPool::getPca a new PimAccess 0
    getContactDtails called 4
    GET 0x1
    URL Buffer: http://127.0.0.1:8888/contact/4/4 
    
    Curl Easy perform
    Curl Easy GetInfo response code
    Curl easy getInfo content_length_download
    Curl Error Code 0
    Response Code 200
    TMTP::send origPort 0 destPort 0
    TMTP::send attachments 0
    TMTP::send invalid attachment
    

    Here is the code I use to send the message:

    void AlertUtilities::sendSMSMessage(QString subject, QString body)
    {
        SmsTransport smsTransport;
        AccountService accountService;
        ContactService contactService;
        Account account = accountService.defaultAccount(Service::Messages);
        MessageBuilder* messageBuilder = MessageBuilder::create(account.id());
    
        QList contactIds = settings->getSelectedContacts();
    
        for (int i = 0; i < contactIds.length(); i++)
        {
            Contact contact = contactService.contactDetails(
                    contactIds.at(i).toInt());
    
            if (contact.phoneNumbers().length() > 0)
            {
                MessageContact messageContact = MessageContact(i + 1,
                        MessageContact::To, contact.displayName(),
                        contact.phoneNumbers().at(0).value());
                messageBuilder->addRecipient(messageContact);
            }
        }
    
        Message newMessage = messageBuilder->body(MessageBody::PlainText,
                QByteArray("This is a test"));
    
            smsTransport.send(0, newMessage);
    }
    

    Can someone help me understand what I'm doing wrong here?  There seems to be no documentation or examples on how to do it properly.

    Looks like I've got a code snippet rather autonomous and complete handy for this one as well.  (I think you can find others scattered around these forums as well.)  Here it is:

    void sendSms(const QString &messageText, const QStringList &phoneNumbers) {
        bb::pim::account::AccountService accountService;
        QList accountList =
            accountService.accounts(bb::pim::account::Service::Messages, "sms-mms");
    
        bb::pim::account::AccountKey smsAccountId = 0;
        if(!accountList.isEmpty()) {
            smsAccountId = accountList.first().id();
            qDebug() << "SMS-MMS account ID:" << smsAccountId;
        }
        else {
            qWarning() << "Could not find SMS account";
            return;
        }
    
        bb::pim::message::MessageService messageService;
    
        QList participants;
        foreach(const QString &phoneNumber, phoneNumbers) {
            bb::pim::message::MessageContact recipient = bb::pim::message::MessageContact(
                -1, bb::pim::message::MessageContact::To,
                phoneNumber, phoneNumber);
            participants.append(recipient);
        }
    
        bb::pim::message::ConversationBuilder *conversationBuilder =
            bb::pim::message::ConversationBuilder::create();
        conversationBuilder->accountId(smsAccountId);
        conversationBuilder->participants(participants);
    
        bb::pim::message::Conversation conversation = *conversationBuilder;
        bb::pim::message::ConversationKey conversationId = messageService.save(smsAccountId, conversation);
    
        bb::pim::message::MessageBuilder *builder =
            bb::pim::message::MessageBuilder::create(smsAccountId);
        builder->conversationId(conversationId);
    
        builder->addAttachment(bb::pim::message::Attachment("text/plain", "", messageText.toUtf8()));
    
        foreach(const bb::pim::message::MessageContact recipient, participants) {
            builder->addRecipient(recipient);
        }
    
        bb::pim::message::Message message = *builder;
    
        messageService.send(smsAccountId, message);
    
        delete builder;
        delete conversationBuilder;
    
  • How to send SMS from a web application to for free?

    In my view, what API JavaMail will help send emails and SMS Messages via the SMTP server. I want to know how it actually works and how to configure the SMTP server? How to send SMS from java program? Is there any material available on the web? Please give some input.
    Thanks in advance.

    user12873853 wrote:
    In my view, what API JavaMail will help send emails and SMS Messages via the SMTP server.

    Looks like more false hope that belief for me. The only way that works is if you have a SMS gateway which allows communication via SMTP. No doubt some exist (search for 'JavaMail sms' through google seems to indicate), but if you have to ask you don't have.

    And who exactly where you are stuck: to send SMS messages, you need an SMS gateway. It will be the first thing that you have store because, so far, there is no reason to think in code, protocols or implementations. It can be as simple as plugging a mobile phone, but then you can send messages in mass of course. Most likely, you will need to shop for a partner who has a SMS service you can use blasting.

  • How to send SMS to an individual or a list of numbers?

    Hello

    I want to send SMS to a particular number or group of numbers. As I had somehow in this link below: Send SMS text Messages

    I tried with it. But after sending the sms, it is not getting on the particular number. Means, that it is not delivering. I wrote the below codes:

              if (field == mCbSaveContact)
            {
                       sendSms();
                    }
    
     private void sendSms() {
        // TODO Auto-generated method stub
    
             UiApplication.getUiApplication().invokeLater(new Runnable()
                {
    
                    public void run() {
    
                        DatagramConnection dgConn;
                        try {
                            dgConn = (DatagramConnection)Connector.open("sms://9014409192");
                            byte[] data = "Test Message".getBytes();
                            Logger.out("AddContact","data value");
                            Datagram dg = dgConn.newDatagram(dgConn.getMaximumLength());
                            dg.setData(data, 0, data.length);
                            Logger.out("AddContact","after setting the data");
                            dgConn.send(dg);
                            Logger.out("AddContact","Sending SMS success !!!");
                        } catch (IOException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                        }
                            }
                   });
    

    Help, please...

    invokelater isn't a thread and everything that the blocks should be on a separate thread.
    http://supportforums.BlackBerry.com/T5/Java-development/what-is-the-event-thread/Ta-p/446865

  • Sending SMS: is it possible to add an entry from sent SMS/trash

    Hi all

    I am able to send SMS using MessageConnection/DatagramConnection, but is it possible to add them to the sent SMS/trash on device?

    According to the api folder of my knowledge only with e-mail Messages.

    Thanks in advance.

    There is no API to access the sms folders

  • How to send SMS?

    I have the BB Pearl 8120 & I made a simple application that takes input from the user.

    Now, I want to send this entry to the server (i. e. In this case server is my PC), how can I proceed?

    I want to send SMS from my mobile via internet on my PC, how do I do this?

    Please help me...

    Thank you

    Hi friend

    Your pc should be smsc server so that you can be able to send sms to your pc (server) via mobile.

    Thank you

    SK

  • Send a Blackberry smart phone info to a database on a server using Java?

    Hello

    I'm new to the Blackberry development... but I now have a project to do.

    I want to retrieve the latitude and longitude of Blackberry GPS and send them to a database on a server every 30 minutes.  Also, I want to be able to do without the user doing anything on his Blackberry (I mean, I don't want him to click somewhere every now and them).

    I was able to get the latitude and longitude (double) using Java.

    I don't know how to get out them of the BlackBerry.

    Can anyone help?

    Thank you

    BTW, I do my testing on a 8310 Rogers using JDE 4.2.1 Simulator.

    Hello

    The BlackBerry smart phone needs a 'gateway' to connect to the internet. This white paper is extremely useful to explain all your choices of selection of the good gateway:

    Data on BlackBerry 4 Wireless Transport Management - Part 1

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe?func=LL&objid=832210&objAction=browse&s...

    Once you have selected the gateway, then you can go ahead and use the Connector.open (url) command to create a HTTP connection to the application server (Tomcat, JBoss, .NET, etc.) on the internet. The application server could then use ODBC/JDBC to store data in the database.

    Tariq

  • Send a mail using java in oracle 11 g

    I using database 11 g...

    I created a procedure to send a mail using java... as below

    [code]

    CREATE OR REPLACE AND COMPILE JAVA NAMED "SendAttach" AS SOURCES

    import java.util.Properties;

    Javax.mail import. *;

    Javax.mail.internet import. *;

    Javax.activation import. *;

    public class SendAttach {}

    Public Shared Sub sendmail (recipient String, object, String, String msg, String file)

    {

    String host = "smtp.gmail.com; »

    " the end user String = ' [email protected] '; change accordingly

    final String password = "psd"; changes accordingly

    String to = recipient; changes accordingly

    Properties props = new Properties ();

    props.put ("mail.smtp.host", "smtp.gmail.com");

    props.put ("mail.smtp.socketFactory.port", "465");

    props.put ("mail.smtp.socketFactory.class",

    "javax.net.ssl.SSLSocketFactory");

    props.put ("mail.smtp.auth", "true");

    props.put ("mail.smtp.port", "465");

    A session = Session.getDefaultInstance (accessories,

    new javax.mail.Authenticator () {}

    protected PasswordAuthentication getPasswordAuthentication() {}

    return new PasswordAuthentication (user, password);

    }

    });

    try {}

    MimeMessage message = new MimeMessage (session);

    message.setFrom (new InternetAddress (user));

    message.addRecipient (Message.RecipientType.TO, new InternetAddress (to));

    message.setSubject (subject);

    BodyPart messageBodyPart1 = new MimeBodyPart();  newly added

    messageBodyPart1.setText (msg);  newly added

    message.setText (msg);

    MimeBodyPart messageBodyPart = new MimeBodyPart();

    Several multipart part = new MimeMultipart();

    messageBodyPart = new MimeBodyPart();

    String file1 = file;

    String fileName = "sql";

    Data source source = new FileDataSource (file1);

    messageBodyPart.setDataHandler (new DataHandler (source));

    messageBodyPart.setFileName (fileName);

    multipart.addBodyPart (messageBodyPart);

    multipart.addBodyPart (messageBodyPart1);

    message.setContent (multipart);

    Transport.Send (message);

    System.out.println ("message sent successfully...");

    } catch (MessagingException e) {e.printStackTrace () ;}

    }

    }

    /

    It works finw with sysdba login.

    But it gives below error when I connected as user (ori) my username

    prs.png

    Help me to solve the problem...

    Thank you all for the response guys...

    Finally, I have soluion...

    Please follow these steps. If you want to do the same thing

    step 1: connect sysdba virtue

    step 2:grant the bottom of the permissions for the database

    • Call dbms_java.grant_permission ('ORI',
    • ("java.util.PropertyPermission ',' * ',"read, write");
    • run dbms_java.grant_permission('ORI','java.util.PropertyPermission','*','read').
    • run dbms_java.grant_permission ("ORI", 'SYS:java.lang.RuntimePermission', 'getClassLoader', ' ');
    • run dbms_java.grant_permission ("ORI", 'SYS:oracle.aurora.security.JServerPermission', 'Check', ' ');
    • run dbms_java.grant_permission ("ORI", 'SYS:java.lang.RuntimePermission', 'accessClassInPackage.sun.util.calendar', ' ');   run dbms_java.grant_permission ("ORI", 'java.net.SocketPermission', ' *', ' connect, solve ");
    • run dbms_java.grant_permission ("ORI", 'SYS:java.lang.RuntimePermission', 'createClassLoader', ' ');

    Note: replace ORI with your user_name DB

    Step 3: Download 2 jar files jaf - 1.1.1 and javamail - 1.1.1.jar oracle community network

    Step 4: Unzip these two files in sphecific folder.so you can find two jar files activation.jar and mail.jar

    step 5:now open the command prompt in the path where the files two jar are placed in and loading these two pots in DB using below command

    loadjava-user U_name/PSD - solve - synonym mail.jar

    loadjava-user U_name/PSD - solve - synonym activation.jar

    step 6:now run your java process

    [code]

    CREATE OR REPLACE AND COMPILE JAVA NAMED "SendAttach" AS SOURCES

    import java.util.Properties;

    Javax.mail import. *;

    Javax.mail.internet import. *;

    Javax.activation import. *;

    public class SendAttach {}

    Public Shared Sub sendmail (recipient String, object, String, String msg, String file)

    {

    String host = "smtp.gmail.com; »

    the final String user = "mail_id"; changes accordingly

    final String password = 'email_password '; changes accordingly

    String to = recipient; changes accordingly

    Retrieve the session object

    Properties props = new Properties ();

    props.put ("mail.smtp.host", "smtp.gmail.com");

    props.put ("mail.smtp.socketFactory.port", "465");

    props.put ("mail.smtp.socketFactory.class",

    "javax.net.ssl.SSLSocketFactory");

    props.put ("mail.smtp.auth", "true");

    props.put ("mail.smtp.port", "465");

    A session = Session.getDefaultInstance (accessories,

    new javax.mail.Authenticator () {}

    protected PasswordAuthentication getPasswordAuthentication() {}

    return new PasswordAuthentication (user, password);

    }

    });

    Compose the message

    try {}

    MimeMessage message = new MimeMessage (session);

    message.setFrom (new InternetAddress (user));

    message.addRecipient (Message.RecipientType.TO, new InternetAddress (to));

    message.setSubject (subject);

    BodyPart messageBodyPart1 = new MimeBodyPart();  newly added

    messageBodyPart1.setText (msg);  newly added

    message.setText (msg);

    MimeBodyPart messageBodyPart = new MimeBodyPart();

    Several multipart part = new MimeMultipart();

    messageBodyPart = new MimeBodyPart();

    String file1 = file;

    String fileName = "sql";

    Data source source = new FileDataSource (file1);

    messageBodyPart.setDataHandler (new DataHandler (source));

    messageBodyPart.setFileName (fileName);

    multipart.addBodyPart (messageBodyPart);

    multipart.addBodyPart (messageBodyPart1);

    message.setContent (multipart);

    Send the message

    Transport.sendMessage (message, to);

    Transport.Send (message);

    System.out.println ("message sent successfully...");

    } catch (MessagingException e) {e.printStackTrace () ;}

    }

    }

    /

    step 7:

    CREATE or REPLACE procedure NAME of JAVA LANGUAGE AS Send_Attach (container VARCHAR, subject VARCHAR, msg VARCHAR, leader VARCHAR) "SendAttach.sendmail (java.lang.String, java.lang.String, java.lang.String, java.lang.String);

    /

    step 8: say commit.

    step 9:

    Declare

    beneficiary varchar (50): = "recipient_id";

    subject varchar (100): = "Hello";

    MSG varchar (500): = 'this is a test mail with an attachment;

    varchar (100) file: = "path of the file";                   file path - weed

    Begin

    dbms_java.grant_permission('ORI','java.) IO. FilePermission ', leader,' read');

    Send_Attach (container, Subject, MSG, file);

    End;

    [\commit]

    Note: disable windows firewall and anti virus before phone emails

    keep smiling...

  • I do my job to the computer on a MAC computer. I want to create a document using Pages and then convert the document to PDF and send a group email. I want to send the PDF using the pdf for each receiver icon must click the icon to open t

    I do my job to the computer on a MAC book PRO. I want to create a document using Pages and then convert the document to PDF and send a group email. I want to send the PDF using the pdf for each receiver icon must click the icon to open the document. My problem is the document does not show the icon, but rather the document is already open. I spoke with 2 Apple. 'Experts' care and can help me. Can someone tell me what to do?

    It's a question of how the recipients e-mail programs deal with attachments. Many e-mail programs will open all the files they can handle, including files jpg and PDF, by default, and if the recipient has not changed that there is nothing you can do about it. The only solution is to the compress first, then it will be delivered as an attachment, allowing the recipient to decompress and open it.

  • I want to send a page with gmail and it only allows me to use aol, how do I change this?

    The mail/mail icon hangs in aol, and I don't want to send a link or web pages to the front using aol. I want to use gmail. How can I change this? Please tell me step by step what to do. Thanks for your help.

    Could you try the steps in this article to support and see if they work for you: change the program used to open links in e-mail.

  • When installing FF7, I clicked Yes to the "do you want to send info back to the developers on the use of memory etc." and now I want to no longer send information as his gel my browser then how do I disable that?

    Question
    When installing FF7, I clicked Yes to the "do you want to send info back to the developers on the use of memory etc." and now I want to no longer send information as his gel my browser then how do I disable that?

    See:

    • Firefox > Preferences > advanced > general: system default: 'send performance data '.

Maybe you are looking for