android RegEx external GPS string

I have a problem with seperating information in a string i get from the external GPS stream.

Heres a example of a string:


Want i am trying to do is to get the " $GPGLL,5703.85365,N,00953.88360,E,075510.00,A,A*69 " out so i can grab the longtitude and latitude and then update my textview with it. But keep getting string out of bounch exeption and i start wondering if i am handling this in the wrong way.

Anyone that can put me in the right direction in how to solve this?


Here's an approach to handling NMEA sentences directly from the GPS:

    // Listener for NMEA sentences
public void  onNmeaReceived(long timestamp, String nmea) {
            // Split the sentence into its comma-separated pieces
    String [] sentence = nmea.split(",");
            // See if it's the sentence we're interested in
    if(sentence[0].equalsIgnoreCase("$GPGLL")) {
    /* In here, process the data components of the sentence, which will
               be in sentence[1], sentence[2], etc. */

Need Your Help

How can I change the colors in a ggplot2 density plot?

r plot ggplot2

Summary: I want to choose the colors for a ggplot2() density distribution plot without losing the automatically generated legend.

Persist Sockets over page refresh and page changes

javascript node.js websocket

I have my NodeJS and Socket.IO server running perfectly, however I notice that a socket disconnect and reconnect occurs every time I refresh the browswer page or navigate to a different page.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.