Tuesday, 30 August 2016

Asynchronous Android Programming, 2nd Edition

Asynchronous Android Programming

About This Book
  • Construct scalable and performant applications to take advantage of multi-thread asynchronous techniques
  • Explore the high-level Android asynchronous constructs available on the Android SDK
  • Choose the most appropriate asynchronous technique to implement your next outstanding feature
Who This Book Is For
This book is for Android developers who want to learn how to build multithreaded and reliable Android applications using high-level and advanced asynchronous techniques and concepts.

What You Will Learn
  • Get familiar with the Android process model and low-level concurrent and multithread constructs available on the Android SDK
  • Use AsyncTask to load data in the background, delivering progress results in the meantime
  • Enhance UI performance and responsiveness by sending work to a service running in the background
  • Defer, schedule, and batch work on the Android system without compromising the battery life and user experience
  • Use the JNI interface to execute concurrent work on native layer
  • Pull and push data from your network servers using the Google GCM platform
  • Create and compose tasks with RxJava to execute complex asynchronous work in a predictable way
  • Get accustomed to the use of the Android Loader construct to deliver up-to-date results
In Detail
Asynchronous programming has acquired immense importance in Android programming, especially when we want to make use of the number of independent processing units (cores) available on the most recent Android devices. To start with, we will discuss the details of the Android process model and the Java low-level concurrent framework, delivered by the Android SDK. Next, we will discuss the creation of IntentServices, bound services, and external services, which can run in the background even when the user is not interacting with them. In a more advanced phase, you will create background tasks that are able to execute CPU-intensive tasks in native code�making use of the Android NDK.

You will be then guided through the process of interacting with remote services asynchronously using the HTTP protocol or Google GCM Platform. Finally, we will introduce RxJava, a popular asynchronous Java framework used to compose work in a concise and reactive way.

Monday, 29 August 2016

Auto scrolling (horizontal running) TextView


It's follow-up post about my old post of "Implement auto-running TextView", to make a TextView horizontal scrolling automatically.

This video show how it tested on Android emulator running Android 7.0 Nougat API 24, in Multi-Window Mode also.


<?xml version="1.0" encoding="utf-8"?>
<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:padding="16dp"
android:orientation="vertical"
tools:context="com.blogspot.android_er.androidautotextview.MainActivity">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:layout_gravity="center_horizontal"
android:autoLink="web"
android:text="http://android-er.blogspot.com/"
android:textStyle="bold"/>

<TextView
android:id="@+id/scrollingtext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="40dp"
android:background="#D0D0D0"
android:text="http://android-er.blogspot.com/"

android:focusable="true"
android:focusableInTouchMode="true"
android:singleLine="true"
android:scrollHorizontally="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit ="marquee_forever"
/>

</LinearLayout>


And set it selected in Java code.
package com.blogspot.android_er.androidautotextview;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

TextView scrollingText;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
scrollingText = (TextView)findViewById(R.id.scrollingtext);
scrollingText.setSelected(true);

}
}



Saturday, 27 August 2016

TextView, auto scroll down to display bottom of text


This example show how to make a TextView auto scroll down to display bottom of text. In the demonstration, the upper TextView is normal, user cannot see the bottom of text if it is full. The lower one, the TextView will auto scroll down, such that user can see the new added text.


<?xml version="1.0" encoding="utf-8"?>
<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:padding="16dp"
android:orientation="vertical"
tools:context="com.blogspot.android_er.androidautotextview.MainActivity">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:layout_gravity="center_horizontal"
android:autoLink="web"
android:text="http://android-er.blogspot.com/"
android:textStyle="bold"/>

<EditText
android:id="@+id/textin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="28dp"/>

<Button
android:id="@+id/btnappend"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Append Text"/>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textout1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:textSize="20dp"
android:background="#D0D0D0"/>
<TextView
android:id="@+id/textout2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:textSize="20dp"
android:gravity="bottom"
android:background="#E0E0E0"/>
</LinearLayout>

</LinearLayout>


package com.blogspot.android_er.androidautotextview;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.method.ScrollingMovementMethod;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

EditText editTextIn;
TextView textViewOut1, textViewOut2;
Button btnAppend;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

editTextIn = (EditText)findViewById(R.id.textin);
btnAppend = (Button)findViewById(R.id.btnappend);

textViewOut1 = (TextView)findViewById(R.id.textout1);
textViewOut1.setText("It's normal TextView.\n");

textViewOut2 = (TextView)findViewById(R.id.textout2);
textViewOut2.setMovementMethod(new ScrollingMovementMethod());
textViewOut2.setText("This TextView always auto scroll down to display bottom of text.\n");


btnAppend.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String textToAppend = editTextIn.getText().toString() + "\n";
textViewOut1.append(textToAppend);
textViewOut2.append(textToAppend);
editTextIn.setText("");
}
});
}
}


Wednesday, 24 August 2016

The Android Game Developer's Handbook

The Android Game Developer's Handbook

Key Features
  • Practical tips and tricks to develop powerful Android games
  • Learn to successfully implement microtransactions and monitor the performance of your game once it's out live.
  • Integrate Google's DIY VR tool and Google Cardboard into your games to join in on the VR revolution
Book Description
Gaming in android is an already established market and growing each day. Previously games were made for specific platforms, but this is the time of cross platform gaming with social connectivity. It requires vision of polishing, design and must follow user behavior. This book would help developers to predict and create scopes of improvement according to user behavior.

You will begin with the guidelines and rules of game development on the Android platform followed by a brief description about the current variants of Android devices available. Next you will walk through the various tools available to develop any Android games and learn how to choose the most appropriate tools for a specific purpose.

You will then learn JAVA game coding standard and style upon the Android SDK. Later, you would focus on creation, maintenance of Game Loop using Android SDK, common mistakes in game development and the solutions to avoid them to improve performance. We will deep dive into Shaders and learn how to optimize memory and performance for an Android Game before moving on to another important topic, testing and debugging Android Games followed by an overview about Virtual Reality and how to integrate them into Android games.

Want to program a different way? Inside you'll also learn Android game Development using C++ and OpenGL. Finally you would walk through the required tools to polish and finalize the game and possible integration of any third party tools or SDKs in order to monetize your game when it's one the market!

What you will learn
  • Learn the prospects of Android in Game Development
  • Understand the Android architecture and explore platform limitation and variations
  • Explore the various approaches for Game Development using Android
  • Learn about the common mistakes and possible solutions on Android Game Development
  • Discover the top Cross Platform Game Engines and port games on different android platform
  • Optimize memory and performance of your game.
  • Familiarize yourself with different ways to earn money from Android Games
About the Author
Avisekhar Roy is a B.Tech engineer in computer science. He has had a passion for coding since his school days. However, he had no plans to become a game programmer. His fate landed him in the gaming industry in 2010. Since then, he fell in love with game development.

Avisekhar has worked in many formats of game development environment, ranging from small companies and individual studios to corporate companies and full-scale game development studios. He recently started his own gaming start-up in 2016 and is currently working on games for the mobile platform.

Avisekhar has also worked with some big companies, such as Reliance Games in India, as well as a small-scale studio called Nautilus Mobile. He is now trying to acquire a position in the gaming industry for his own venture, Funboat Games.

Table of Contents
  1. Android Game Development
  2. Introduction to Different Android Platforms
  3. Different Android Development Tools
  4. Android Development Style and Standards in the Industry
  5. Understanding the Game Loop and Frame Rate
  6. Improving Performance of 2D/3D Games
  7. Working with Shaders
  8. Performance and Memory Optimization
  9. Testing Code and Debugging
  10. Scope for Android in VR Games
  11. Android Game Development Using C++ and OpenGL
  12. Polishing Android Games
  13. Third-Party Integration, Monetization, and Services

Tuesday, 23 August 2016

Pok�mon GO updated to version 0.35.0 for Android and 1.5.0 for iOS

Pok�mon GO updated to version 0.35.0 for Android and 1.5.0 for iOS devices. Below are some release notes and comments from Pok�mon GO development team.

  • Implemented Pok�mon Appraisal: Trainers will now be able to learn about a Pok�mon�s attack and defense capabilities from their Team Leader (Candela, Blanche or Spark) to determine which of their Pok�mon have the most potential for battle.
  • Still working hard on several new and exciting features to come in the future of Pok�mon GO.
  • Minor bot fixes




But...how can I understand the Team Leader's meaning!?




This video show how the Team Leader comment on my three Dragonites (with CP 1752, 1089 and 46).



What is Pokemon GO Appraise?

Not all Pokemon are created equal. Some are faster, some are bulkier, some are stronger attackers. Usually, these differences are expressed using IVs � Individual Values. Niantic has avoided introducing IVs on the Game UI, even though they are present in the game mechanics.

Pokemon GO Appraise is a feature that exposes Individual Values and Overall Value of the Pokemon to players. Players have correlated Appraise results with IV scores from various calculators.

To know the meaning of various appraise, read: Pokemon GO Appraise Explained.


How a decent Ponyta evolve to a decent Rapidash:


Tuesday, 16 August 2016

Find the Best moveset of Pok�mons

It's a web site Pok�mon GO Info, you can check the best moveset, weaknesses, max CP and also ranking of any Pok�mon.

This video show the best moveset of Drogonite, Vaporeon and Gyarados.


Visit: https://pokemon.gameinfo.io/


Select the Pok�mon you want to check. It will show the best moveset of Quick move and Main move with highest dps (damage per second). Also show the weaknesses.


Compare with the moveset of your Pok�mon.


Monday, 15 August 2016

Sunday, 14 August 2016

Niantic will ban 'Pokemon GO' Cheaters

Niantic announced in their Pok�mon GO > FAQ > Submit a ban appeal:

Your account will be permanently terminated for violations of the Pok�mon GO Terms of Service. This includes, but is not limited to: falsifying your location, using emulators, modified or unofficial software and/or accessing Pok�mon GO clients or backends in an unauthorized manner including through the use of third party software.

For the first three reasons, I think all you and me agree. But for the fourth reason (accessing Pok�mon GO clients or backends), it seem including check iv using third party software/web service; so I already removed my intro videos about.


Friday, 12 August 2016

Pikachu Evolution: to Raichu


Google Play is launching on Chromebooks

At Google I/O 2016, Google announced that Google Play would be launching on Chromebooks. As an Android developer, your apps will soon be compatible with Chromebooks. Here�s how you can improve the Chromebook experience for your Android apps:
No action is required, but we recommend the steps above to best position your app for the millions of potential customers using Chromebooks.



Monday, 8 August 2016

Pok�mon GO has been updated to version 0.33.0 for Android and 1.3.0 for iOS

Pok�mon GO has been updated to version 0.33.0 for Android and 1.3.0 for iOS devices. Below are some release notes and comments from our development team.
  • Added a dialog to remind Trainers that they should not play while traveling above a certain speed. Trainers must confirm they are not driving in order to continue playing.
  • Made improvements to the accuracy of a curveball throw
  • Fixed a bug that prevented �Nice,� �Great,� and �Excellent� Pok� Ball throws from awarding the appropriate XP bonuses.
  • Fixed achievements showing incorrect Medal icons.
  • Enabled the ability for Trainers to change their nickname one time. Please choose your new nickname wisely.
  • Resolved issues with the battery saver mode on iOS and re-enabled the feature.
  • Added visuals of Team Leaders Candela, Blanche, and Spark.
  • Currently testing a variation of the �Nearby Pok�mon� feature with a subset of users. During this period you may see some variation in the nearby Pok�mon UI.
  • Minor text fixes

source: http://pokemongo.nianticlabs.com/en/post/update-080816/


Customize theme's colors


Last example show how to Apply Material Theme (with default color) to Activity. The video show how to further custom the theme colors.


Edit values/styles.xml to modify style of "AppTheme2", adding various color defination.
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>

<style name="AppTheme2" parent="android:Theme.Material">
<item name="android:colorPrimary">@android:color/holo_orange_light</item>
<item name="android:colorPrimaryDark">@android:color/holo_orange_dark</item>
<item name="android:textColorPrimary">@android:color/holo_blue_bright</item>
<item name="android:windowBackground">@android:color/darker_gray</item>
<item name="android:navigationBarColor">@android:color/holo_green_dark</item>
</style>


</resources>


Make sure "@style/AppTheme2" is used in AndroidManifest.xml.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.blogspot.android_er.androidmultiwindow">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme2">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>


Reference:
Using the Material Theme

Pok�Advisor blocked

It appears Niantic has blocked PokeAdvisor from accessing your data. Pok�Advisor will not be able to update user Trainer. The site is in read only mode, so you can search for your Trainer and download your Pokemon for a little while longer.



Related:
- Niantic will ban 'Pokemon GO' Cheaters

Farfetch'd - Asia limited Pok�mon





Farfetch'd is always seen with a stalk from a plant of some sort. Apparently, there are good stalks and bad stalks. This Pok�mon has been known to fight with others over stalks.
~ know more.


Wednesday, 3 August 2016

Windows 10 Anniversary Update

Windows 10 Anniversary Update will begin rolling out around the world. The Windows 10 Anniversary Update is full of new features and innovations that bring Windows Ink and Cortana to life; a faster, more accessible and more power-efficient Microsoft Edge browser; advanced security features; new gaming experiences and more. The Windows 10 Anniversary Update will start rolling out to Windows 10 Mobile phones in the coming weeks.

The Windows 10 Anniversary Update is being rolled out to Windows 10 PCs across the world in phases starting with the newer machines first. You don�t have to do anything to get the Windows 10 Anniversary Update, it will roll out automatically to you through Windows Update if you�ve chosen to have updates installed automatically on your device. However, if you don�t want to wait for the update to roll out to you, you can manually get the update yourself on your personal PC. If you�re using a Windows 10 PC at work, you will need to check with your IT administrator for details on your organization�s specific plans to update.

Read more at https://blogs.windows.com/windowsexperience/2016/08/02/how-to-get-the-windows-10-anniversary-update/#ZMI61X8Smr8eLb88.99