Tuesday, December 30, 2014
Monday, December 8, 2014
Google Play Services 6.5
Google Play services 6.5 includes new features in Google Maps, Google Drive and Google Wallet as well as the recently launched Google Fit API. Also providing developers with more granular control over which Google Play services APIs your app depends on to help you maintain a lean app.
Google Developer content is now available offline
The Google Developer Platform team recently commenced a program to make a subset of the resources available offline to developers who, because of limited or no broadband, had previously been unable to access them. The kits include the latest and greatest content on it such as videos, documentation and SDKs.
Find out more: http://g.co/GDGDevKitPilot
Wednesday, December 3, 2014
AdMob Interstitials Best Practices
You can grow your mobile app revenue with high-paying AdMob interstitial ads. Implementing these ads in the right way is better for your users and for you. AdMob poiicies are designed to create a positive user experience, so watch this official video to be sure you're doing it right.
Wednesday, November 26, 2014
fplutil - libraries and tools help developing for Android and other platforms
fplutil is a set of small libraries and tools that can be useful when developing applications for Android and other platforms.
Components
Components
- build_all_android is an all-in-one build script that allows you to build, install and run native (C/C++) Android apps from the command line. This is ideal for build automation, but can also be in a developer’s compile/run loop.
- buildutil performs the configuration, build and archive steps of Android and Linux C/C++ applications using a suite of Python modules. This suite of modules can automate builds in a continuous integration environment.
- android_ndk_perf is a desktop tool that enables native (C/C++) developers to measure the CPU utilization of their applications on Android, guiding their optimization efforts.
- libfplutil enables C/C++ developers to write traditional applications (like Hello World) using "main()" and "printf()" on Android.
Monday, November 24, 2014
Customize Toast to show longer duration
This example show how to customize Toast to show longer duration, by using CountDownTimer to call toast.show() repeatly. And also show how to make the toast counting.
package com.example.androidtoastduration;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;
import android.os.Bundle;
import android.os.CountDownTimer;
public class MainActivity extends ActionBarActivity {
Button text1, text2, text3, text4;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
text1 = (Button)findViewById(R.id.text1);
text2 = (Button)findViewById(R.id.text2);
text3 = (Button)findViewById(R.id.text3);
text4 = (Button)findViewById(R.id.text4);
text1.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v) {
Toast.makeText(
MainActivity.this,
"LENGTH_SHORT",
Toast.LENGTH_SHORT).show();
}});
text2.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v) {
Toast toast = Toast.makeText(
MainActivity.this,
"10 second - Not Work!",
Toast.LENGTH_SHORT);
toast.setDuration(10000); //set duration, not work
toast.show();
}});
text3.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v) {
final Toast toast = Toast.makeText(
MainActivity.this,
"10 second",
Toast.LENGTH_SHORT);
toast.show();
new CountDownTimer(10000, 1000)
{
public void onTick(long millisUntilFinished) {
toast.show();
}
public void onFinish() {
toast.cancel();
}
}.start();
}});
text4.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v) {
final Toast toast = Toast.makeText(
MainActivity.this,
"10 second",
Toast.LENGTH_SHORT);
toast.show();
new CountDownTimer(10000, 1000)
{
int count = 10;
public void onTick(long millisUntilFinished) {
toast.show();
count--;
toast.setText(count + " sec");
}
public void onFinish() {
toast.cancel();
}
}.start();
}});
}
}
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
tools:context="com.example.androidtoastduration.MainActivity" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="android-coding.blogspot.com" />
<Button
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="40dp"
android:textStyle="bold"
android:text="LENGTH_SHORT" />
<Button
android:id="@+id/text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="40dp"
android:textStyle="bold"
android:text="10 sec Toast - NOT Work!" />
<Button
android:id="@+id/text3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="40dp"
android:textStyle="bold"
android:text="10 sec Toast" />
<Button
android:id="@+id/text4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="40dp"
android:textStyle="bold"
android:text="10 sec counting Toast" />
</LinearLayout>
Thursday, November 20, 2014
Introduction to Android Auto
Timothy Jordan Introduces Android Auto. Android Auto brings the Android platform to the car in a way that's optimized for the driving experience. It's the same Google platform you already use for phones, tablets, televisions, watches, and more. In fact, all these experiences will often be in the same APK. But now, your app can also extend to the car in a way that's safer and more efficient for the driver. So drivers can stay connected with their hands on the wheel and their eyes on the road.
Using Android Auto is easy. Users go to the Google Play store and download apps that support Android Auto onto their phone.. When they connect their phone to the car, the phone goes into car mode and casts the Android Auto experience to the car's screen. This means that although all the apps and services are actually running on the phone, they're displayed in the car's dash. Users interact with them using the vehicle's controls such as a built-in touchscreen and microphone.
Subscribe to:
Posts (Atom)