Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

Wednesday, April 24, 2013

Larry Page: Android powers Google Glass

By Magesh Kumar   Posted at  10:14 PM   Android No comments
















After reaching smartphones and tablets, Google's mobile OS is stretching to electronic head wear  And looking on the bright side, the CEO says Android fragmentation reflects innovation and flexibility.

Google uses its Android mobile operating system to power its Glass devices, Chief Executive Larry Page."Obviously Glass runs on Android," Page said toward the end of the conference call reporting Google's strong first-quarter financial results.
It's not a surprise, given how the engineering resources Google already has poured into Android. But the company hadn't confirmed it, even when it detailed Google Glass specifications last week.

Friday, August 19, 2011

Google buys Motorola Mobility, Samsung and Apple fight it out (Video)

By Magesh Kumar   Posted at  3:12 AM   Android No comments

Google announced plans to acquire mobile phone and tablet maker Motorola Mobility for about $12.5bn.

Google buys Motorola Mobility, Samsung and Apple fight it out

Motorola Mobility exclusively ships phones and its Xoom tablet with Google's Android operating system. The deal will mean that Google now has a hardware manufacturer to work closely with to develop Android. Google will also have control of Motorola's impressive patent portfolio of more than 24-thousand patents. We asked an analyst whether  the deal strain the relationship Google has with other companies that ship Android devices.
CEO Larry Page confirmed that Motorola's patent portfolio is part of what made Google open its wallet saying "Our acquisition of Motorola will increase competition by strengthening Google's patent portfolio, which will enable us to better protect Android from anti-competitive threats from Microsoft, Apple and other companies,"

Samsung is again free to sell its Android-based Galaxy Tab 10.1 in all European Union countries except for Germany. A court in Dusseldorf changed its injunction enacted last week because of uncertainties about jurisdiction. A spokesman at the Dusseldorf district court said that it wasn't clear whether the court can forbid a company based in Korea from selling its products in countries other than Germany. On Tuesday the court said that while Samsung G-m-b-H, the company's German affiliate, may not sell Galaxy Tabs outside Germany, Samsung Korea can. The injunction last week came as a result of Apple claiming that Samsung's table is a copy of its iPad.
The US Federal Communications Commission is looking into last week's shutdown of mobile phone services on a San Francisco commuter train line. The Bay Area Rapid Transit District or BART pulled the plug on mobile phone based stations in an attempt to disrupt a planned protest. The outage lasted about three hours. The planned protest last week didn't materialize, but this week it did. On Monday a group of 50 to 100 protesters forced BART to shut down station after station in San Francisco's downtown. This time though, BART didn't shut down the underground mobile base stations operated by 5 wireless carriers. Members of the hacking collective Anonymous joined up with Bay Area activists to protest last month's killing of a passenger who was shot by a BART policeman after throwing a knife at the officer.
In gaming news this week Microsoft said its XBox 360 outsold competing game consoles in the US for the seventh straight month in July.
The company said it sold more than 275 thousand units during the month, giving it a 45% share for the current generation of game boxes, which include Sony's PlayStation 3 and Nintendo's Wii. The XBox 360 has been lifted by the success of its Kinect platform, a motion-sensing device that lets users control games with physical movements. Though the overall game market in the US was down 26 percent from a year earlier.
The forty percent price cut on Nintendo's 3DS has caused sales of the handheld game console to soar in Japan. The gaming device had its best seven-day run of sales since its launch in February, selling more than 200-thousand units.
In more gaming sales, the 50 dollar price cut for the PS3 also caused a sale spike. Sales on Amazon shot up almost 400% in 24 hours.
How adventurous of an app user are you? If you're using apps past the top ten in the Android Market, then you're bucking the trend according to a new Nielsen study. The top 10 Android apps claim about 43 percent of the average user's daily time. Android users also spend about an hour every day accessing the web and using apps on their handsets. Comparative data with iPhone users wasn't available.
A biped robot developed by DARPA and students at the University of Michigan has been programmed to sprint at varying speeds and move in the same way a human does. It can run at an average speed of 4.4 miles per hour with a top speed of 6.8, that's about 10 kilometers per hour. Called MABEL it's body weighs 65 kilograms or about 143 pounds and it could probably run faster if it slimmed down. It's also quite loud.
We've seen a number of biped robots included the famous Petman from Boston Dynamics. Like it's cousin big dog, Petman too can keep itself stable when push. With all of this research on biped robots, it's likely only a matter of time before we see a humanoid robot walking down the street with us.
MIT researchers are working on improving operations on aircraft carriers and taking an antiquated system into the 21st century. For decades the Navy has been using something they called the Ouija board to move aircraft and supplies around the deck of huge floating airports. Researchers at MIT are hoping they can digitize that system, make it more efficient and reduce any chance for error.
Jason C. Ryan, Ph.D. student, Humans & Automation Lab, MIT: "So the system we’re working with is called the deck operations course of action planner. It’s Navy funded research that is primarily investigating how humans and computers can work together and schedule operations on the aircraft carrier collaboratively. So rather than just a human or just a computer to do it it’s how we can get them to work together to use their own strengths in order to create better, more efficient and safer schedules of operation."
The DCAP system will keep track of equipment and people on a deck using RFID. Whoever is in charge of scheduling can move aircraft forward or backwards in the schedule and the entire system will adjust. It will also reschedule operations should one of the catapults that launches aircrafts stop working. The research team built a small scale model of an aircraft carrier with moving models, all controlled by the DCAP system. Ryan said he doesn’t imagine a system like DCAP going into operation for about a decade because it will need to be tested to work flawlessly under both a  controlled environment and in wartime.

Friday, July 15, 2011

Thread Concepts:

By Magesh Kumar   Posted at  9:59 PM   Android No comments
Method1:
import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.widget.Toast;


public class Method1 extends Activity {


class PrinterTask extends AsyncTask<String, Void, Void> {


protected Void doInBackground(String... x) {
while (true) {
System.out.println(x[0]);
test();


try {
Thread.sleep(1000);
test2();


} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
}
};


@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);


new PrinterTask().execute("---------------------");
//new PrinterTask().execute("foo foo foo");


System.out.println("onCreate() is done.");
}


public void test2() {
// TODO Auto-generated method stub
System.out.println("test2 is done.");
}


public void test() {
// TODO Auto-generated method stub
System.out.println("test is done.");
}
}
Method2:



import android.app.Activity;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.KeyEvent;
import android.widget.TextView;


public class Method2 extends Activity implements Runnable {


private String pi_string;
private TextView tv;
private ProgressDialog pd;


@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main2);


tv = (TextView) this.findViewById(R.id.tv);
tv.setText("Press any key to start calculation");
}


public boolean onKeyDown(int keyCode, KeyEvent event) {


pd = ProgressDialog.show(this, "Working..", "Calculating Pi", true,
false);


Thread thread = new Thread(this);

thread.start();



return super.onKeyDown(keyCode, event);
}


public void run() {
pi_string = "gfdsgs";
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
handler.sendEmptyMessage(0);
}


private Handler handler = new Handler() {
public void handleMessage(Message msg) {
pd.dismiss();
tv.setText(pi_string);


}
};


}


Async Task in Android

By Magesh Kumar   Posted at  9:41 PM   Android No comments
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;


public class AsyncTasks extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);


Button upload = (Button) findViewById(R.id.widget27);


upload.setOnClickListener(new OnClickListener() {
public void onClick(View pV) {
new DoInBackground().execute();

}
});
}


public void do_update() {

// your stuff here
Log.i("MSG", "msg");

}


private class DoInBackground extends AsyncTask<Void, Void, Void> implements
DialogInterface.OnCancelListener {
private ProgressDialog dialog;


protected void onPreExecute() {
dialog = ProgressDialog.show(AsyncTasks.this, "", "Busy...", true, true,
this);
}


protected Void doInBackground(Void... v) {
do_update();
return null;
}


protected void onPostExecute(Void v) {
dialog.dismiss();
}


public void onCancel(DialogInterface dialog) {
cancel(true);
dialog.dismiss();
}
}
}

Tuesday, June 21, 2011

Flip Animation

By Magesh Kumar   Posted at  2:37 AM   Android No comments

Main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical" android:layout_width="fill_parent"
      android:layout_height="fill_parent">
      <TextView android:layout_width="fill_parent"
            android:layout_height="wrap_content" android:text="@string/hello" />
      <ViewFlipper android:id="@+id/viewflipper"
            android:layout_width="fill_parent" android:layout_height="fill_parent">
            <LinearLayout android:layout_width="fill_parent"
                  android:layout_height="wrap_content" android:orientation="vertical">
                  <TextView android:layout_width="wrap_content"
                        android:layout_height="wrap_content" android:text="First Screen" />
                  <Button android:id="@+id/button1" android:layout_width="fill_parent"
                        android:layout_height="wrap_content" android:text="Flip to second page" />
            </LinearLayout>
            <LinearLayout android:layout_width="fill_parent"
                  android:layout_height="fill_parent" android:orientation="vertical">
                  <TextView android:layout_width="wrap_content"
                        android:layout_height="wrap_content" android:text="Second Screen" />
                  <Button android:id="@+id/button2" android:layout_width="fill_parent"
                        android:layout_height="fill_parent" android:text="Flip back" />
            </LinearLayout>
      </ViewFlipper>
</LinearLayout>

Main.java
package com.magesh;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.ViewFlipper;

public class Main extends Activity {
               
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        final ViewFlipper MyViewFlipper = (ViewFlipper)findViewById(R.id.viewflipper);
        Button button1 = (Button)findViewById(R.id.button1);
        Button button2 = (Button)findViewById(R.id.button2);

        Animation animationFlipIn  = AnimationUtils.loadAnimation(this, R.anim.flipin);
        Animation animationFlipOut = AnimationUtils.loadAnimation(this, R.anim.flipout);
        MyViewFlipper.setInAnimation(animationFlipIn);
        MyViewFlipper.setOutAnimation(animationFlipOut);
       
        button1.setOnClickListener(new Button.OnClickListener(){

                                                @Override
                                                public void onClick(View arg0) {
                                                                // TODO Auto-generated method stub
                                                                MyViewFlipper.showNext();
                                                }});
       
        button2.setOnClickListener(new Button.OnClickListener(){

                                                @Override
                                                public void onClick(View arg0) {
                                                                // TODO Auto-generated method stub
                                                                MyViewFlipper.showPrevious();
                                                }});
    }
}

In res/anim/flipin.xml
Flipin.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
      android:interpolator="@android:anim/decelerate_interpolator">
<translate
      android:fromXDelta="-100%"
      android:toXDelta="0%"
      android:duration="500" />
</set>
Flipout.xml

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
      android:interpolator="@android:anim/decelerate_interpolator">
<translate
      android:fromXDelta="0%"
      android:toXDelta="100%"
      android:duration="500" />
</set>

Monday, June 6, 2011

Gradient dividers in Android

By Magesh Kumar   Posted at  3:35 AM   Android 1 comment

Many of Android’s screens use attractive dividers with gradients that fade from black to white to black.  Here’s how to create one of your own.

1. Create a file called “black_white_gradient.xml” in /res/drawable. Paste this into it.
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
  <gradient
      android:startColor="#00000000"
      android:centerColor="#FFFFFFFF"
      android:endColor="#00000000"
      android:angle="0" />
</shape>
2. Create a view in the target layout and apply the gradient as the background.  The “black_white_gradient” in “@drawable/black_white_gradient” refers to the file name of the shape above.
<View android:id="@+id/divider"
    android:background="@drawable/black_white_gradient"
    android:layout_width="fill_parent"
    android:layout_height="1dp"
    android:layout_below="@id/someOtherThing" />

How to make a basic splash screen

By Magesh Kumar   Posted at  3:24 AM   Android No comments


Android just got splashed
Android just got splashed
The following code will show you how to create a basic splashscreen for your Android application that will stay for 5 seconds. If we don't want to wait we can tap the screen to go directly to the next Activity. Source project is on the bottom of the tutorial.

Lets go through the code to see how simple it is to make a very basic splash screen for your application.
The splashscreen will be the startup Activity for our application and on application launch a Thread will start that will listen for touch events.
01public class SplashScreen extends Activity {
02 
03    //how long until we go to the next activity
04    protected int _splashTime = 5000;
05 
06    private Thread splashTread;
07 
08    /** Called when the activity is first created. */
09    @Override
10    public void onCreate(Bundle savedInstanceState) {
11        super.onCreate(savedInstanceState);
12        setContentView(R.layout.splash);
13 
14        final SplashScreen sPlashScreen = this;
15 
16        // thread for displaying the SplashScreen
17        splashTread = new Thread() {
18            @Override
19            public void run() {
20                try {
21                    synchronized(this){
22 
23                        //wait 5 sec
24                        wait(_splashTime);
25                    }
26 
27                catch(InterruptedException e) {}
28                finally {
29                    finish();
30 
31                    //start a new activity
32                    Intent i = new Intent();
33                    i.setClass(sPlashScreen, Main.class);
34                    startActivity(i);
35 
36                    stop();
37                }
38            }
39        };
40 
41        splashTread.start();
42    }
43 
44    //Function that will handle the touch
45    @Override
46    public boolean onTouchEvent(MotionEvent event) {
47        if (event.getAction() == MotionEvent.ACTION_DOWN) {
48            synchronized(splashTread){
49                splashTread.notifyAll();
50            }
51        }
52        return true;
53    }
54 
55}

If you have questions just let me know 

Back to top ↑
Connect with Us

What they says

© 2013 MaGeSH 2 help. WP Mythemeshop Converted by BloggerTheme9
Blogger templates. Proudly Powered by Blogger.