Pages

Thursday, October 13, 2016

Detect user click on InfoWindow by implementing GoogleMap OnInfoWindowClickListener


To detect user tap on Google Maps InfoWindow, implement your GoogleMap.OnInfoWindowClickListener() and call GoogleMap.setOnInfoWindowClickListener(OnInfoWindowClickListener).


Modify from last example "Custom InfoWindow for Google Maps Android API v2":

MapsActivity.java
package com.blogspot.android_er.androidstudiomapapp;

import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.drawable.Drawable;
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.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
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.Marker;
import com.google.android.gms.maps.model.MarkerOptions;

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

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);
mMap.setOnMarkerDragListener(this);
mMap.setInfoWindowAdapter(this);
mMap.setOnInfoWindowClickListener(MyOnInfoWindowClickListener);
}

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

markerOptions.draggable(true);

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());
markerOptions.draggable(true);

mMap.addMarker(markerOptions);
}


@Override
public void onMarkerDragStart(Marker marker) {
marker.setTitle(marker.getPosition().toString());
marker.showInfoWindow();
marker.setAlpha(0.5f);
}

@Override
public void onMarkerDrag(Marker marker) {
marker.setTitle(marker.getPosition().toString());
marker.showInfoWindow();
marker.setAlpha(0.5f);
}

@Override
public void onMarkerDragEnd(Marker marker) {
marker.setTitle(marker.getPosition().toString());
marker.showInfoWindow();
marker.setAlpha(1.0f);
}

@Override
public View getInfoWindow(Marker marker) {
return null;
//return prepareInfoView(marker);
}

@Override
public View getInfoContents(Marker marker) {
//return null;
return prepareInfoView(marker);

}

private View prepareInfoView(Marker marker){
//prepare InfoView programmatically
LinearLayout infoView = new LinearLayout(MapsActivity.this);
LinearLayout.LayoutParams infoViewParams = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
infoView.setOrientation(LinearLayout.HORIZONTAL);
infoView.setLayoutParams(infoViewParams);

ImageView infoImageView = new ImageView(MapsActivity.this);
//Drawable drawable = getResources().getDrawable(R.mipmap.ic_launcher);
Drawable drawable = getResources().getDrawable(android.R.drawable.ic_dialog_map);
infoImageView.setImageDrawable(drawable);
infoView.addView(infoImageView);

LinearLayout subInfoView = new LinearLayout(MapsActivity.this);
LinearLayout.LayoutParams subInfoViewParams = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
subInfoView.setOrientation(LinearLayout.VERTICAL);
subInfoView.setLayoutParams(subInfoViewParams);

TextView subInfoLat = new TextView(MapsActivity.this);
subInfoLat.setText("Lat: " + marker.getPosition().latitude);
TextView subInfoLnt = new TextView(MapsActivity.this);
subInfoLnt.setText("Lnt: " + marker.getPosition().longitude);
subInfoView.addView(subInfoLat);
subInfoView.addView(subInfoLnt);
infoView.addView(subInfoView);

return infoView;
}

GoogleMap.OnInfoWindowClickListener MyOnInfoWindowClickListener
= new GoogleMap.OnInfoWindowClickListener(){
@Override
public void onInfoWindowClick(Marker marker) {
Toast.makeText(MapsActivity.this,
"onInfoWindowClick(): " +
marker.getPosition().latitude + " " +
marker.getPosition().longitude,
Toast.LENGTH_LONG).show();
}
};


}


Reference: https://developers.google.com/maps/documentation/android-api/infowindows#info_window_events

Next:
- Display StreetViewPanoramaView in DialogFragment, when user click on InfoWindow


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

Read More..

Wednesday, October 12, 2016

Memory Booster v5 8 APK Full

Memory Booster is a powerful mobile memory & RAM boosting tool specially designed for both Android smartphone and tablet users. It is designed to tackle the difficult yet crucial problem of memory management for all Android devices. Memory Booster reclaims lost memory for your programs by defragmenting your devices memory and recovering memory leaks from poorly behaved applications.

Supported language: English, Korean, Japanese, Italian, French, Russian, Spanish, German, Simplified Chinese, Traditional Chinese

Features:
* Real-time Memory Status Report & Monitor
Memory Booster provides a live chart to demonstrate your devices total/free memory and current memory usage.
* Setting Your Performance Target
With Auto Boost Threshold set, Memory Booster keeps your memory higher than desired level, and act immediately if memory drops down.
* One-click Quick Memory Boosting
Besides automatic memory boosting, Memory Booster also allows you to manually boost your memory by Quick Boost.
* Auto-boosting in the Background
With Auto Boost Interval, Memory Booster runs in the background and automatically reclaims memory for your Android at interval.
* Android system crash protection
Memory Booster always watches your system resources and cleans up system memory once it reaches a critical point.
* And there is more…

Other features include embedded Task Killer, Whitelist Manager, Boost Level Manager & Memory Boost Log, which assist Memory Booster to perform more efficiently and friendly.

Whats New
Changelogs:
v5.8
- Optimize Quick Boost performance
- Fix issues reported by users
- Optimize the animation
- Add Share feature?users can share the app via Email, SMS etc)
- Other improvement
v5.7
- Optimize Notification Bar: Show free memory, percentage and running processes
- Optimize Quick Boost
- Fix widget failure issue
- Fix white list does not keep issue
- Remove Kiip Rewards
- Other Bug fixing

Read Here: How to Install APK

Requirements: Android 1.6+
File Size: 1 MB
Download Link: Mediafire.com
Read More..

Tuesday, October 11, 2016

Google Apps for Work POPSUGAR’s secret weapon in the shifting media landscape



Editors note: Today’s guest author is Bjorn Pave, Senior Director of Information Technology at POPSUGAR, an independent media and technology company that provides women with highly engaging content and commerce brands. Founded in 2006, POPSUGAR is in seven countries with more than 75 million unique monthly visitors. 

When I joined POPSUGAR in May 2013, we were rapidly transitioning from an ambitious startup to a major presence in entertainment and lifestyle media. The executive team had just decided to switch from Office 365 to Google Apps, and it was my job to make sure the transition went smoothly from a technical and user base perspective. Moving away from the familiar Microsoft-supported work environment could be difficult and I wanted to ease any resistance to change. Employees caught on quickly as to how the platform would increase collaboration and support our rapid growth.

Our Los Angeles based production team clamored for tools to help manage their film shoots. Talent schedules were unpredictable, and teams in multiple locations needed real-time access to production details on their mobile devices. Some of them had used Google tools before and started campaigning the executive team for Google Apps. POPSUGAR founder and CEO Brian Sugar was keen to make the company-wide switch, and his wife, Lisa Sugar, Co-Founder and Editor in Chief, wanted a better tool to manage the complex production calendars for each website that POPSUGAR manages.

With expert support from Cloud Sherpas, we migrated to Google Apps for Work. We created an experiential campaign called “Countdown to Google” to launch the switch. We also sent creative how-to emails and scheduled group training sessions. Our employees (more than 70 percent) were already familiar with Google Apps. The bigger challenge was tailoring workflows to meet each department’s business requirements. The result was a huge success. Two and half years later, we operate independently of almost any Microsoft service. Here are the biggest benefits we’ve seen with Google Apps for Work:

Boosted productivity with an immediate impact in our editorial process. Prior to using Google Apps, it took our editors 24 hours to interview a celebrity, create a blog post and to publish the post online. Now, the process is cut down to 1- 2 hours, which gives us a huge competitive advantage over other online publications. We now reach our audiences faster. Team meetings are also more productive. Everyone works with the same Google Doc to take notes, track the agenda and assign action items in real time. With the right tools, we created a better environment for inclusive collaboration.

Fosters collaboration between offices. Our offices are in San Francisco, New York, Los Angeles, Chicago and London, and we’re able to function as one team regardless of location. Chromebox for meetings was an easy solution that let employees and contractors communicate with each other around the world. We insisted on providing video capability because communication can be subtle, and those subtleties are lost if team members can’t see each other during a discussion. Now, when our West Coast-based Shopstyle team checks in with the European team first thing in the morning, it’s face-to-face and personal.

Saves 70 percent per year. Switching to Google Apps saves us approximately $110,000 annually, because we no longer pay for upgrades or unused services bundled in enterprise license agreements. For example, Google Hangouts saves us a few thousand every month by eliminating the need for additional video conference software or traditional conference call lines.

Google platform is reliable. An IT department’s worst nightmare is an email outage, or loss of work when a server is down. Google Apps is cloud based and updates automatically, no matter how many people are working in the same document. Because of the reliability of cloud-based servers, my team has the bandwidth to focus on innovation, creating new solutions to support our growth and stay on top of our business objectives.

Our voice matters. While millions of companies have gone Google, Google continues to make sure each customer can share their unique perspective. We’re involved with the Google Apps’ development program, and we participate in beta testing of new features, which is great for our IT roadmap. We use the Google Apps Marketplace to find third-party applications that build off of and complement our Google Apps tools.

Nine years after launching, POPSUGAR has grown to over 450 employees, in addition to managing a multitude of specialist contractors, in 5 locations around the globe. We’ve established a reputation for being leaders in the shifting media landscape, but we aren’t complacent. Our global audience is constantly expanding as more and more unique users rely on POPSUGAR as their primary source for entertainment, fashion, fitness, beauty and lifestyle news and product curation. The Google for Work platform is a key enabling technology for us, as collaboration, innovation and reliability are essential to support our vision for the future.
Read More..

Obtain Google Maps API key


Step 1: Locate debug.keystore on your system. It is usually in the USER_HOMELocal SettingsApplication Data.androidfolder on windows.


Step 2: Use the keytool utility to generate certificate fingerprint (MD5). keytool utility that comes with the default JDK installation.


C:>keytool -list -alias androiddebugkey -keystore .androiddebug.keystore -storepass android -keypass android


It will getnerate a certificate fingerprint (MD5) in this format:


Certificate fingerprint (MD5): XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX


Step 3: Go to the page for obtaining the Maps API Key. Put your Certificate fingerprint (MD5) And get your API key for android Google Map application. On this page, paste the certificate fingerprint in the appropriate form field, and click the “Generate API Key” button. This will return a Maps API key string. 


The key can be used in the Maps Application by pasting it in the MapView element in the XML layout file where appropriate.

Read More..

Monday, October 10, 2016

3G 4G Signal Booster FREE TOOL APK v1 5 1



3G/4G Signal Booster FREE TOOL APK v1.5.1

Features:


  • This app gives you no limits to use 4G without your carrier ever knowing
  • Do not allow your carrier to throttle your 4G or 3G connection!
  • This app gives a hack for unlimited 4G or 3G connectivity for your Android phone
  • Now you can speed up your internet with this app with a simple click on a button
  • This app allows for greater connectivity speed
  • Fully automatic
  • Switches networks whenever you are going

DOWNLOAD
Read More..

Phase2 brings its “everywhere” teams closer together saving time and money with Chromebox for meetings



Editors note: Today’s guest post is by Frank Febbraro, CTO of Phase2 Technology, which helps clients such as Memorial Sloan Kettering Cancer and Harvard Business School manage the way content is created, shared and experienced online. See how Phase2 Technology saves $3,000 a day and more than 100 hours a week by using Chromebox for meetings.


From the day we launched, we designed Phase2 Technology as a company that welcomed people who didn’t work on-site. In fact, we like to say we have five locations: New York, Washington, D.C., Portland, San Francisco and “everywhere” — a solid 25 percent of our employees work remotely. Because of this, we build our teams without worrying about where people are. A project lead in Portland might team up with people in Austin or Oklahoma City.

The most talented people don’t necessarily live near our offices, but that shouldn’t stand in the way of giving clients our best work. We rely on technology like Chromebox for meetings to bring down the barriers that get in the way of distributed teams working together.
Before we discovered Chromeboxes, the audiovisual situation for our meetings seemed like an insurmountable barrier.

Every video conference began as a comedy of errors: if we scheduled a half-hour meeting, we had to build in 10 minutes to struggle with the AV setup. We tried cobbling together configurations of cameras and mics, but nothing created the one-click system we needed. There were too many settings for employees to manage and too much tinkering around to get the meetings going. Plus, every room had a different system and settings. With five or so people in every meeting losing ten minutes on AV setup struggles, and those people meeting with others several times a day, we wasted dozens of hours every week. Over the course of a year, this translated into tens of thousands of dollars of lost time spent not delivering value to our clients.

All this changed when we brought Chromebox for meetings to eight conference rooms among our four offices. There’s no learning curve: people walk into a room and click one button on the Chromebox remote to start the meeting. We already use Google Hangouts and Google Calendar, so Chromebox fits in with the tools we know. We now work more fluidly, since we can start ad hoc meetings without worrying about cameras, mics and settings.

Chromebox for meetings saves time for our teams as they meet and also benefits our IT team. The management console lets us choose how the Chromeboxes operate, and those settings apply to every room and every meeting. Compared to conferencing systems that cost several thousand dollars per room, Chromebox for meetings costs much less and is much easier to set up and use. Achieving this ease at scale is critical for us — each employee might do as many as 10 Hangouts a day; multiply that by 140 people, and we’re spending about 450 hours on Hangouts daily.

Efficiency and time management are especially critical for a business like ours, which makes money by billing hourly and delivering excellent, efficient client service. We’ve reduced our IT costs for maintaining meeting rooms to just about zero. We used to spend about four hours a month per room on maintaining our old AV setups. We now spend about one hour per month total on all rooms — from 32 hours a month on maintenance down to just one hour.

We can do more with so much less now. Better meetings help us get rid of distractions so we can get right down to business, no matter where in the world our teams are.
Read More..

HTC Sense 5 5 busted! True screenshots of the incoming HTC UI

Its been some time since we have had HTC Sense 5.0 on the market. In the past few weeks this, considered by many as the best Android UI, also has been released for HTC One X and HTC One X+.

We already know for a few months, that HTC has already been working on the next version of their famous UI - HTC Sense 5.5. Some of the Sense 5.5 features are already present in the latest HTC One Android 4.3 build, however they are currently disabled in the framework.

Today, we present to you the first screenshots of the incoming HTC Sense 5.5 interface. If you are going to share this great news, please dont forget to include the source link too!


Home screen - now you can disable or enable HTC BlinkFeed easily.



Android Quick Settings - now you can re-arrange the content of the QS panel.



Improved HTC keyboard with possibility to add more emoticons.



Improved camera - "Dual capture" and "Panorama+", Storage and Recent Apps panel.



New HTC BlinkFeed categories, custom topics tab and minor changes to alarm clock.



Many more changes are of course under the hood, so expect improved performance and overall UI smoothness. Many bugs are also fixed, so the incoming HTC Sense 5.5 should bring a lot of joy for all HTC fans!

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!
Read More..