Pages

Thursday, October 27, 2016

Promises in the Google APIs JavaScript Client Library

The JavaScript Client Library for Google APIs is now Promises/A+-conformant. Requests made using gapi.client.request, gapi.client.newBatch, and from generated API methods like gapi.client.plus.people.search are also promises. You can pass in response and error handlers through their then methods.

Requests can be made using the then syntax provided by Promises:
gapi.client.load(‘plus’, ‘v1’).then(function () { 
gapi.client.plus.people.search({query: ‘John’}).then(function(res) {
console.log(res.result.items);
}, function(err) {
console.error(err.result);
});
})
All fulfilled responses and rejected application errors passed to the handlers will have these fields:
{
result: *, // JSON-parsed body or boolean false if not JSON-parseable
body: string,
headers: (Object.),
status: (?number),
statusText: (?string)
}
The promises can also be chained, making your code more readable:
gapi.client.youtube.playlistItems.list({
playlistId: PLOU2XLYxmsIIwGK7v7jg3gQvIAWJzdat_,
part: snippet
}).then(function(res) {
return res.result.items.map(function(item) {
return item.snippet.resourceId.videoId;
});
}).then(function(videoIds) {
return gapi.client.youtube.videos.list({
id: videoIds.join(,),
part: snippet,contentDetails
});
}).then(function(res) {
res.result.items.forEach(function(item) {
console.log(item);
});
}, function(err) {
console.error(error.result);
});
Using promises makes it easy to handle results of API requests and offer elegant error propagation.

To learn more about promises in the library and about converting from callbacks to promises, visit Using Promises and check out our latest API reference.

Posted by Jane Park, Software Engineer
Read More..

Tuesday, October 25, 2016

Call Of Duty Strike Team Hack Cheat Tool No Survey No Password for Android iOs Iphone


???????? ?? ??????? call of duty strike team hack
Call Of Duty Strike Team Hack 

Welcome! Get Call Of Duty Strike Team Hack. With this extension you can get unlimited Tokens and unlimited ammo in your game! Download tool right now and enjoy game without any limits! All what you have to do is in the instruction below. Modern design and user friendly interface will help you to use Call of Duty Strike Team cheats very fast and intuitively. Addition has special guard protection script, which protects you all the time. We keep our cheats working for ever with daily updates. Call of Duty Strike Team Cheat works on all iOS and Android devices and root or jailbreak are not required.
With problems please visit our contact section and mail us! We will help you or fix bugs as soon as possible.
Experience an immersive single-player campaign full of epic, cinematic moments in diverse locations around the world or put your skills to the test as you fight off waves of increasingly difficult enemies. Compete against family, friends and the Call of Duty Strike Team community for leaderboard domination.
Let’s get Call Of Duty Strike Team cheat exactly right now! This particular extension generates for you unlimited amount of tokens and gives you unlimited ammo. Don’t worry about limits in Call of Duty Strike Team and play like pro with TopProgramer extensions! Download Call of Duty Strike Team hack now! You find links and details below.
 Download

Call of Duy Strike Team Hack Features

– Unlimited Tokens
– Unlimited ammo
– Security – Guard Protection Script
– Works for all iOS and Android devices
– Root or jailbreak NOT required
– Fast device connection
– User friendly interface and modern design
– Daily updates
– Quick help
Read More..

HTC One variants update

Image taken from smart.com.ph


In my article here I was writing about HTC One GSM/LTE (UL) and GSM (U) versions. The question if ROM based on UL firmware can be flashed on U device is still valid, but now we have some more details about these variants.
It turns out, that UL version of HTC One (having both GSM & LTE radio) will be available mostly in the Europe and North America. Model ID (MID) of this version is PN0710000.

U version (GSM radio only) is going mostly to Asian markets. Model ID (MID) of this version is PN0711000. There is also WL variant, which will be the Sprint version of HTC One. I dont know MID number of this version yet.

In the past we had similar situation with slightly different MIDs numbers of the same device. HTC Sensation had PG5813000 and Sensation XE had PG5813001. Both devices can use the same custom ROMs. HTC Desire HD has PD9810000, while Telus variant had PD9814000 and HTC Inspire 4G (U.S. version of HTC Desire HD) had PD9812000. Again, one custom ROM can be flashed on all 3 devices.
There are also some more details that leads to the conclusion, that most probably users with HTC One variant will be able to use their device with no issues after flashing custom ROM based on UL RUU. This is surely a very good news for both users and custom ROM developers. However, this will probably not enable LTE modem on U devices. So if you want to use LTE and your carrier supports this technology, make sure you will buy HTC One UL.

Have any questions or comments? Feel free to share! Also, if you like this article, please use media sharing buttons (Twitter, G+, Facebook) down this post!



Read More..

Monday, October 24, 2016

Adobe Photoshop CS2 Free Download Full Version

CARA INSTALASI
1. download dan extract Adobe Photoshop 9.0 CS2 part1 dan part 2

2. buka folder, lalu buka file Setup

3. klik next, accept

4. pilih "i have a serial number, install full version" ketikkan pada kolom dibawahnya 1045-1086-6140-3441-3485-1389

5. klik next, next lagi, lalu click install

6. setelah install selesai, sebuah jendela akan muncul. pilih Activation Option, pilih "By Telephone via the automated software activation system"

7. klik next

8. buka Adobe.Photoshop.CS2.Patch.Tryout.to.Full. lalu buka software OS-Adobe_CS2_KeyGen_Tryout_to_Full

9. Pilih activation, pilih yang Photoshop cs2 9.0. anda akan dimintai request code.

10 . kembali buka adobe photoshop activation tadi. masukkan nomor yang tertulis di Activation Number ke OS-Adobe_CS2_KeyGen_Tryout_to_Full request code tadi

11. Kik generate di OS-Adobe_CS2_KeyGen_Tryout_to_Full tadi, akan muncul answer code. masukkan answer code kedalam adobe photoshop activation tadi. lalu klick activate. lalu next.klik finish
selesai

Read More..

Sunday, October 23, 2016

HTC One A9 officially presented

No more leaks and no more speculations. The newest HTC Android device - HTC One A9 was officially presented today, at the HTC #BeBrilliant Launch event. Although its hard to predict the future of the One A9 by looking only at the hardware specification, the device itself is described by many as controversial due to middle-end Snapdragon 617 SoC and iPhonish design. Is it justified? Id say - NO.

First of all Im still using "old" HTC One M8 as my daily device. Ive never had One M9 and being honest I never "really badly wanted" to have one. In my opinion M9 has a great hardware but the design is a step back to the M7 days. With the M8 it was different. I literally felt in love in that piece of metal uni-body art ever since I touched it for the first time. This love continues, even tho my M8 looks like after one year of a high mountains climbing trip. Surprisingly, even the "C" letter detached from the back and lost somewhere. So its just "H" & "T" now. But I still love it.

With the One A9 I feel like I could possibly use it as my next Android device. Even if the hardware may seems worse than One M9 is equipped with, my general opinion in that matter is simple: if you cant see a real performance difference in a real life operations between two devices, go for the one with a better design.
In my opinion Snapdragon 617 SoC is more than enough to satisfy 99% of customers. Its enough to handle newest games and it should generate much less heat than infamous Snapdragon 810. That means it will also throttle less. With AMOLED display it should find new fans among Samsung users too.
"The Qualcomm® Snapdragon™ 617 processor with X8 LTE combines a fast and powerful octa-core CPU with integrated Snapdragon X8 LTE, full 1080p support, and dual-ISPs, designed to deliver the next high-end experiences." - link to Snapdragon 617 specs page.
The overall hardware specification doesnt look bad on the paper and I cant wait to see how One A9 behaves in real.

About the "almost iPhone design" argument - yes, its true that it does look like an iPhone. Yes, its true that HTC was first with such design. The question is - does it really matter? HTC One M9 design was unique and awful (sorry to say that). HTC One A9 design is not as unique, but it just looks good. It doesnt bring any innovation, but Im sure it will find more supporters rather than the M9 design.

Unlike many of my friends Im pleased with what HTC presented today. As a HTC One M8 owner the One A9 sounds like a nice upgrade option to me, the first good looking phone after the One M8.

You can find more details about the HTC One A9 on the official page - HTC One A9.


Do you have any questions or comments? Feel free to share! Also, if you like this article, please use media sharing buttons (Twitter, G+, Facebook) below this post!


For latest news follow Android Revolution HD on popular social platforms:

Read More..

Docker and Containers Coffee With A Googler meets Brian Dorsey

Posted by Laurence Moroney, Developer Advocate

If you’ve worked with Web or cloud tech over the last 18 months, you’ll have heard about Containers and about how they let you spend more time on building software, instead of managing infrastructure. In this episode of Coffee with a Googler, we chat with Brian Dorsey into the benefits of using Containers in Google Cloud Platform for simplifying infrastructure management.

Important discussion topics covered in this episode include:

  • Containers improve the developer experience. Regardless of how large the final deployment is, they are there to make it easier for you to succeed.
  • Kubernetes -- an open source project to allow you to manage containers and fleets of containers.

Brian shares an example from Julia Ferraioli who used Containers (with Docker) to configure a Minecraft server, with many plugins, and Kubernetes to manage it.

You can learn more about Google Cloud platform, including Docker and Kubernetes at the Google Cloud Platform site.

Read More..

Friday, October 21, 2016

Detect touch on GoogleMap onMapClick and onMapLongClick


To detect touch on GoogleMap, modify MapsActivity.java from last example "Google Maps Android API v2 - initialize map in xml".

Edit MapsActivity to implements GoogleMap.OnMapClickListener, GoogleMap.OnMapLongClickListener.

Implement your listeners, onMapClick() and onMapLongClick().

Assign the listeners to your GoogleMap by calling:
mMap.setOnMapClickListener(this);
mMap.setOnMapLongClickListener(this);


package com.blogspot.android_er.androidstudiomapapp;

import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.InputType;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.Toast;

import com.google.android.gms.common.GoogleApiAvailability;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;

public class MapsActivity extends AppCompatActivity implements OnMapReadyCallback,
GoogleMap.OnMapClickListener, GoogleMap.OnMapLongClickListener {

private GoogleMap mMap;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);

}

/**
* Manipulates the map once available.
* This callback is triggered when the map is ready to be used.
* This is where we can add markers or lines, add listeners or move the camera. In this case,
* we just add a marker near Sydney, Australia.
* If Google Play services is not installed on the device, the user will be prompted to install
* it inside the SupportMapFragment. This method will only be triggered once the user has
* installed Google Play services and returned to the app.
*/
@Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
mMap.setOnMapClickListener(this);
mMap.setOnMapLongClickListener(this);
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
return super.onCreateOptionsMenu(menu);
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_addmarkers:
addMarker();
return true;
case R.id.maptypeHYBRID:
if(mMap != null){
mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
return true;
}
case R.id.maptypeNONE:
if(mMap != null){
mMap.setMapType(GoogleMap.MAP_TYPE_NONE);
return true;
}
case R.id.maptypeNORMAL:
if(mMap != null){
mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
return true;
}
case R.id.maptypeSATELLITE:
if(mMap != null){
mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
return true;
}
case R.id.maptypeTERRAIN:
if(mMap != null){
mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);
return true;
}
case R.id.menu_legalnotices:
String LicenseInfo = GoogleApiAvailability
.getInstance()
.getOpenSourceSoftwareLicenseInfo(MapsActivity.this);
AlertDialog.Builder LicenseDialog =
new AlertDialog.Builder(MapsActivity.this);
LicenseDialog.setTitle("Legal Notices");
LicenseDialog.setMessage(LicenseInfo);
LicenseDialog.show();
return true;
case R.id.menu_about:
AlertDialog.Builder aboutDialogBuilder =
new AlertDialog.Builder(MapsActivity.this);
aboutDialogBuilder.setTitle("About Me")
.setMessage("http://android-er.blogspot.com");

aboutDialogBuilder.setPositiveButton("visit",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
String url = "http://android-er.blogspot.com";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
}
});

aboutDialogBuilder.setNegativeButton("Dismiss",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.cancel();
}
});

AlertDialog aboutDialog = aboutDialogBuilder.create();
aboutDialog.show();

return true;
}
return super.onOptionsItemSelected(item);
}

private void addMarker(){
if(mMap != null){

//create custom LinearLayout programmatically
LinearLayout layout = new LinearLayout(MapsActivity.this);
layout.setLayoutParams(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT));
layout.setOrientation(LinearLayout.VERTICAL);

final EditText titleField = new EditText(MapsActivity.this);
titleField.setHint("Title");

final EditText latField = new EditText(MapsActivity.this);
latField.setHint("Latitude");
latField.setInputType(InputType.TYPE_CLASS_NUMBER
| InputType.TYPE_NUMBER_FLAG_DECIMAL
| InputType.TYPE_NUMBER_FLAG_SIGNED);

final EditText lonField = new EditText(MapsActivity.this);
lonField.setHint("Longitude");
lonField.setInputType(InputType.TYPE_CLASS_NUMBER
| InputType.TYPE_NUMBER_FLAG_DECIMAL
| InputType.TYPE_NUMBER_FLAG_SIGNED);

layout.addView(titleField);
layout.addView(latField);
layout.addView(lonField);

AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Add Marker");
builder.setView(layout);
AlertDialog alertDialog = builder.create();

builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
boolean parsable = true;
Double lat = null, lon = null;

String strLat = latField.getText().toString();
String strLon = lonField.getText().toString();
String strTitle = titleField.getText().toString();

try{
lat = Double.parseDouble(strLat);
}catch (NumberFormatException ex){
parsable = false;
Toast.makeText(MapsActivity.this,
"Latitude does not contain a parsable double",
Toast.LENGTH_LONG).show();
}

try{
lon = Double.parseDouble(strLon);
}catch (NumberFormatException ex){
parsable = false;
Toast.makeText(MapsActivity.this,
"Longitude does not contain a parsable double",
Toast.LENGTH_LONG).show();
}

if(parsable){

LatLng targetLatLng = new LatLng(lat, lon);
MarkerOptions markerOptions =
new MarkerOptions().position(targetLatLng).title(strTitle);

mMap.addMarker(markerOptions);
mMap.moveCamera(CameraUpdateFactory.newLatLng(targetLatLng));

}
}
});
builder.setNegativeButton("Cancel", null);

builder.show();
}else{
Toast.makeText(MapsActivity.this, "Map not ready", Toast.LENGTH_LONG).show();
}
}

@Override
public void onMapClick(LatLng latLng) {
Toast.makeText(MapsActivity.this,
"onMapClick: " + latLng.latitude + " : " + latLng.longitude,
Toast.LENGTH_LONG).show();
}


@Override
public void onMapLongClick(LatLng latLng) {
Toast.makeText(MapsActivity.this,
"onMapLongClick: " + latLng.latitude + " : " + latLng.longitude,
Toast.LENGTH_LONG).show();

//Add marker on LongClick position
MarkerOptions markerOptions =
new MarkerOptions().position(latLng).title(latLng.toString());
mMap.addMarker(markerOptions);
}

}


Next: Make GoogleMaps marker draggabe and detect moving marker

~ Step-by-step of Android Google Maps Activity using Google Maps Android API v2, on Android Studio

Read More..