Android Development

Rapid android development from Berlin

Browsing Posts published in May, 2009

We discussed a possibly security issue which occures because the Android design makes no difference between the installed applications.

Imagine the following situation:
You have a shopping application where you want to pay the bill using paypal. Your application maybe will start an intent who want to deal with the paypal payment. If you have a paypal application installed, this application will react on this intent and everything is fine.
What if you have a bad application installed which will also handle paypal but in the bad way? Well Android will ask you which application you want to use. Thats seems a good way to filter the bad application out.
But what if you haven’t installed the good paypal application? Right, Android won’t ask you and will start the bad application right away…
Ok, who will install a bad application on his phone? No one!
Now think about this way:
You install an application for navigation which also listen for paypal intents? You won’t notice that this application has this bad part inside.

What could be done against something like that?
Give some application unique intents? Bad “closed” idea.
Certificates for trusted usage?
Public-Private-Key stuff?

What ever, I think this is a security issue we will face sooner or later…

Please discuss with us…

  • Share/Bookmark

You are new to this series? Please start with the first part.
Also be aware of a minor bug in the last series.

The fifth part of this series will let the icons move around.
continue reading…

  • Share/Bookmark

You are new to this series? Please start with the first part.

The fourth part of the series will show you how to add more bitmaps on your screen.

First we have to add is graphic class containing a bitmap and the coordinates where it is located.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
class GraphicObject {
    private Bitmap _bitmap;
    private Coordinates _coordinates;
 
    public GraphicObject(Bitmap bitmap) {
        _bitmap = bitmap;
        _coordinates = new Coordinates();
    }
 
    public Bitmap getGraphic() {
        return _bitmap;
    }
 
    public Coordinates getCoordinates() {
        return _coordinates;
    }
 
    /**
     * Contains the coordinates of the graphic.
     */
    public class Coordinates {
        private int _x = 100;
        private int _y = 0;
 
        public int getX() {
            return _x + _bitmap.getWidth() / 2;
        }
 
        public void setX(int value) {
            _x = value - _bitmap.getWidth() / 2;
        }
 
        public int getY() {
            return _y + _bitmap.getHeight() / 2;
        }
 
        public void setY(int value) {
            _y = value - _bitmap.getHeight() / 2;
        }
 
        public String toString() {
            return "Coordinates: (" + _x + "/" + _y + ")";
        }
    }
}

continue reading…

  • Share/Bookmark

You are new to this series? Please start with the first part.

The third part of this series will add some interactivity to our little application. We will add the possibility the icon appears at the point you touch the screen.

Just to remember, we have 3 classes: Tutorial2D (our Activity class), Panel (our SurfaceView class) and TutorialThread (our Thread class).
Our interaction will be handled in our Panel class, so we must be sure, that the touch events will processed by the Panel class. To ensure that, we simply have to set the focus to our panel (line 5).

1
2
3
4
5
6
public Panel(Context context) {
    super(context);
    getHolder().addCallback(this);
    _thread = new TutorialThread(getHolder(), this);
    setFocusable(true);
}

continue reading…

  • Share/Bookmark

You are new to this series? Please start with the first part.

The second part of this series will show what you have to change to switch from using the View class to SurfaceView class.

Just to remember, our last code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.droidnova.android.tutorial2d;
 
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
 
public class Tutorial2D extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(new Panel(this));
    }
 
    class Panel extends View {
        public Panel(Context context) {
            super(context);
        }
 
        @Override
        public void onDraw(Canvas canvas) {
            Bitmap _scratch = BitmapFactory.decodeResource(getResources(), R.drawable.icon);
            canvas.drawColor(Color.BLACK);
            canvas.drawBitmap(_scratch, 10, 10, null);
        }
    }
}

continue reading…

  • Share/Bookmark

Dell plans to sell a Netbook with the Android OS.
The firm Bsquare got the task to adjust Android to the Netbook hardware and specification.

Beside Acer and HP there are now three PC manufacturers who will have PCs with Android.

Sources:
An Android Netbook From Dell?
Dell Studies Google’s Android for Future Products

  • Share/Bookmark

T-Mobile starts the rollout of the new Android 1.5 version for every G1 device out there.
First it will be only accessible if your device uses wlan. The update has a size of 30MB and will not be downloadable on your PC.
When they start to rollout the update over GSM isn’t known by now.

We will switch to Android SDK 1.5 in the next days.

  • Share/Bookmark

The first part of this series will show you, how to display an image in a normal View.

First we create a new Project with the activity named Tutorial2D.
We will see this:

1
2
3
4
5
6
7
8
9
10
11
12
13
package com.droidnova.android.tutorial2d;
 
import android.app.Activity;
import android.os.Bundle;
 
public class Tutorial2D extends Activity {
 
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}

This should look familiar to you.
continue reading…

  • Share/Bookmark
Powered by WordPress Web Design by SRS Solutions © 2010 Android Development Design by SRS Solutions