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
//First you need to activate the Google+ API in Google Cloud Console and create a Project. Submit your SHA1 fingerprint ,package name in the newly formed ClientID . Remember - need to create a public key as well. | |
import java.io.Console; | |
import java.io.InputStream; | |
import org.json.JSONException; | |
import org.json.JSONObject; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.content.IntentSender.SendIntentException; | |
import android.graphics.Bitmap; |
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
To check the ssh key already in the system : ls -al ~/.ssh | |
To generate the new SSH key : ssh-keygen -t rsa -C "your_email@example.com" | |
Press enter , enter for the all the prompt. | |
Check connectivity with github : ssh -T git@github.com |
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
$ curl ifconfig.me | |
(ip address) |
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
LatLng HAMBURG = new LatLng(53.558, 9.927); | |
LatLng KIEL = new LatLng(53.551, 9.993); | |
GoogleMap map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap(); | |
if (map !=null){ | |
Log.d("FUApp", "Map isnt null"); | |
Marker hamburg = map.addMarker(new MarkerOptions().position(HAMBURG).title("Hamburg")); | |
Marker kiel = map.addMarker(new MarkerOptions() | |
.position(KIEL) | |
.title("Kiel") |
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
CameraPosition cameraPosition = new CameraPosition.Builder().target(latlng).zoom(14.0f).build(); | |
CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(cameraPosition); | |
map.moveCamera(cameraUpdate); |
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
Do this in your onCreate() method. | |
//Remove title bar | |
this.requestWindowFeature(Window.FEATURE_NO_TITLE); | |
//Remove notification bar | |
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); | |
//set content view AFTER ABOVE sequence (to avoid crash) | |
this.setContentView(R.layout.your_layout_name_here); |
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
{ | |
"friendslist": [ | |
{ | |
"CurrentLatitude": 31.633437, | |
"CurrentLongitude": 74.28658, | |
"FriendId": 190471, | |
"FriendType": 2, | |
"FriendsUserName": "ShahFaisal", | |
"ImgUrl": "https://graph.facebook.com/1813311879/picture?width=200&height=200", | |
"IsFavorite": false, |
OlderNewer