Click here to Skip to main content
15,887,083 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Sir

I have developed an android mobile applicaton in which sms is main communication fundamental and I also developed an application in VB NET now I wish to sync these two application Is it possible that when an android device receving sms then I read it via the vb net programmatically is it possible then pl revert me the method how it can be..

thanks an regerds..

Om Parkash Kaushik
Posted

You cannot to do this but there is a way round to handle this kind of situation.

What you need is to write a Web Service or WCF which talks to the same database, VB.NET talks. Now when you receive a SMS, call the webservice, do your sync stuff.

That's the only way, I think you can sync vb.net and device.

cheers
 
Share this answer
 
Create a Listener on your android application

Heres an example code: http://davanum.wordpress.com/2007/12/15/android-listen-for-incoming-sms-messages/[^]

Write VB.NET Web Service or WCF Service, Below is a WCF Service example:
http://fszlin.dymetis.com/post/2010/05/10/Comsuming-WCF-Services-With-Android.aspx[^]

Post the message to the WCF Service as outlined in the example.. (By converting the received sms into an object i.e. the same working mechanism in the Vehicle class outlined in the example)

And you should be fine..

If you are talking about communicating to a native VB.net Application it is impossible, it is only possible via Web Services

Good luck :)
 
Share this answer
 
v2
Class.forName(driver).newInstance();

NOT FOUND EXCEPTION


HOW YOU ADDED ARE YOU SURE THIS WORK
THANKS FOR ANY HELP
 
Share this answer
 
try below code :include jtds lib in android project.

C#
try {
        String driver = "net.sourceforge.jtds.jdbc.Driver";//
        Class.forName(driver).newInstance();
        
        connectionString = "jdbc:jtds:sqlserver://databaseip:port/databasename;encrypt=fasle;user=username;password=password;

        System.out.println("temp is : "
                + System.getProperty("java.io.tmpdir"));
                connection = DriverManager.getConnection(connectionString,
                username, password);

        stmt = connection.createStatement();
                return;
    } catch (ClassNotFoundException e) {
        errorMassage = e.getMessage();
        System.out.println("Could not find the database driver "
                + e.getMessage());
        e.printStackTrace();
    } catch (SQLException e) {
        System.out.println("Could not retrieve database metadata "
                + e.getMessage());
                errorMassage = e.getMessage();
        e.printStackTrace();
    } catch (IllegalAccessException e) {
        errorMassage = e.getMessage();
        e.printStackTrace();
    } catch (InstantiationException e) {
        errorMassage = e.getMessage();
        e.printStackTrace();
    }
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900