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
Intent sendIntent = new Intent(); | |
sendIntent.setAction(Intent.ACTION_SEND); | |
sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send."); | |
sendIntent.setType("text/plain"); | |
startActivity(Intent.createChooser(sendIntent, getResources().getText(R.string.send_to))); |
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
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
// Add code to print out the key hash | |
try { | |
PackageInfo info = getPackageManager().getPackageInfo( | |
"com.facebook.samples.hellofacebook", | |
PackageManager.GET_SIGNATURES); | |
for (Signature signature : info.signatures) { |
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 class MainActivity extends Activity implements GooglePlayServicesClient.ConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener, LocationListener { | |
private LocationRequest mLocationRequest; | |
private LocationClient mLocationClient; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
mLocationRequest = LocationRequest.create(); |
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 class MainActivity extends Activity implements LocationListener, GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener { | |
private LocationRequest mLocationRequest; | |
private GoogleApiClient mGoogleApiClient; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
mLocationRequest = LocationRequest.create(); |
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
class Document { | |
String html; | |
public Document(String url){ | |
HtmlClient client = new HtmlClient(); | |
html = client.get(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
class Document { | |
String html; | |
public Document(HtmlClient client, String url) { | |
html = client.get(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
class Document { | |
String html; | |
public Document(String html) { | |
this.html = html; | |
} | |
} |
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
//Client 1 | |
Document document = new Document("http://sanastasov.com"); | |
//Client 3 | |
HtmlClient client = new HtmlClient(); | |
String html = client.get("http://sanastasov.com"); | |
Document document = Document(html); |
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 class MyClass { | |
@Inject | |
public MyClass() { | |
} | |
} |
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 class MyAwesomeClass { | |
private final MyClass myClass; | |
@Inject | |
public MyAwesomeClass(MyClass myClass) { | |
this.myClass = myClass; | |
} | |
} |
OlderNewer