Created
April 28, 2015 00:36
-
-
Save kuc-arc-f/c802e22dd80a23f18c55 to your computer and use it in GitHub Desktop.
agri-blog2-1b-java
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
private void init_proc(){ | |
try | |
{ | |
final ParseQuery<ParseObject> query = ParseQuery.getQuery("SenObject1"); | |
query.orderByDescending("dtnum"); | |
query.setLimit( 1 ); | |
query.findInBackground(new FindCallback<ParseObject>() { | |
public void done(List<ParseObject> senList, ParseException e) { | |
if (e == null) { | |
ArrayList lst = new ArrayList<ItemSensor>(); | |
Log.d("score", "Retrieved : " + senList.size() + " scores"); | |
if(senList.size() > 0){ | |
ParseObject item = senList.get(0); | |
ItemSensor itm1= new ItemSensor(); | |
int iSnum1 = item.getInt("snum1"); | |
itm1.setSnum1( String.valueOf(iSnum1) ); | |
lst.add(itm1); | |
ItemSensor itm2= new ItemSensor(); | |
int iSnum2 = item.getInt("snum2"); | |
itm2.setSnum1( String.valueOf(iSnum2) ); | |
lst.add(itm2); | |
ItemSensor itm3= new ItemSensor(); | |
int iSnum3 = item.getInt("snum3"); | |
itm3.setSnum1( String.valueOf(iSnum3) ); | |
lst.add(itm3); | |
ItemSensor itm4= new ItemSensor(); | |
int iSnum4 = item.getInt("snum4"); | |
itm4.setSnum1( String.valueOf(iSnum4) ); | |
lst.add(itm4); | |
Long iDnum = item.getLong("dtnum"); | |
String s2 =String.valueOf(iSnum1)+ ":" + String.valueOf(iSnum2) + ":"+ String.valueOf(iSnum3) +":" + String.valueOf(iSnum4); | |
Log.d(TAG, "s=" + s2 + ":dt="+ String.valueOf(iDnum) ); | |
String sDate = get_dateString(String.valueOf(iDnum)); | |
try | |
{ | |
disp_proc(lst); | |
}catch(Exception ex){ | |
ex.printStackTrace(); | |
} | |
mLblText_01.setText( sDate ); | |
} | |
} else { | |
Log.d("score", "Error: " + e.getMessage()); | |
} | |
} | |
}); | |
}catch(Exception e){ | |
e.printStackTrace(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment