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 servicesOK() { | |
| int isAvailable = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this); | |
| if (isAvailable == ConnectionResult.SUCCESS) { | |
| return true; | |
| } | |
| else if (GooglePlayServicesUtil.isUserRecoverableError(isAvailable)) { | |
| Dialog dialog = GooglePlayServicesUtil.getErrorDialog(isAvailable, this, GPS_ERRORDIALOG_REQUEST); | |
| dialog.show(); | |
| } |
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
| <permission | |
| android:name="com.example.gmapsapp.permission.MAPS_RECEIVE" | |
| android:protectionLevel="signature"/> | |
| <uses-permission android:name="com.example.gmapsapp.permission.MAPS_RECEIVE"/> | |
| <uses-permission android:name="android.permission.INTERNET"/> | |
| <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> |
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
| package com.hanselandpetal.catalog; | |
| import org.apache.http.HttpResponse; | |
| import org.apache.http.client.methods.HttpGet; | |
| import org.apache.http.util.EntityUtils; | |
| import android.net.http.AndroidHttpClient; | |
| public class HttpManager { |
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
| textView.setMovementMethod(new ScrollingMovementMethod()); |
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
| protected boolean isOnline() | |
| { | |
| ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); | |
| NetworkInfo netInfo = cm.getActiveNetworkInfo(); | |
| if (netInfo != null && netInfo.isConnectedOrConnecting()) | |
| { | |
| return true; | |
| } else | |
| { | |
| 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
| keytool -list -alias xxx -keystore "path to debug.keystore"-storepass android -keypass android | |
| /* LocationManager location = (LocationManager)this.getSystemService(Context.LOCATION_SERVICE); */ |
NewerOlder