Pages

Wednesday, September 28, 2016

Add Marker to Google Map Google Maps Android API v2


To add marker to Google Map of Google Maps Android API v2:
 LatLng targetLatLng = new LatLng(lat, lon);
MarkerOptions markerOptions =
new MarkerOptions().position(targetLatLng).title(strTitle);
mMap.addMarker(markerOptions);

Modify from last example "Set map type for Google Maps Activity using Google Maps Android API v2" to add feature to add markers on Google Maps Activity.



Edit values/strings.xml to add string resource of "menu_addmarkers"
<resources>
<string name="app_name">AndroidStudioMapApp</string>
<string name="title_activity_maps">Map</string>
<string name="menu_legalnotices">Legal Notices</string>
<string name="menu_about">About</string>
<string name="menu_addmarkers">Add Markers</string>
</resources>


Edit menu/activity_main.xml, to add menu option of Add Markers:
<?xml version="1.0" encoding="utf-8"?>
<menu
>
<item
android_id="@+id/menu_about"
android_orderInCategory="100"
app_showAsAction="ifRoom"
android_title="@string/menu_about"/>
<item
android_id="@+id/menu_addmarkers"
android_orderInCategory="100"
app_showAsAction="ifRoom"
android_title="@string/menu_addmarkers"/>
<item
android_id="@+id/maptype"
android_orderInCategory="100"
app_showAsAction="never"
android_title="Map Type...">
<menu >
<group android_id="@+id/groupmaptype"
android_checkableBehavior="single">
<item android_id="@+id/maptypeNORMAL"
android_title="NORMAL" />
<item android_id="@+id/maptypeSATELLITE"
android_title="SATELLITE" />
<item android_id="@+id/maptypeTERRAIN"
android_title="TERRAIN" />
<item android_id="@+id/maptypeHYBRID"
android_title="HYBRID" />
<item android_id="@+id/maptypeNONE"
android_title="NONE" />

</group>
</menu>

</item>
<item
android_id="@+id/menu_legalnotices"
android_orderInCategory="100"
app_showAsAction="never"
android_title="@string/menu_legalnotices"/>


</menu>

Modify MapsActivity.java
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 {

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;
}

@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();
}
}
}


download filesDownload the files (Android Studio Format) .

Next:
- initialize map in xml


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

Read More..

Haydenshapes helps surfers catch the perfect wave with Google Apps



Editors note: Today’s guest blogger is Hayden Cox, founder and owner of Haydenshapes Surfboards and creator of FutureFlex technology. The Haydenshapes team uses Google Apps for Work to stay in touch and get more done across oceans and time zones.

When I was 15 years old, I snapped my favourite board while surfing on Sydney’s northern beaches. I didn’t have the money to replace it, so I built one instead. I spent my next school vacation volunteering at a local factory, where I learned the basics of shaping and making surfboards. That’s how I first developed a passion for creating and design. After school and on weekends, I’d shape boards for friends and teachers, who eventually became repeat customers and recommended me to their friends. It occurred to me that I should formalise what I was doing, so I created a logo and started branding my boards. I also taught myself how to code my first website. That’s how Haydenshapes Surfboards got started.

Fast-forward 18 years, and Haydenshapes has come a long way. We have our own signature surfboard technology, FutureFlex, which I patented and designed. We sell surfboards in 70 countries around the world, from India and Israel to Sri Lanka and Sweden — even in places that I didn’t realise had surf. Our Hypto Krypto model is the best-selling surfboard worldwide and was named “Surfboard of the Year” at the 2014 and 2015 Australian Surf Industry Awards.

As we’ve grown, I’ve learned some fundamental realities of running a business. Mistakes are inevitable, so it’s crucial to keep your finger on the pulse 24/7. Also, it’s important to keep things simple so you can work smarter rather than harder. Google Apps for Work helps us do that. It provides the full framework we need to run our business and connect our teams and manufacturing centers in Sydney, Los Angeles and Thailand. It’s reliable, secure and easy to use — and it just works.

I’m constantly on the go, whether I’m racing off of a plane, jumping out from the surf, in the shaping bay, or between meetings. Being able to tap into our Google Apps system from my device means I’m always aware of what’s going on. I can share design files with Drive to our CNC machines, draft budgets with Google Sheets, and use Hangouts for meetings and video calls with my team and family.

Haydenshapes is known for being innovative and progressive. Our products and our process — how we do things from start to finish — reflect this. In my opinion, your success hinges on how you spend your time. The last thing we want to do is worry about servers failing or files getting backed up properly. Working with a seamless system like Google Apps means that I can focus on what really drives the business: designing and creating the best surfboards.
Read More..

Tuesday, September 27, 2016

HTC One M9 in all flavours! Gallery

If you didnt have a chance yet to see the official, high quality images of the newest HTC flagship - HTC One M9 heres the full gallery. Enjoy!

...and tell us, whats your favourite colour? :)








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..

Sunday, September 25, 2016

Mobile Andrio Full apk


Mobile Andrio Full Apk
Requirements: Android 1.6+

Mobile Andrio Full Overview: A jump & run game in the style of Super Mario, Giana Sisters and similar games.
A jump-and-run game in the style of Super Mario, Giana Sisters and similar games. It has 16 levels of increasing difficulty.
Highscores get uploaded to the social gaming network Scoreloop, and you can compare your highscore with those of players all around the world. Furthermore you can start challenge games against other players to determine the better player in a 1:1 situation.
The game can be controlled using keyboard (preferred), touchscreen, orientation sensor or trackball. Use Edit Settings to customize.
Full version, free of ads. Permissions required for Scoreloop features.
For more information, please check the apps website.

Whats in Mobile Andrio Full :
  • improved the placement of the on-screen controls
  • bug fixes
Mobile Andrio Full  screenshot:
Mobile Andrio Full 2.8.3 (Android) 
 
DOWNLOAD
Read More..

Saturday, September 24, 2016

eBoostr 4 5 Full Cracked Alternate RAM for PC Download Direct!!

eBoostr 4.5 Full Cracked. Alternate RAM for PC Download Direct!!



eBoostr adalah salah satu software unik yang mampu mengubah media penyimpanan data luar seperti flashdisk dan memory card menjadi perangkat RAM. eBoostr tidak dapat menggunakan harddisk sebagai penyedia RAM, hanya 'removable disk' saja. Untuk melihat cara mengubah harddisk menjadi RAM, simak baik-baik artikel ini:
Ubah Flashdisk, HARD DISK/HARD DRIVE, Memory card jadi RAM Komputer
Read More..

Friday, September 23, 2016

The Total Economic Impact™ of Google Apps for Work



Editors note: Its easy to see how real-time collaboration eliminates frustration from your day or how mobile access from anywhere helps keep your projects moving forward even when youre on the go, but it takes a bit of number crunching to understand the impact across an entire company. To help make this easier, we commissioned Forrester Consulting to quantify the benefits a typical Google Apps for Work customer enjoys.

Companies across the globe face increasing pressure to stay competitive and meet their customers’ needs. Tools that allow teams to share ideas instantly, attend meetings remotely, collaborate from anywhere in real time and work on the go are helping companies innovate and engage customers in this new competitive landscape. These types of outcomes are possible only by “pure” cloud-based architectures that overcome the inefficiencies of legacy desktop- centric computing.

While it’s easy to understand how collaboration and mobility impact our day-to-day work, it’s more difficult for organizations to quantify these benefits in monetary terms.

So Google commissioned Forrester Consulting to conduct a Total Economic Impact (TEI) study examining the value that Google customers achieve by implementing Google Apps for Work. Forrester measured the total economic impact over three years for organizations moving from legacy on-premise infrastructure to Google’s web-based solution. To quantify the complete value of Google Apps for Work, including collaboration and productivity benefits, they interviewed six of our current customers. They then aggregated each piece of customer feedback to create a representative composite organization on which to base the development of a Total Economic Impact model.

The composite organization is a global B2B multinational services company with 10,000 employees using Google Apps for Work and $4 billion in annual revenue. The analysis they completed showed that this composite organization would realize millions in collaboration and mobility efficiencies in the course of three years.

Here are a few highlights from the report:

  • 304% return on investment (ROI)                                                                                                       Over three years, Google Apps for Work generated a risk-adjusted $17.1 million in benefits, outweighing the total costs of $4.2 million and resulting in a risk-adjusted ROI of 304%.

  • $8 million in collaboration efficiencies:                                                                                        Employees can streamline business processes by working together in real -time using Google Docs, Sheets, and Slides, creating project collaboration spaces in Google Sites, and accessing and sharing files with Google Drive. These collaboration efficiencies save employees up to two hours per week — which, over three years, adds up to more than $8 million in savings.

  • $9 million in mobility benefits and legacy IT cost savings                                                            Google Apps for Work creates an environment where employees can work together, share ideas, innovate, evaluate decisions and improve business performance — all without having to be in a physical office. The ability to work from anywhere and join meetings remotely saves the composite organization more than $5 million in 3 years, while decommissioning legacy servers, software and phone systems saves another $4 million. And $9 million can go a long way.

Though these findings are the result of in-depth analysis, we strongly encourage any Google Apps customer to conduct their own impact analysis to see what specific benefits they experience from using Google Apps for Work. You can read the full study, “The Total Economic Impact of Google Apps for Work,” by visiting g.co/AppsEconomicImpact.

Read More..

Know the news from Google Android


Google just announced:
  • New Nexus phone running Marshmallow: Nexus 6P and 5X
  • The first Android tablet built by Google, Pixel C, and the Chromebook Pixel
  • The new Chromecast and Chromecast Audio
  • Google Play Music and Google Photos

Google Press Event 9/29/15

Check Official Google Blog

Read More..