Created
April 22, 2016 02:58
-
-
Save oilking143/4b0079aff33ef50b4d7f58eea976b91e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class utility { | |
private contentToFragment content; | |
public void parseData(String data,final Activity act) | |
{ | |
String[] parsedData=new String[5]; | |
if (data.length() > 15) | |
{ | |
parsedData[0] = data.substring(10, 18); | |
parsedData[1] = data.substring(26, 30); | |
parsedData[2] = data.substring(22, 26); | |
parsedData[3] = data.substring(18, 22); | |
parsedData[4] = data.substring(8, 10); | |
switch (Integer.parseInt(parsedData[4])) { | |
case 0: | |
content.callOut(parsedData[0]); | |
break; | |
case 1: | |
content.callOut(parsedData[1]); | |
case 2: | |
content.callOut(parsedData[2]); | |
case 3: | |
content.callOut(parsedData[3]); | |
break; | |
} | |
} | |
} | |
public void setcalloutListener(contentToFragment _content) | |
{ | |
_content=content; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment