Tuesday, December 13, 2011

MediaWorld natale sottocosto

Volantino Media World, regali in sottocosto: "Valido su tutto il territorio nazionale dal 15 al 31 di dicembre, il volantino MediaWorld presenta al suo interno un buon numero di prodotti in offerta sottocosto per un periodo limitato che va dal 15 al 24 del mese. Iniziamo subito con due prodotti molto forti venduti al prezzo decisamente aggressivo di 199 euro l’uno: il Samsung Omnia 7 i8700 e l’Asus Eee Pad Transformer TF101. Il primo è uno smartphone con Windows Phone 7, aggiornabile gratuitamente alla versione 7.5 Mango, con schermo touch da 4” Super Amoled, fotocamera da 5MP, processore da 1GHz e memoria interna da 8GB. L’Asus è invece un tablet con schermo da 10,1”, processore NVIDIA Tegra 2 dual core, Wi-Fi, memoria interna di 16GB e sistema operativo Android 3.2 Honeycomb."

ndr: l'Eee Pad è aggiornabile ad Ice Cream Sandwich (ICS)

'via Blog this'

Monday, December 12, 2011

Android development : realtime scrolling chart using apache CircularFifoBuffer

Android development : realtime scrolling chart using apache CircularFifoBuffer
Scrolling chart, code fragment written using the apache commons collection CircularFifoBuffer implementation.

Each refresh redraws the whole screen, giving the illusion of a scrolling chart without having to translate the canvas.


  import org.apache.commons.collections15.buffer.CircularFifoBuffer;
  .....
    private CircularFifoBuffer<Sample> mLocalBuffer;
    
    protected Runnable serviceConsumer = new Runnable() {

        @Override
        public void run() {
            if (!isStarted)
                return;
            synchronized (mLocalBuffer) {
                // se ha raccolto almeno un valore
                if (mService != null && mService.currentSample > 0 && !isScrolled) {
                    mScrollOffset = mService.currentSample;
                    Sample sample = mService.getSampleValue(mScrollOffset);
                    mLocalBuffer.add(sample);
                    drawSamples();
                    mReqNum++;
                }
            }
            handler.postDelayed(this, mUpdateSpeed);
        }
    };    
    .....
    
    protected void drawSamples() {
        Canvas c = new Canvas(mBitmap);
        c.drawColor(Color.BLACK);

        drawAxis();

        Paint paint = new Paint();
        if (isScrolled)
            paint.setColor(Color.GRAY);
        else
            paint.setColor(Color.GREEN);
        int lastX = 0;
        synchronized (mLocalBuffer) {
            for (Sample sample : mLocalBuffer) {
                float newY = mRect.centerY() + mScaleY
                        * (sample.values[SensorManager.DATA_Z] - SensorManager.STANDARD_GRAVITY);
                int newX = (lastX + mSpeed);
                c.drawLine(lastX, (lastX == 0 ? newY : mLastY), newX, newY, paint);
                mLastY = newY;
                lastX = newX;
            }
        }
        invalidate();
    }

    protected void drawAxis() {
        Paint paint = new Paint();
        paint.setColor(Color.WHITE);
        Canvas c = new Canvas(mBitmap);
        c.drawLine(mRectF.left, mRectF.centerY(), mRectF.right, mRectF.centerY(), paint);
        c.drawLine(mRectF.centerX(), mRectF.top, mRectF.centerX(), mRectF.bottom, paint);
    }
.....

Friday, December 2, 2011

Android platform distribution

Data collected during a 14-day period ending on December 1, 2011


Samsung Galaxy Nexus review | from TechRadar's expert reviews of Mobile phones

Samsung Galaxy Nexus review | from TechRadar's expert reviews of Mobile phones: "The Samsung Galaxy Nexus is the world's first phone to run Android 4.0 (Ice Cream Sandwich) and comes with a plethora of top end tech, including a huge but still massively high resolution screen.

There are some gadgets in geek-world that are announced and we just cannot wait to touch. Nokia's N95, the original iPhone, the T-Mobile G1 and Palm's first Pre. And the Galaxy Nexus fits firmly in that category.".....

'via Blog this'