May 17, 2015

How Android OTA Updates work

Presentation at Embedded Linux Conference 2015 by Andrew Boie from Intel Corporation.

AOSP is distributed with the source code and tools for full (whole image) and incremental (binary patch) secure over-the-air (OTA) software updates, specifically an alternate boot target Recovery Console, the updater logic itself, and tools to create software updates. There is no publicly available documentation for how this mechanism is supposed to be integrated. This presentation gives a detailed end-to-end description of how software updates are created, digitally signed, and applied to the device. It includes a discussion on the plug-in architecture and Edify language which allows builders to customize the OTA updates with platform-specific features. This is an updated version of a talk presented at ABS in 2012, with details on new OTA features including block-level OTA updates in Lollipop.

Speakers
Andrew Boie
Intel Corporation
Andrew Boie is a software engineer and scrum master for the Intel Android-IA project hosted on 01.org, which aims to support Android on Intel Core and Atom platforms. Prior to working at Intel Andrew worked for Garmin International as an engineering team lead on Android Eclair-based Nuvifone projects. He spoke at ABS 2011 on the topic of Android OTA Software Updates.


May 12, 2015

Google Play Services 7.3

Google Play Services 7.3 brings a ton of great new features to help you BUILD BETTER APPS! This update brings the ability to connect multiple wearables simultaneously to a single phone.

There are also some great new updates to Google Fit, including nutrition types, and to Location.


May 6, 2015

Older YouTube apps is no longer be supported



If you see this video in your YouTube app’s video feeds, your device is affected. (Note: If the video appears unexpectedly in a web browser, it means that website is using an outdated method to access YouTube videos.)

As Google upgrade the YouTube Data API to bring more features, the old version will be begin shutting down on April 20, 2015. This will result in the current YouTube app not working on certain device models from 2012 and older.

https://youtube.com/devicesupport


May 4, 2015

Using VideoView to play mp4, with MediaController enable/disable

Example to play mp4 on SDCard/ExternalStorage using android.widget.VideoView. You can also enable/disable the MediaController, contains the buttons like "Play/Pause", "Rewind", "Fast Forward" and a progress slider, by calling VideoView.setMediaController().

With the MediaController set, tap on the video (or the VideoView) to display the controller.


Example code:
package com.example.androidvideoview;

import java.io.File;

import android.support.v7.app.ActionBarActivity;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.MediaController;
import android.widget.Toast;
import android.widget.ToggleButton;
import android.widget.VideoView;
import android.os.Bundle;
import android.os.Environment;

public class MainActivity extends ActionBarActivity {
 
 ToggleButton enableMediaController;
 VideoView myVideoView;

 @Override
 protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  
  enableMediaController = (ToggleButton)findViewById(R.id.enableMediaController);
  myVideoView = (VideoView)findViewById(R.id.myvideoview);
  myVideoView.setVideoPath(getViewSrc());
  myVideoView.requestFocus();
  myVideoView.start();
  
  setMediaController();
  
  enableMediaController.setOnCheckedChangeListener(new OnCheckedChangeListener(){

   @Override
   public void onCheckedChanged(CompoundButton buttonView,
     boolean isChecked) {
    setMediaController();
   }});
 }
 
 private void setMediaController(){
  if(enableMediaController.isChecked()){
   myVideoView.setMediaController(new MediaController(this));
  }else{
   myVideoView.setMediaController(null);
  }
 }

 private String getViewSrc(){
  File extStorageDirectory = Environment.getExternalStorageDirectory();
  String s = extStorageDirectory.getAbsolutePath() + "/test.mp4";
  Toast.makeText(MainActivity.this, s, Toast.LENGTH_SHORT).show();
  return s;
 }
}

<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:orientation="vertical"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.example.androidvideoview.MainActivity" >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="android-coding.blogspot.com"
        android:textSize="24dp"
        android:textStyle="bold" />

    <ToggleButton
        android:id="@+id/enableMediaController"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textOn="Disable MediaController"
        android:textOff="Enable MediaController"
        android:checked="true"/>
    <VideoView
        android:id="@+id/myvideoview"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" />

</LinearLayout>

To play the file in SD Card, <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> is needed in AndroidManifest.xml, otherwise "Can't play this video".


Infolinks In Text Ads