Get ISO country code for the given latitude longitude using GeoNames Java Client

| 0 comments |
Last example show "Get ISO country code for the given latitude/longitude, using GeoNames Web Service, using HttpURLConnection". GeoNames provide Java Client for GeoNames Webservices to help developers to easily access the geonames web services with java. This post show how to use it in Android.

To use Java Client for GeoNames Webservices in you Android Studio project, you have to download both geonames-1.1.13.jar and jdom-1.0.jar to your local machine. Visit http://www.geonames.org/source-code/ to download.

Then you have to add the JAR modules in your Android Studio Project, refer to the video.


dependencies of :geonames-1.1.13 and :jdom-1.0 will be added in your build.gradle.

Example to get ISO country code for the given latitude/longitude, using GeoNames Java Client:


MainActivity.java
package com.blogspot.android_er.androidgeonames;

import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

import org.geonames.GeoNamesException;
import org.geonames.WebService;

import java.io.IOException;

public class MainActivity extends AppCompatActivity {

EditText latText;
EditText lonText;
Button btnFind;
TextView textResult;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
latText = (EditText)findViewById(R.id.latText);
lonText = (EditText)findViewById(R.id.lonText);
btnFind = (Button)findViewById(R.id.find);
textResult = (TextView)findViewById(R.id.result);

btnFind.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String strLat = latText.getText().toString();
String strLon = lonText.getText().toString();

boolean parsable = true;
Double lat = null, lon = null;

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

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

if(parsable){
new GeoNamesTask(textResult).execute(lat, lon);
}

}
});
}

private class GeoNamesTask extends AsyncTask<Double, Void, String> {
TextView tResult;

public GeoNamesTask(TextView vResult){
tResult = vResult;
tResult.setText("");
}

@Override
protected String doInBackground(Double... params) {
return queryGeoNames_countryCode(params[0], params[1]);
}

@Override
protected void onPostExecute(String s) {
tResult.setText(s);
}

private String queryGeoNames_countryCode(double latitude, double longitude){
String queryResult = "";

/*
Do not use the demo account for your app or your tests.
It is only meant for the sample links on the documentation pages.
Create your own account instead.
*/
WebService.setUserName("demo");

try {
queryResult = "CountryCode: " + WebService.countryCode(latitude, longitude);
} catch (IOException e) {
e.printStackTrace();
queryResult = e.getMessage();
} catch (GeoNamesException e) {
e.printStackTrace();
queryResult = e.getMessage();
}

return queryResult;
}
}
}


layout/activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout


android_layout_width="match_parent"
android_layout_height="match_parent"
android_padding="16dp"
android_orientation="vertical"
tools_context=".MainActivity">

<TextView
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_layout_gravity="center_horizontal"
android_autoLink="web"
android_text="http://android-er.blogspot.com/"
android_textStyle="bold" />

<EditText
android_id="@+id/latText"
android_layout_width="match_parent"
android_layout_height="wrap_content"
android_inputType="numberSigned|numberDecimal"
android_hint="Latitude"
android_text="47.03"/>

<EditText
android_id="@+id/lonText"
android_layout_width="match_parent"
android_layout_height="wrap_content"
android_inputType="numberSigned|numberDecimal"
android_hint="Longitude"
android_text="10.2"/>

<Button
android_id="@+id/find"
android_layout_width="match_parent"
android_layout_height="wrap_content"
android_text="find"/>

<TextView
android_id="@+id/result"
android_layout_width="match_parent"
android_layout_height="wrap_content"
android_textSize="28dp"
android_textStyle="bold"/>
</LinearLayout>


Permission of "android.permission.INTERNET" is needed in AndroidManifest.xml
 <uses-permission android_name="android.permission.INTERNET"/>




Read More..

Geometry Math Library for C Game Developers MathFu

| 0 comments |
Today were announcing the 1.0 release of MathFu, a cross-platform geometry math library for C++ game developers. MathFu is a C++ math library developed primarily for games focused on simplicity and efficiency.

It provides a suite of vector, matrix and quaternion classes to perform basic geometry suitable for game developers. This functionality can be used to construct geometry for graphics libraries like OpenGL or perform calculations for animation or physics systems.

The library is written in portable C++ with SIMD compiler intrinsics and has been tested on Android, Linux, OS X and Windows.

You can download the latest open source release from our GitHub page. We invite you to contribute to the project and join our discussion list!

By Stewart Miles, Fun Propulsion Labs at Google*

*Fun Propulsion Labs is a team within Google thats dedicated to advancing gaming on Android and other platforms.
Read More..

The Realtime API In memory mode debug tools and more

| 0 comments |

Posted by Cheryl Simon Retzlaff, Software Engineer on the Realtime API team

Originally posted to the Google Apps Developer blog

Real-time collaboration is a powerful feature for getting work done inside Google docs. We extended that functionality with the Realtime API to enable you to create Google-docs style collaborative applications with minimal effort.

Integration of the API becomes even easier with a new in memory mode, which allows you to manipulate a Realtime document using the standard API without being connected to our servers. No user login or authorization is required. This is great for building applications where Google login is optional, writing tests for your app, or experimenting with the API before configuring auth.

The Realtime debug console lets you view, edit and debug a Realtime model. To launch the debugger, simply execute gapi.drive.realtime.debug(); in the JavaScript console in Chrome.

Finally, we have refreshed the developer guides to make it easier for you to learn about the API as a new or advanced user. Check them out at https://developers.google.com/drive/realtime.

For details on these and other recent features, see the release note.

Read More..

I can get another if I break it Announcing Noto Nastaliq Urdu

| 0 comments |
Today, we are excited to release an early version of Noto Nastaliq Urdu.

Nastaliq’s rich typographic tradition presents particular challenges to computerized typography. We’ve been working over a year to solve technical and design issues for an Urdu Nastaliq (aka Nastaleeq) font. This early version is by no means complete and perfect. We expect to work closely with the community to incorporate comments and suggestions.

This preview font can be downloaded from the Noto homepage or the Noto repository, and is also available as a webfont on Google Fonts Early Access.

This is a sample web page to showcase Noto Nastaliq Urdu as a webfont. Go ahead open it. If your browser renders it correctly, you will see something like this:


Text in the image is from a poem by Urdu poet Mirza Ghalib. It means “I can get another if I break it / so a clay cup trumps a grail.” This font can be challenging to the current generation of browsers and font renderers. It partially broke a few of them; we have been working with browser manufacturers to fix all those issues.

We are looking forward to your feedback and bug reports. Please contact us through https://code.google.com/p/noto/issues/entry. Known issues can be found here.

Posted by Behdad Esfahbod, Software Engineer, Fonts & Text Rendering, Google Internationalization Engineering
Read More..

where to get android apps for blackberry

| 0 comments |




where to get android apps for blackberry




How to install an android app (apk) to a blackberry. by simon sage tuesday, fast and easy to get android apps on blackberry 10.2.1 . posted via cb10. 0; 2 years ago.. Download your favorite android apps & games for your blackberry smartphone, 1 android app support and compatibility will vary by smartphone and/or software version.. ... enjoy all that android has to offer on a blackberry smartphone. with android apps and a blackberry with android, you get access to millions of apps from.




Android App Player for PlayBook online gefunden | Mobistack

Android app player for playbook online gefunden | mobistack



... android - BlackBerry QNX smartphones getting Android apps early' 2012

... android - blackberry qnx smartphones getting android apps early' 2012




Repackage your android apps for blackberry 10. what is this? learn about the runtime for android apps and different options for repackaging your app. repackaging tools.. Android apps on blackberry. i was wondering if rim, in addition to allowing individual developers to submit their android apps to blackberry app world,. The indian express; nation; world; how to install android apps on blackberry till it opens up to there are many options to side-load android apps on a blackberry..




Read More..

list of android apps movable to sd card

| 0 comments |




list of android apps movable to sd card




Discover the limitations of the system and find out how to move all applications by default on your android phone's sd card move all apps to the sd. How to move android apps to an sd card. here's how to move apps to the microsd card using android's if you don't see a move to sd card button, the app. Moving apps to the sd card [froyo] press any of the apps in the list, and see if the "move to sd wouldn't it be better if android phones had a memory setup.




Move app to SD card - Android Apps on Google Play

Move app to sd card - android apps on google play



Android-App-Can-Be-Moved-to-microSD.jpg

Android-app-can-be-moved-to-microsd.jpg




Move app to sd card. 284,278. ljmobile tools. • move apps to sd card means that android os set up ***default*** sd card and system partition in. How to move applications from internal memory to an sd card on an android phone. are your apps taking up too much you may be able to move your apps to your sd card.. ... but we’ll also describe how to access the application manager on a stock android device. to move an app to the sd card, your sd card and move any app you.




Read More..

application android icon

| 0 comments |




application android icon




Fixed icon loading glitch - browse & download 207,000+ free app icons through out 1,000+ icon packs. lots of awesome icons to choose from, search for. The easiest way to decorate your android. icon changer is the application that makes shortcut with a new icon at home screen. icon can be chosen from gallery and lots. Android app icons - download 2714 free android app icons @ iconarchive. search more than 450,000 icons for web & desktop here..




Icons for Android Application | IconsCloud

Icons for android application | iconscloud



Android Application Downloads

Android application downloads




How can i set an icon for my android application?. Android launcher icon template. this template helps quickly render the multiple android product icon sizes. it comes bundled with standard android product icon shapes. Android icon - world's best selection of high quality free android icons..




Read More..