Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB8.0 Android
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 8-Oct-12 2:13am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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 Smile | :)
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

Class.forName(driver).newInstance();
 
NOT FOUND EXCEPTION
 

HOW YOU ADDED ARE YOU SURE THIS WORK
THANKS FOR ANY HELP
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

try below code :include jtds lib in android project.
 
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();
    }
  Permalink  
v2

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



Advertise | Privacy | Mobile
Web01 | 2.8.141022.2 | Last Updated 22 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100