This file contains hidden or 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 boolean isOnline() { | |
ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); | |
NetworkInfo netInfo = cm.getActiveNetworkInfo(); | |
if (netInfo != null && netInfo.isConnectedOrConnecting()) { | |
return true; | |
} | |
Toast .makeText ( this, "Please, check your network connection" , Toast.LENGTH_LONG ).show(); | |
return false; | |
} |
This file contains hidden or 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
URL img_value = null; | |
try { | |
/* Public image url */ | |
img_value = new URL( "http://graph.facebook.com/" + id + "/picture?type=large" ); | |
/* For caching purposes we need to get an unique url, not the public */ | |
URL img_value_new = new URL("http://graph.facebook.com/" + id + "/picture?type=large&redirect=false" ); | |
/* Open the above url and get the final image profile URL */ |
This file contains hidden or 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
// Add to the application descriptor file | |
MIDlet-Touch-Support: true | |
Navi-Key-Hidden: true | |
//For Nokia devices | |
Nokia-MIDlet-On-Screen-Keypad: no |
This file contains hidden or 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
@users = User.find(:all, :joins => :books, :conditions => {:books => {:title => 'Peter Pan'}}) |