Re: [android-developers] Undocumented manifest tag

2011-04-04 Thread Dianne Hackborn
This is for system updates of applications built in to the system image.  It
is not of any use for third party applications.

On Sun, Apr 3, 2011 at 10:52 PM, Brill Pappin bpap...@sixgreen.com wrote:

 Looking through the OS source, I'm seeing places were the
 tag original-package android:name=[some.package] / is included as a
 child of manifest/.

 The tag seems to be undocumented, but it looks like it would allow the app
 to change its package name without breaking the market system.

 Does anyone have information on this tag?
 Is there a danger to using it?

 - Brill Pappin

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Refresh Imageview PLEASE HELP killing me!

2011-04-04 Thread Craig Mitchell
You need to give control back to the EDT so it can draw the image.

The for loop needs to be in a non EDT thread.


On Apr 4, 3:01 pm, Noobs41bot jspi...@gmail.com wrote:
 Ok so I have all the code in place to create a random degree of rotation
 between a start and finish... works great... i have a progress bar that i
 can pull and watch the image rotate on the screen, while i drag it... but
 when i click the button, it just sits there, and then finally shows the
 image at its last state... i want to see the image rotating just as i do
 when i drag my finger on it? what am i doing wrong! it has to be something
 simple. please help... I have tried invalidate and postinvalidate nothing...

 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
 *

 /

 Button android:text=*Button* android:id=*@+id/button1*
 android:layout_width=*wrap_content* android:layout_height=*wrap_content*

 /Button

 Spinner

 android:id=*@+id/scale
 *

 android:layout_width=*fill_parent
 *

 android:layout_height=*wrap_content
 *

 /

 SeekBar

 android:id=*@+id/rotate
 *

 android:layout_width=*fill_parent
 *

 android:layout_height=*wrap_content
 *

 android:layout_margin=*5px
 *

 android:max=*360
 *

 android:progress=*0
 *

 /

 ImageView

 android:id=*@+id/imageview
 *

 android:layout_gravity=*center
 *

 android:layout_width=*fill_parent
 *

 android:layout_height=*fill_parent
 *

 android:scaleType=*center
 *

 /

 /LinearLayout

 Main file:

 package com.exercise.AndroidBitmap;

 import java.util.Random;

 import android.app.Activity;
 import android.app.AlertDialog;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.graphics.Matrix;
 import android.os.Bundle;
 import android.util.Log;
 import android.view.View;
 import android.widget.AdapterView;
 import android.widget.ArrayAdapter;
 import android.widget.Button;
 import android.widget.ImageView;
 import android.widget.SeekBar;
 import android.widget.Spinner;

 public class AndroidBitmap extends Activity {

  //private final String imageInSD = /sdcard/er.PNG;

  ImageView myImageView;
  Spinner spinnerScale;
  SeekBar seekbarRotate;

  private static final String[] strScale
   = {0.2x, 0.5x, 1.0x, 2.0x, 5.0x};
  private static final Float[] floatScale
   = {0.2F, 0.5F, 1F, 2F, 5F};
  private final int defaultSpinnerScaleSelection = 2;

  private ArrayAdapterString adapterScale;

  private float curScale = 1F;
  private float curRotate = 0F;

  //spinning variables
  private static int ROTATETO;
  private int START = 720;
  private int END = 1440;
  Random random = new Random();

  Bitmap bitmap;
  int bmpWidth, bmpHeight;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        final Button button = (Button) findViewById(R.id.button1);        
        myImageView = (ImageView)findViewById(R.id.imageview);

        spinnerScale = (Spinner)findViewById(R.id.scale);
        seekbarRotate = (SeekBar)findViewById(R.id.rotate);

        adapterScale = new ArrayAdapterString(this,
                android.R.layout.simple_spinner_item, strScale);

 adapterScale.setDropDownViewResource(android.R.layout.simple_spinner_dropdo 
 wn_item);
        spinnerScale.setAdapter(adapterScale);
        spinnerScale.setSelection(defaultSpinnerScaleSelection);
        curScale = floatScale[defaultSpinnerScaleSelection];

       // bitmap = BitmapFactory.decodeFile(imageInSD);
        bitmap = BitmapFactory.decodeResource(getResources(),
 R.drawable.icon);
        bmpWidth = bitmap.getWidth();
        bmpHeight = bitmap.getHeight();

        drawMatrix();

 spinnerScale.setOnItemSelectedListener(spinnerScaleOnItemSelectedListener);

 seekbarRotate.setOnSeekBarChangeListener(seekbarRotateSeekBarChangeListener );

        button.setOnClickListener(new View.OnClickListener() {            
         public void onClick(View v)
         {                
          //AlertDialog.Builder builder = new
 AlertDialog.Builder(AndroidBitmap.this);
          //builder.setMessage(hi);
          ///AlertDialog alert = builder.create();
          //alert.show();

           RandomInteger(START, END, random);
     Log.d(up, Integer.toString(ROTATETO) );
     for (int i = 0; i  ROTATETO; i++)
     {
      curRotate = (float)i;
         drawMatrix();
         //myImageView.postInvalidate();
     }
         }        
         });

        }

    private void drawMatrix(){

     Matrix matrix = new Matrix();
        matrix.postScale(curScale, curScale);
        matrix.postRotate(curRotate);

        Bitmap resizedBitmap = 

[android-developers] Getting rid of white line in Tab Widget

2011-04-04 Thread AlexBonel
Didn't find any discussion of this problem in the group. How can I get
rid of the white line under tab widgets in TabActivity? And if anybody
knows I would be verry gratefull if you would also tell me how to
change background color in TabWidget?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Creating 9-patch Images on Device

2011-04-04 Thread skink


On 4 Kwi, 07:48, Matt M matthew.mag...@gmail.com wrote:
 skink,

 Thank you for your input. I have not considered Drawable, but probably
 because I do not know much about them :) What do they bring to the
 table to appropriately stretch an image like a 9patch?

 Thank you!

 Matt.


Matt,

i'm sorry i forgot you need 9-patches for app widget.

there is a problem here as RemoteViews don't support setting Drawable.

so i think - please anybody correct me if i'm wrong, you cannot set
any background et it be NinePatchDrawable or any other custom Drawable
via code at runtime - you can specify the background only in layout
file

pskink

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Enabling ProGuard in Eclipse

2011-04-04 Thread 陈彧堃
it‘s ok to append to the end, I tried.

On Wed, Jan 19, 2011 at 3:02 PM, Ted Hopp ted.h...@gmail.com wrote:

 The new documentation on ProGuard (http://developer.android.com/guide/
 developing/tools/proguard.html) says to add a line to the
 default.properties file in the project home directory. However, on
 opening this file, I read at the top:

# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!

 Am I missing something?

 It would be nice if there was a way to enable ProGuard only for a
 production build from Eclipse (i.e., when exporting the finished
 product).

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Gallery default item selected is in center

2011-04-04 Thread umakantpatil
No reply yet on this topic ?
Not even from some Android Framework developers ?

:(



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Monkeyrunner not capturing screenshot correctly

2011-04-04 Thread Diego Torres Milano
In some cases, after trial and error, I had to add up to 3 secs.

On Apr 3, 2:28 pm, SJ boris.iva...@gmail.com wrote:
 Thanks Diego.
 (Actually Im using your approach with Eclipse but on MAC. Works well.
 But not manage on Win.)

 MonkeyRunner.sleep(1.0)
 result = device.takeSnapshot()
 MonkeyRunner.sleep(1.0)

 This made me perfect screenshot.

 On Apr 2, 10:43 pm, Diego Torres Milano dtmil...@gmail.com wrote:







  Add more delay to see it this solves the problem.

  On Apr 2, 1:56 pm, SJ boris.iva...@gmail.com wrote:

   I have also seen not 100% perfect screenshot.
   There is only one function in Monkeyrunner to take Snapshots:

   com.android.monkeyrunner.MonkeyDevice.takeSnapshot
   Gets the device's screen buffer, yielding a screen capture of the
   entire display.

   Which function have you mention?

   On Mar 31, 2:31 am, lbendlin l...@bendlin.us wrote:

Are you taking the screenshots from the framebuffer? You may want to 
use a
more higher level function that will only execute when the whole screen 
is
blitted.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: adb devices returns an empty list

2011-04-04 Thread FrankG
Hello Argon,

IMHO you should switch to android-platform, as this kind of question
is out of scope of the android sdk.

And their you should provide by far more details. I.e. from where
comes
your platform, do you have the platform code, is the adbd started by
init.d,
can you see adbd using ps on the device and so on ?

Maybe your platform has no adb support ?

Good luck !  Frank





On 4 Apr., 07:08, argongold argongol...@gmail.com wrote:
 Hi,
 I've a mini MID device and I am trying to use it for development/
 debugging purpose. But after all the setting steps( see below) . I am
 still not able to get device listed when I issue  'adb devices'
 command.

 Things I have done as follows:
 1. enable USB debugging on the device under Settings-Applications-

 Development-USB debugging

 2. I have changed the following file on my computer .
 /etc/udev/rules.d/51-android.rules and added the following line.
 SUBSYSTEM==usb, SYSFS{idVendor}==18d1, ATTR{idProduct}==0001,
 SYMLINK+=android_adb, MODE=0666, OWNER=MYNAME

 (on Computer)
 Command Issued  lsusb
 Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 005 Device 002: ID 1690:0741 Askey Computer Corp. [hex]
 Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 004 Device 002: ID 062a:6301 Creative Labs
 Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 001 Device 006: ID 18d1:0001
 Bus 001 Device 003: ID 0408:1fc3 Quanta Computer, Inc.
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 Note: device is connect to usb bus at Line no. 9  above .

 (on Computer)
 Command Issued  adb devices
 * daemon not running. starting it now on port 5037 *
 * daemon started successfully *
 List of devices attached

 (on Device itself)
 Command Issued  adbd
 cannot bind 'tcp:5037'

 (on Device itself)
 Command Issued  netstat -a | grep  5037

 nothing returns from above command.

 If you have experienced such issue please let me know steps to resolve
 it.  It seems the problem is on device side for which adbd returns
 'cannot bind 'tcp:5037'

 Thanks for your strong support.

 regards,
 argon

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] ORMs for Android

2011-04-04 Thread Er. syed imran ali
Hi all,
i have to save some complex data in to database, so for that i don't
want to use sqlite3, instead of that i want to use any  ORM supported
by Android,
I found db4o, i am try to implement that, in between i want to know
from your side, is here any other ORM that Android has been supporting
and having better performance in terms of speed  execution?

Thanks
Imran ali

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Get data from EditText

2011-04-04 Thread rishabh agrawal
How to get data from EditText  how to stored in Buffer i.e Integer..

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Is CursorAdapter ok to use?

2011-04-04 Thread space
Hi!

I got an ANR in an application which used the CursorAdapter, and I
started thinking if it's allowed to be used or not.
It's pretty common to create a ListActivity (or just an Activity with
a ListView) and set a CursorAdapter as adapter to it. However when the
data set changes, the CursorAdapter gets the callback and calls
requery (of it's enabled of course). However this requery could result
in a database access, which is really bad in the main thread (like in
my case).

This is the stacktrace:

android.database.sqlite.SQLiteDatabase.lock (SQLiteDatabase.java:378)
android.database.sqlite.SQLiteQuery.fillWindow (SQLiteQuery.java:64)
android.database.sqlite.SQLiteCursor.fillWindow (SQLiteCursor.java:
287)
android.database.sqlite.SQLiteCursor.getCount (SQLiteCursor.java:268)
android.database.CursorWrapper.getCount (CursorWrapper.java:70)
android.database.MergeCursor.getCount (MergeCursor.java:61)
android.widget.CursorAdapter.getCount (CursorAdapter.java:132)
android.widget.HeaderViewListAdapter.getCount
(HeaderViewListAdapter.java:132)
android.widget.AdapterView$AdapterDataSetObserver.onChanged
(AdapterView.java:782)
android.database.DataSetObservable.notifyChanged
(DataSetObservable.java:31)
android.widget.BaseAdapter.notifyDataSetChanged (BaseAdapter.java:50)
android.widget.CursorAdapter$MyDataSetObserver.onChanged
(CursorAdapter.java:385)
android.database.DataSetObservable.notifyChanged
(DataSetObservable.java:31)
android.database.AbstractCursor.requery (AbstractCursor.java:97)
android.database.sqlite.SQLiteCursor.requery (SQLiteCursor.java:548)
android.database.CursorWrapper.requery (CursorWrapper.java:211)
android.database.MergeCursor.requery (MergeCursor.java:249)
android.widget.CursorAdapter.onContentChanged (CursorAdapter.java:361)
android.widget.CursorAdapter$ChangeObserver.onChange
(CursorAdapter.java:377)
android.database.ContentObserver$NotificationRunnable.run
(ContentObserver.java:43)
android.os.Handler.handleCallback (Handler.java:587)
android.os.Handler.dispatchMessage (Handler.java:92)
android.os.Looper.loop (Looper.java:123)
android.app.ActivityThread.main (ActivityThread.java:3701)
java.lang.reflect.Method.invokeNative
java.lang.reflect.Method.invoke (Method.java:507)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:866)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:624)
dalvik.system.NativeStart.main

So, does this mean that simply using CursorAdapter (with
autoRequery=true) is dangerous? If yes, what is the proper way to use
it?

Thanks in advance!
/Pal Szasz

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Get data from EditText

2011-04-04 Thread Zsolt Vasvari
Yes.

On Apr 4, 3:36 pm, rishabh agrawal android.rish...@gmail.com wrote:
 How to get data from EditText  how to stored in Buffer i.e Integer..

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Problem in setting Camera in 3D Android using opengles

2011-04-04 Thread Atul Prakash
hii

m working on android 3D animation..i need to rotate my camera
settings..using GLSURFACEVIEW i set up a viewport and frustum...now i
want to rotate my camera in scene ...for that i need matrix of each
object and of camera too...can anybody suggest any method so that i
can render my scene from any view i want...source code will be really
helpful

thanks...

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Android app download stats not updating

2011-04-04 Thread SendOutEmails
Yes, im seeing no data for all my apps now for the last 5 days.

It would be good to have a solid update. Please!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Is CursorAdapter ok to use?

2011-04-04 Thread Kostya Vasilyev
Reading should be Ok, perhaph there is something unusual going on in your
code?

The last function on the stack is SqliteDatabase.lock - do you perhaps have
a background thread that also locks the database for a long time?

-- Kostya

2011/4/4 space pal.sz...@gmail.com

 Hi!

 I got an ANR in an application which used the CursorAdapter, and I
 started thinking if it's allowed to be used or not.
 It's pretty common to create a ListActivity (or just an Activity with
 a ListView) and set a CursorAdapter as adapter to it. However when the
 data set changes, the CursorAdapter gets the callback and calls
 requery (of it's enabled of course). However this requery could result
 in a database access, which is really bad in the main thread (like in
 my case).

 This is the stacktrace:

 android.database.sqlite.SQLiteDatabase.lock (SQLiteDatabase.java:378)
 android.database.sqlite.SQLiteQuery.fillWindow (SQLiteQuery.java:64)
 android.database.sqlite.SQLiteCursor.fillWindow (SQLiteCursor.java:
 287)
 android.database.sqlite.SQLiteCursor.getCount (SQLiteCursor.java:268)
 android.database.CursorWrapper.getCount (CursorWrapper.java:70)
 android.database.MergeCursor.getCount (MergeCursor.java:61)
 android.widget.CursorAdapter.getCount (CursorAdapter.java:132)
 android.widget.HeaderViewListAdapter.getCount
 (HeaderViewListAdapter.java:132)
 android.widget.AdapterView$AdapterDataSetObserver.onChanged
 (AdapterView.java:782)
 android.database.DataSetObservable.notifyChanged
 (DataSetObservable.java:31)
 android.widget.BaseAdapter.notifyDataSetChanged (BaseAdapter.java:50)
 android.widget.CursorAdapter$MyDataSetObserver.onChanged
 (CursorAdapter.java:385)
 android.database.DataSetObservable.notifyChanged
 (DataSetObservable.java:31)
 android.database.AbstractCursor.requery (AbstractCursor.java:97)
 android.database.sqlite.SQLiteCursor.requery (SQLiteCursor.java:548)
 android.database.CursorWrapper.requery (CursorWrapper.java:211)
 android.database.MergeCursor.requery (MergeCursor.java:249)
 android.widget.CursorAdapter.onContentChanged (CursorAdapter.java:361)
 android.widget.CursorAdapter$ChangeObserver.onChange
 (CursorAdapter.java:377)
 android.database.ContentObserver$NotificationRunnable.run
 (ContentObserver.java:43)
 android.os.Handler.handleCallback (Handler.java:587)
 android.os.Handler.dispatchMessage (Handler.java:92)
 android.os.Looper.loop (Looper.java:123)
 android.app.ActivityThread.main (ActivityThread.java:3701)
 java.lang.reflect.Method.invokeNative
 java.lang.reflect.Method.invoke (Method.java:507)
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
 (ZygoteInit.java:866)
 com.android.internal.os.ZygoteInit.main (ZygoteInit.java:624)
 dalvik.system.NativeStart.main

 So, does this mean that simply using CursorAdapter (with
 autoRequery=true) is dangerous? If yes, what is the proper way to use
 it?

 Thanks in advance!
 /Pal Szasz

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] HDMI out API

2011-04-04 Thread dasorin2000
There is some API to handle HDMI out screen in Android or is just a
copy of original device display?


Thanks
Sorin

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] WebView as map

2011-04-04 Thread hEngi
Hi,
I'm new in android.
I'd like to use a picture as a map. The easiest way is WebView. There
is zoom and i can pull the image etc. But i have a problem. I cannot
use my picture from res/drawable. I need to store it in the phone
cause i need an url to it. Is there any way to load picture from res/
drawable? If there isnt can i upload my picture to the phone when i
install my api?
Sry for my newbie question ^^
Thanks,
David

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Is CursorAdapter ok to use?

2011-04-04 Thread space
Yes, there is another thread, doing DB access as well. But I'm
wondering about the general case: in general, doing any DB access
(even queries/reads) can cause ANRs (the filesystem can be blocked,
another thread or even another process could access the same DB, etc).
So the question is: is CursorAdapter safe or not? Or what is the
proper way of using it?

/Pal

On Apr 4, 10:08 am, Kostya Vasilyev kmans...@gmail.com wrote:
 Reading should be Ok, perhaph there is something unusual going on in your
 code?

 The last function on the stack is SqliteDatabase.lock - do you perhaps have
 a background thread that also locks the database for a long time?

 -- Kostya

 2011/4/4 space pal.sz...@gmail.com







  Hi!

  I got an ANR in an application which used the CursorAdapter, and I
  started thinking if it's allowed to be used or not.
  It's pretty common to create a ListActivity (or just an Activity with
  a ListView) and set a CursorAdapter as adapter to it. However when the
  data set changes, the CursorAdapter gets the callback and calls
  requery (of it's enabled of course). However this requery could result
  in a database access, which is really bad in the main thread (like in
  my case).

  This is the stacktrace:

  android.database.sqlite.SQLiteDatabase.lock (SQLiteDatabase.java:378)
  android.database.sqlite.SQLiteQuery.fillWindow (SQLiteQuery.java:64)
  android.database.sqlite.SQLiteCursor.fillWindow (SQLiteCursor.java:
  287)
  android.database.sqlite.SQLiteCursor.getCount (SQLiteCursor.java:268)
  android.database.CursorWrapper.getCount (CursorWrapper.java:70)
  android.database.MergeCursor.getCount (MergeCursor.java:61)
  android.widget.CursorAdapter.getCount (CursorAdapter.java:132)
  android.widget.HeaderViewListAdapter.getCount
  (HeaderViewListAdapter.java:132)
  android.widget.AdapterView$AdapterDataSetObserver.onChanged
  (AdapterView.java:782)
  android.database.DataSetObservable.notifyChanged
  (DataSetObservable.java:31)
  android.widget.BaseAdapter.notifyDataSetChanged (BaseAdapter.java:50)
  android.widget.CursorAdapter$MyDataSetObserver.onChanged
  (CursorAdapter.java:385)
  android.database.DataSetObservable.notifyChanged
  (DataSetObservable.java:31)
  android.database.AbstractCursor.requery (AbstractCursor.java:97)
  android.database.sqlite.SQLiteCursor.requery (SQLiteCursor.java:548)
  android.database.CursorWrapper.requery (CursorWrapper.java:211)
  android.database.MergeCursor.requery (MergeCursor.java:249)
  android.widget.CursorAdapter.onContentChanged (CursorAdapter.java:361)
  android.widget.CursorAdapter$ChangeObserver.onChange
  (CursorAdapter.java:377)
  android.database.ContentObserver$NotificationRunnable.run
  (ContentObserver.java:43)
  android.os.Handler.handleCallback (Handler.java:587)
  android.os.Handler.dispatchMessage (Handler.java:92)
  android.os.Looper.loop (Looper.java:123)
  android.app.ActivityThread.main (ActivityThread.java:3701)
  java.lang.reflect.Method.invokeNative
  java.lang.reflect.Method.invoke (Method.java:507)
  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
  (ZygoteInit.java:866)
  com.android.internal.os.ZygoteInit.main (ZygoteInit.java:624)
  dalvik.system.NativeStart.main

  So, does this mean that simply using CursorAdapter (with
  autoRequery=true) is dangerous? If yes, what is the proper way to use
  it?

  Thanks in advance!
  /Pal Szasz

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Is CursorAdapter ok to use?

2011-04-04 Thread Kostya Vasilyev
I've never had an issue with reading on the UI thread, and even doing an
occasional small update (and my current project does use a database and
content providers quite a bit).

Speficially, CursorAdapter is intended to be used from the UI thread - its
data fetching callbacks, getCount, getItemId, etc. - are typically called by
ListView or some other AdapterView, and so run on the UI thread.

On the other hand, if you are locking the database somewhere else, this can
interfere with the above data access, which I believe is what's happening in
your code. Can you change how your worker threads write to the database, so
it takes less time?

And why would you have another *process* accessing the database?

-- Kostya

2011/4/4 space pal.sz...@gmail.com

 Yes, there is another thread, doing DB access as well. But I'm
 wondering about the general case: in general, doing any DB access
 (even queries/reads) can cause ANRs (the filesystem can be blocked,
 another thread or even another process could access the same DB, etc).
 So the question is: is CursorAdapter safe or not? Or what is the
 proper way of using it?

 /Pal

 On Apr 4, 10:08 am, Kostya Vasilyev kmans...@gmail.com wrote:
  Reading should be Ok, perhaph there is something unusual going on in your
  code?
 
  The last function on the stack is SqliteDatabase.lock - do you perhaps
 have
  a background thread that also locks the database for a long time?
 
  -- Kostya
 
  2011/4/4 space pal.sz...@gmail.com
 
 
 
 
 
 
 
   Hi!
 
   I got an ANR in an application which used the CursorAdapter, and I
   started thinking if it's allowed to be used or not.
   It's pretty common to create a ListActivity (or just an Activity with
   a ListView) and set a CursorAdapter as adapter to it. However when the
   data set changes, the CursorAdapter gets the callback and calls
   requery (of it's enabled of course). However this requery could result
   in a database access, which is really bad in the main thread (like in
   my case).
 
   This is the stacktrace:
 
   android.database.sqlite.SQLiteDatabase.lock (SQLiteDatabase.java:378)
   android.database.sqlite.SQLiteQuery.fillWindow (SQLiteQuery.java:64)
   android.database.sqlite.SQLiteCursor.fillWindow (SQLiteCursor.java:
   287)
   android.database.sqlite.SQLiteCursor.getCount (SQLiteCursor.java:268)
   android.database.CursorWrapper.getCount (CursorWrapper.java:70)
   android.database.MergeCursor.getCount (MergeCursor.java:61)
   android.widget.CursorAdapter.getCount (CursorAdapter.java:132)
   android.widget.HeaderViewListAdapter.getCount
   (HeaderViewListAdapter.java:132)
   android.widget.AdapterView$AdapterDataSetObserver.onChanged
   (AdapterView.java:782)
   android.database.DataSetObservable.notifyChanged
   (DataSetObservable.java:31)
   android.widget.BaseAdapter.notifyDataSetChanged (BaseAdapter.java:50)
   android.widget.CursorAdapter$MyDataSetObserver.onChanged
   (CursorAdapter.java:385)
   android.database.DataSetObservable.notifyChanged
   (DataSetObservable.java:31)
   android.database.AbstractCursor.requery (AbstractCursor.java:97)
   android.database.sqlite.SQLiteCursor.requery (SQLiteCursor.java:548)
   android.database.CursorWrapper.requery (CursorWrapper.java:211)
   android.database.MergeCursor.requery (MergeCursor.java:249)
   android.widget.CursorAdapter.onContentChanged (CursorAdapter.java:361)
   android.widget.CursorAdapter$ChangeObserver.onChange
   (CursorAdapter.java:377)
   android.database.ContentObserver$NotificationRunnable.run
   (ContentObserver.java:43)
   android.os.Handler.handleCallback (Handler.java:587)
   android.os.Handler.dispatchMessage (Handler.java:92)
   android.os.Looper.loop (Looper.java:123)
   android.app.ActivityThread.main (ActivityThread.java:3701)
   java.lang.reflect.Method.invokeNative
   java.lang.reflect.Method.invoke (Method.java:507)
   com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
   (ZygoteInit.java:866)
   com.android.internal.os.ZygoteInit.main (ZygoteInit.java:624)
   dalvik.system.NativeStart.main
 
   So, does this mean that simply using CursorAdapter (with
   autoRequery=true) is dangerous? If yes, what is the proper way to use
   it?
 
   Thanks in advance!
   /Pal Szasz
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You 

[android-developers] to implement a gallery getting resource from a webservice

2011-04-04 Thread Pinkesh Gupta
hi

i am new to android

i am implementing  a gallery from  the imageurl  that

i have obtained after parsing the .net web service using soap

the code which i had implement is as follows:

package com.WikiFun;

import java.io.InputStream;
import java.net.URL;
import com.WikiFun.AddPicture.ImageAdapter.placeDetailHolder;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.Gallery;
import android.widget.ImageView;
import android.widget.Toast;


public class AddPicture extends Activity implements OnClickListener
{

Button bacbtn;
String Article_intro;
Gallery gallaery;
GetFunspotPicturesResponse [] gec;
placeDetailHolder plh;
ImageView imageView;


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

//ListView list1 = (ListView)findViewById(R.id.ListView01);
bacbtn =(Button)findViewById(R.id.view1_backbtn);
gallaery=(Gallery)findViewById(R.id.gallery1);
bacbtn.setOnClickListener(this);
Intent i = getIntent();
int Articleid = i.getIntExtra(articleid, -1);
Article_intro = i.getStringExtra(article_intro);
ServiceCaller ser = new ServiceCaller();
if(DataContainer.firstList1 ==null)
{
DataContainer.firstList1 = ser.getpicture(Articleid);
}

gec = DataContainer.firstList1;
gallaery.setAdapter(new ImageAdapter(this, gec));

gallaery.setOnItemClickListener(new OnItemClickListener()
{
public void onItemClick(AdapterView? parent, View v, 
int
position, long id)
{

System.out.println(fsdfsd);
//plh.imageView.setImageResource();
;}

  });
//gallaery.setAdapter(new ImageAdapter(this, gec));

}

@Override
public void onCreateContextMenu(ContextMenu menu, View v,
ContextMenuInfo menuInfo) {
menu.add(R.string.hello);
}

@Override
public boolean onContextItemSelected(MenuItem item)
{
AdapterContextMenuInfo info = (AdapterContextMenuInfo)
item.getMenuInfo();
Toast.makeText(this, Longpress:  + info.position,
Toast.LENGTH_SHORT).show();
return true;
}



@Override
public void onClick(View v)
{
Intent i = new Intent(this,FunSpotDetail.class);
this.startActivity(i);

}

public class ImageAdapter extends BaseAdapter
{
private static final int ITEM_WIDTH = 136;
private static final int ITEM_HEIGHT =88;

int mGalleryItemBackground;
Context mContext;

GetFunspotPicturesResponse[] mImageIds;
private final float mDensity;
public String[] stringArray1;

public ImageAdapter(Context c,GetFunspotPicturesResponse[] gec)
{
mImageIds=gec;
mContext = c;

TypedArray a =
obtainStyledAttributes(R.styleable.GalleryTheme);
mGalleryItemBackground =
a.getResourceId(R.styleable.GalleryTheme_android_galleryItemBackground,
0 );
a.recycle();

mDensity = c.getResources().getDisplayMetrics().density;
}

public int getCount()
{
return mImageIds.length;
}

public Object getItem(int position)
{
return position;
}

public long getItemId(int position)
{
return position;
}

public View getView(int position, View convertView, ViewGroup
parent)
{

GetFunspotPicturesResponse gc = 
this.mImageIds[position];

if(convertView==null)
{
plh = new placeDetailHolder();
convertView = new ImageView(mContext);
plh.imageView = (ImageView) convertView;


[android-developers] Regarding security of the framework 2

2011-04-04 Thread madushanka
What is the best file encryption mechanism should use with android OS?
symmetric algorithms(DES, AES, Blowfish) or asymmetric algorithms
(RSA, DSA, PGP). ?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: does NFC in gingerbread support card simulate?

2011-04-04 Thread Michael Roland
Hallo Zhihong,

I'm not sure what function you mean. In the Tags app i see a tab
called My tag where you can share your tag with other Android phones
(or any device that supports Android's non-standard way of exchanging
NDEF messages over LLCP). If that's what you mean, that's not card/tag
emulation but Peer-to-peer mode (for direct communication between two
NFC devices).

br
Michael


On 02.04.2011 11:21 Zhihong GUO wrote:
 Hi Michael,
 
 The Tag application on Gingerbread have a fouction called smart poster,
 is it the card simulation? or just a tag emulation.
 
 Thanks
 
 
 
 2011/3/23 nadam a...@anyro.se mailto:a...@anyro.se
 
 There seems to be some work-around though using undocumented features.
 http://www.youtube.com/watch?v=28TwCpx4Dng
 
 On 23 mar, 16:03, Michael Roland mi.rol...@gmail.com
 mailto:mi.rol...@gmail.com wrote:
  Hallo,
 
  the current SDK does not allow you to use card emulation.
 
  Anyways, with card *emulation* you will not be able to simulate an
  *NFC tag* (i.e. a tag where you store simple NDEF messages). Card
  emulation mode allows to emulate a contactless smartcard (typically
  used for applications with high security requirements, like credit
  cards). While such a card (emulated or real) can be used to carry NDEF
  messages, I really doubt that this possibility will be made available
  for the Android phones.
 
  br,
  Michael
 
  On Mar 23, 5:14 am, Zhihong GUO gzhh...@gmail.com
 mailto:gzhh...@gmail.com wrote:
 
 
 
 
 
 
 
   Hi all,
 
   about NFC in Gingerbread, is it possible to simulate a tag by
 the SDK? I
   have found the support for tag read/write and P2P push message,
 but haven't
   found any support on card simulate.
 
   thanks
 
   James
 
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
 android-developers@googlegroups.com
 mailto:android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 mailto:android-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Regarding security of the framework 2

2011-04-04 Thread Marcin Orlowski
On 4 April 2011 11:03, madushanka chamilhewag...@gmail.com wrote:

 What is the best file encryption mechanism should use with android OS?
 symmetric algorithms(DES, AES, Blowfish) or asymmetric algorithms
 (RSA, DSA, PGP). ?


Algorithms are usually NOT implementation dependent - crypto one are generic
and independent on implementetion. Use that one that fits your needs best
(complexity vs. security vs. processing costs)

PS: PGP/GPG is not crypto algorithm

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Start Dialer with delay

2011-04-04 Thread viktor
Hi,

My issue is that need to show in Dialer correct number when incoming
call, just trick number in Dialer.

I tried to add temp contact to contacts DB, but Dialer doesn't sync
the contact!?
Is it possible to start Dialer with some delay or deny starting and
then restart it?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: in-app billing problems

2011-04-04 Thread Peter
I discovered the same. You need a production signed apk on your device
to test this. I also saw that you are charged for testing this. But
you can refund the money later, so that shouldn't be a problem.
Actually I don't get why I need to create a test account for testing
this, because everything is the same as with a non-testing-account. Or
I'm I wrong her?

Peter


On Apr 2, 9:30 pm, Tony t...@smartmobilesolutions.com wrote:
 Update : after one day and a half, I am trying my code again and this
 time everything works :-). So I guess it is my fault to try something
 right after the announcement... :-)

 Two notes, though :

 1) you need to have a real credit card assigned to your google test
 account (and you will be charged for real when you do the test
 purchases). Keep this in mind...

 2) you need to deploy the production-signed apk on the test device,
 when you test against themarket. So export a production signedversionfrom 
 Eclipse, upload it as a draft on theMarket, create/
 modify your in-apps items on themarket, publish them. Then deploy the
 same apk on the test device with test google account and do the
 testing.

 Anyway, it's fine now. Guys, thanks for the comments and good luck :-)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: in-app billing problems

2011-04-04 Thread Kostya Vasilyev
A test account lets you make purchases with your actual product ids, as a
final test, before you publish the application. I don't think you can do
this with any other account.
 04.04.2011 13:34 пользователь Peter peter.fort...@gmail.com написал:
 I discovered the same. You need a production signed apk on your device
 to test this. I also saw that you are charged for testing this. But
 you can refund the money later, so that shouldn't be a problem.
 Actually I don't get why I need to create a test account for testing
 this, because everything is the same as with a non-testing-account. Or
 I'm I wrong her?

 Peter


 On Apr 2, 9:30 pm, Tony t...@smartmobilesolutions.com wrote:
 Update : after one day and a half, I am trying my code again and this
 time everything works :-). So I guess it is my fault to try something
 right after the announcement... :-)

 Two notes, though :

 1) you need to have a real credit card assigned to your google test
 account (and you will be charged for real when you do the test
 purchases). Keep this in mind...

 2) you need to deploy the production-signed apk on the test device,
 when you test against themarket. So export a production signedversionfrom
Eclipse, upload it as a draft on theMarket, create/
 modify your in-apps items on themarket, publish them. Then deploy the
 same apk on the test device with test google account and do the
 testing.

 Anyway, it's fine now. Guys, thanks for the comments and good luck :-)

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Tansition between two Images.

2011-04-04 Thread Aditya
Hello,
I need to keep an image in background and rotate or do any other animation
on top of that with another image.
But I cant keep any image in background.

Can any one please help me?

Thanks
Aditya.


--
private void createAnim(Canvas canvas) {
  setBackgroundDrawable(getResources().getDrawable(R.drawable.ars));
  System.out.println();
  anim = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f,
Animation.RELATIVE_TO_SELF, 0.0f,
 Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF, 0.0f

);

  anim1 = new RotateAnimation(0, 360, canvas.getWidth() / 2, canvas
.getHeight() / 2);
  anim.setRepeatMode(Animation.ZORDER_BOTTOM);
  anim.setDuration(1L);
  anim1.setDuration(1L);
  startAnimation(anim1);

 }
 protected void onDraw(Canvas canvas) {
  int centerX = canvas.getWidth() / 2;
  int centerY = canvas.getHeight() / 2;
  setBackgroundDrawable(getResources().getDrawable(R.drawable.ars));
  canvas.drawBitmap(jobs1, centerX - jobsXOffset1,centerY - jobsYOffset1,
null);
  Paint paint = new Paint();
paint.setColor(Color.WHITE);
if (anim == null) {
   createAnim(canvas);
  }
}
--

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Tansition between two Images.

2011-04-04 Thread Raghav Sood
Hi,

If the background image is literally a background you could set it in XML
using android:background=@dfrawable/whatever. If it is for a small portion
of the screen you could put it in an image view and draw the animation on
top of it.

On Mon, Apr 4, 2011 at 3:21 PM, Aditya dabhaga...@gmail.com wrote:

 Hello,
 I need to keep an image in background and rotate or do any other animation
 on top of that with another image.
 But I cant keep any image in background.

 Can any one please help me?

 Thanks
 Aditya.



 --
 private void createAnim(Canvas canvas) {
   setBackgroundDrawable(getResources().getDrawable(R.drawable.ars));
   System.out.println();
   anim = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f,
 Animation.RELATIVE_TO_SELF, 0.0f,
  Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF,
 0.0f

 );

   anim1 = new RotateAnimation(0, 360, canvas.getWidth() / 2, canvas
 .getHeight() / 2);
   anim.setRepeatMode(Animation.ZORDER_BOTTOM);
   anim.setDuration(1L);
   anim1.setDuration(1L);
   startAnimation(anim1);

  }
  protected void onDraw(Canvas canvas) {
   int centerX = canvas.getWidth() / 2;
   int centerY = canvas.getHeight() / 2;
   setBackgroundDrawable(getResources().getDrawable(R.drawable.ars));
   canvas.drawBitmap(jobs1, centerX - jobsXOffset1,centerY - jobsYOffset1,
 null);
   Paint paint = new Paint();
 paint.setColor(Color.WHITE);
 if (anim == null) {
createAnim(canvas);
   }
 }

 --

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.com/
http://www.telstop.tel/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] read character unicode form sqlite

2011-04-04 Thread thavorac chun
Hi everyone,
I'm working with sqlite right now and at this this moment i found a
problem related to reading data from sqlite that i can not solve it.
For example i have a french word  Hôtel  that have been insearted to
database and after reading it to represent in device, it turn to  HÃÂ
´tel  that is totally wrong from what it was. Any ideas are
appreciated.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] read character unicode form sqlite

2011-04-04 Thread Kostya Vasilyev
Sqlite on Android is definitely Unicode aware and safe. Make sure you store
and retrieve your data as Java String objects (not byte arrays).
04.04.2011 14:00 пользователь thavorac chun thavorac.c...@gmail.com
написал:
 Hi everyone,
 I'm working with sqlite right now and at this this moment i found a
 problem related to reading data from sqlite that i can not solve it.
 For example i have a french word  Hôtel  that have been insearted to
 database and after reading it to represent in device, it turn to  HÃÂ
 ´tel  that is totally wrong from what it was. Any ideas are
 appreciated.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Tansition between two Images.

2011-04-04 Thread Aditya
Thanks for the response, But am looking something to be done in code itself,
not in xml.

On Mon, Apr 4, 2011 at 3:27 PM, Raghav Sood raghavs...@gmail.com wrote:

 Hi,

 If the background image is literally a background you could set it in XML
 using android:background=@dfrawable/whatever. If it is for a small portion
 of the screen you could put it in an image view and draw the animation on
 top of it.

   On Mon, Apr 4, 2011 at 3:21 PM, Aditya dabhaga...@gmail.com wrote:

   Hello,
 I need to keep an image in background and rotate or do any other animation
 on top of that with another image.
 But I cant keep any image in background.

 Can any one please help me?

 Thanks
 Aditya.



 --
 private void createAnim(Canvas canvas) {
   setBackgroundDrawable(getResources().getDrawable(R.drawable.ars));
   System.out.println();
   anim = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f,
 Animation.RELATIVE_TO_SELF, 0.0f,
  Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF,
 0.0f

 );

   anim1 = new RotateAnimation(0, 360, canvas.getWidth() / 2, canvas
 .getHeight() / 2);
   anim.setRepeatMode(Animation.ZORDER_BOTTOM);
   anim.setDuration(1L);
   anim1.setDuration(1L);
   startAnimation(anim1);

  }
  protected void onDraw(Canvas canvas) {
   int centerX = canvas.getWidth() / 2;
   int centerY = canvas.getHeight() / 2;
   setBackgroundDrawable(getResources().getDrawable(R.drawable.ars));
   canvas.drawBitmap(jobs1, centerX - jobsXOffset1,centerY - jobsYOffset1,
 null);
   Paint paint = new Paint();
 paint.setColor(Color.WHITE);
 if (anim == null) {
createAnim(canvas);
   }
 }

 --

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 --
 Raghav Sood
 http://www.raghavsood.com/
 http://www.androidappcheck.com/
 http://www.telstop.tel/

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Tansition between two Images.

2011-04-04 Thread Raghav Sood
You could use
http://developer.android.com/reference/android/view/View.html#setBackgroundResource(int)

On Mon, Apr 4, 2011 at 4:01 PM, Aditya dabhaga...@gmail.com wrote:

 Thanks for the response, But am looking something to be done in code
 itself, not in xml.


 On Mon, Apr 4, 2011 at 3:27 PM, Raghav Sood raghavs...@gmail.com wrote:

 Hi,

 If the background image is literally a background you could set it in XML
 using android:background=@dfrawable/whatever. If it is for a small portion
 of the screen you could put it in an image view and draw the animation on
 top of it.

   On Mon, Apr 4, 2011 at 3:21 PM, Aditya dabhaga...@gmail.com wrote:

   Hello,
 I need to keep an image in background and rotate or do any other
 animation on top of that with another image.
 But I cant keep any image in background.

 Can any one please help me?

 Thanks
 Aditya.



 --
 private void createAnim(Canvas canvas) {
   setBackgroundDrawable(getResources().getDrawable(R.drawable.ars));
   System.out.println();
   anim = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f,
 Animation.RELATIVE_TO_SELF, 0.0f,
  Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF,
 0.0f

 );

   anim1 = new RotateAnimation(0, 360, canvas.getWidth() / 2, canvas
 .getHeight() / 2);
   anim.setRepeatMode(Animation.ZORDER_BOTTOM);
   anim.setDuration(1L);
   anim1.setDuration(1L);
   startAnimation(anim1);

  }
  protected void onDraw(Canvas canvas) {
   int centerX = canvas.getWidth() / 2;
   int centerY = canvas.getHeight() / 2;
   setBackgroundDrawable(getResources().getDrawable(R.drawable.ars));
   canvas.drawBitmap(jobs1, centerX - jobsXOffset1,centerY - jobsYOffset1,
 null);
   Paint paint = new Paint();
 paint.setColor(Color.WHITE);
 if (anim == null) {
createAnim(canvas);
   }
 }

 --

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 --
 Raghav Sood
 http://www.raghavsood.com/
 http://www.androidappcheck.com/
 http://www.telstop.tel/

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.com/
http://www.telstop.tel/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: WebView as map

2011-04-04 Thread hEngi
Maybe i will use assets folder^^

On Apr 4, 10:28 am, hEngi unnam...@gmail.com wrote:
 Hi,
 I'm new in android.
 I'd like to use a picture as a map. The easiest way is WebView. There
 is zoom and i can pull the image etc. But i have a problem. I cannot
 use my picture from res/drawable. I need to store it in the phone
 cause i need an url to it. Is there any way to load picture from res/
 drawable? If there isnt can i upload my picture to the phone when i
 install my api?
 Sry for my newbie question ^^
 Thanks,
 David

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Android horizontal scroll list like Gallery

2011-04-04 Thread umakantpatil
Hey,

I want horizontal scroll like Gallery. Im not using Gallery because its 
center locked.

Can some one here would help me out with this So I can have horizontal 
scrolling list?

I think best example of this is pulse news reader :-
https://market.android.com/details?id=com.alphonso.pulse

Thanks :)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Market Statistics not working

2011-04-04 Thread Manuel R. Ciosici
Hello,

Since April 1 I can't view statistics for one of my apps and for the
other I only get statistics up to March 1. I've also been experiencing
weird error messages saying that I can't have access to the
information since I don't own the apps and Error 404 when I access the
developer dashboard.

Has anyone experienced something like this before?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] hide top alternative keys on soft keyboard

2011-04-04 Thread Rich E
Hi all,

I was wondering if it is possible to hide the top 'alternative' keys (!, ?,
, ', :, all in yellow) on the soft keyboard before showing it.  I would
like to conserve as much space as possible and as these keys would never be
used in this specific case, it would be great if I could tell android to
hide them.

This layout is from my Nexus S phone.

Thanks,
Rich

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: (File export) What's going on with my code?[NEED HELP]

2011-04-04 Thread Alaeddine Ghribi
So i maked this:
catch(FileNotFoundException ex){
 Toast.makeText(context, File Not found, Toast.LENGTH_SHORT).show();
 String x=ex.getMessage();
 Log.d(Carburant, x);
}

Here is the message i get:
04-04 11:07:20.851: DEBUG/Carburant(377): /alaa.peugeot.settings.dat (No
such file or directory)

So as the log indicated, the compiler doesn't finds the file in the
/data/data...
I maked one other thing, in the copyfile function i maked this:
copyfile(context,*data/data/
carburant.android.com/files/alaa.peugeot.settings.dat*,sdCard.getAbsolutePath()
+ /SDCARD/Carburant/storeddata.dat);

The log message now indicates this:
04-04 11:11:32.771: DEBUG/Carburant(852):
/mnt/sdcard/SDCARD/Carburant/storeddata.dat (Permission denied)

Let's begin to correct the first message :\
Every user will put its name and car mark, so this 2 variables are not
constant!
So, in the menu export code i maked this:
 case R.id.exporter:
 final SharedPreferences preferences = PreferenceManager
 .getDefaultSharedPreferences(context);
String fileName = getResources().getString(R.string.fileName);
 fileDir =  + preferences.getString(login, ) + .+
preferences.getString(marque, ) + .;
Import myImport = new Import(this,fileDir+fileName);
//Import myImport(this, fileDir+fileName);
 myImport.transfer();
 return true;

I think that the problem comes from the red line, it's a comment because i
always have an error message on it, but i think that this line can make the
problem solved, we have to import in the import function the filedir and
filename, without this line, nothing imported = it can't find the file in
the /data/data...

So please what can i put to import the necessary variables to the import
function(in the other class).
Thank you.



2011/4/4 TreKing treking...@gmail.com

 On Sun, Apr 3, 2011 at 9:11 PM, Alaeddine Ghribi 
 alaeddineghr...@gmail.com wrote:

 So i put a breakpoint in the catch line and in the debugger i think that i
 have the right variables:


 Put a break at the *start* of your code and *step through* line by line
 until you hit the line that causes the exception.

 OR

 Print the message the exception gives you (ex.getMessage()) to find out
 what file is giving the error.



 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Android Layouts Are Horrible

2011-04-04 Thread Mike dg
Maybe you should try a ListView instead.

On Apr 4, 1:01 am, grndvl1 grnd...@gmail.com wrote:
 Why is it I spend more time dealing with the layout of items than the
 actual coding of the program?  The Eclipse Graphical Layout tool
 really blows as it has a ton of errors and can't handle simple things
 like italic text in textview, scrollviews...  The layout parameters
 seem to be a hodge-podge of stuff thrown in there as an after thought,
 seems it wasn't really planned out.  They should have taken a lesson
 from Java's crappy Gridbag layout  and used or at least analyzed how
 Miglayout fixed many issues with Java GUI's.  I won't use any other
 layout manager other than Miglayout.  Anyway just venting here as I
 spent the last 1hr fixing something that should be so simple in a
 Scrollview/TableLayout/TableRow with ImageView and TextView in each
 row.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] read character unicode form sqlite

2011-04-04 Thread lbendlin
It doesn't actually matter how you store it as under the hood SQLite stores 
everything as string. You can dso dirty type conversion tricks when reading.
 
From my experience SQLite uses ANSI strings though so in order to read your 
Unicode data back you actually have to use byte arrays for reading, and then 
convert the byte array to unicode string. What the OP showed is an example 
of two bytes per character, misrepresented as an ANSI string.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: (File export) What's going on with my code?[NEED HELP]

2011-04-04 Thread Kostya Vasilyev
A few things.

1 - For the target file, don't use SDCARD in your paths.
Environment.getExternalStorageDirectory already gives you the path to the
top-level directory (root) of the memory card.

Android 2.2 uses a path that's different from earlier versions, and you can
rely on this function to do right thing.

2 - For the source file, use this:

http://developer.android.com/reference/android/content/Context.html#openFileInput(java.lang.String
)

or

http://developer.android.com/reference/android/content/Context.html#openFileOutput(java.lang.String,
int)

Do not try to build the full path yourself (as in,
/data/data/package_name/files) - the path can be different depending on
the device and its Android version. The above functions already take care of
that.

You already have code to read your data files (to populate the list view),
just do it the same way.

-- Kostya

2011/4/4 Alaeddine Ghribi alaeddineghr...@gmail.com

 So i maked this:
 catch(FileNotFoundException ex){
  Toast.makeText(context, File Not found, Toast.LENGTH_SHORT).show();
  String x=ex.getMessage();
  Log.d(Carburant, x);
 }

 Here is the message i get:
 04-04 11:07:20.851: DEBUG/Carburant(377): /alaa.peugeot.settings.dat (No
 such file or directory)

 So as the log indicated, the compiler doesn't finds the file in the
 /data/data...
 I maked one other thing, in the copyfile function i maked this:
 copyfile(context,*data/data/
 carburant.android.com/files/alaa.peugeot.settings.dat*,sdCard.getAbsolutePath()
 + /SDCARD/Carburant/storeddata.dat);

 The log message now indicates this:
 04-04 11:11:32.771: DEBUG/Carburant(852):
 /mnt/sdcard/SDCARD/Carburant/storeddata.dat (Permission denied)

 Let's begin to correct the first message :\
 Every user will put its name and car mark, so this 2 variables are not
 constant!
 So, in the menu export code i maked this:
  case R.id.exporter:
  final SharedPreferences preferences = PreferenceManager
  .getDefaultSharedPreferences(context);
 String fileName = getResources().getString(R.string.fileName);
  fileDir =  + preferences.getString(login, ) + .+
 preferences.getString(marque, ) + .;
 Import myImport = new Import(this,fileDir+fileName);
 //Import myImport(this, fileDir+fileName);
  myImport.transfer();
  return true;

 I think that the problem comes from the red line, it's a comment because i
 always have an error message on it, but i think that this line can make the
 problem solved, we have to import in the import function the filedir and
 filename, without this line, nothing imported = it can't find the file in
 the /data/data...

 So please what can i put to import the necessary variables to the import
 function(in the other class).
 Thank you.



 2011/4/4 TreKing treking...@gmail.com

 On Sun, Apr 3, 2011 at 9:11 PM, Alaeddine Ghribi 
 alaeddineghr...@gmail.com wrote:

 So i put a breakpoint in the catch line and in the debugger i think that
 i have the right variables:


 Put a break at the *start* of your code and *step through* line by line
 until you hit the line that causes the exception.

 OR

 Print the message the exception gives you (ex.getMessage()) to find out
 what file is giving the error.



 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: hide top alternative keys on soft keyboard

2011-04-04 Thread lbendlin
Do you mean the row that appears on autocompletion when you selected a word?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] read character unicode form sqlite

2011-04-04 Thread Kostya Vasilyev
2011/4/4 lbendlin l...@bendlin.us

 It doesn't actually matter how you store it as under the hood SQLite stores
 everything as string. You can dso dirty type conversion tricks when reading.



It does not store everything as a string. There are native types for
integer, real and BLOB, in addition to text.

What you're probably refering to is that Android SQlite classes always bind
SQL parameters as strings.





 From my experience SQLite uses ANSI strings though so in order to read your
 Unicode data back you actually have to use byte arrays for reading, and then
 convert the byte array to unicode string. What the OP showed is an example
 of two bytes per character, misrepresented as an ANSI string.


Maybe on other platforms (can't speak for those).

On Android, my current project stores and retrieves values as Strings, which
can contain Western European and Cyrillic characters. I specifically tested
this with a set of charcters that, taken together, can only be represented
as Unicode. It works, and no data loss occurs.

Perhaps the OP actually stores strings as byte arrays, and has mismatched
conversions between storing and retrieving?


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: does NFC in gingerbread support card simulate?

2011-04-04 Thread Michael Roland
Hallo JMC,

I think there is a big misunderstanding out there of what card emulation
is (and what it is not!).

First of all, NFC has three different communication modes:
* Reader/writer mode,
* Peer-to-peer mode, and
* Card-emulation mode

*Reader/writer mode* is used to access NFC tag (i.e. tags that comply to
the tag formats specified by the NFC Forum and contain NDEF data).
Moreover, this modes provides compatibility to existing RFID (13.56MHz,
inductive, proximity coupling) card infrastructures (i.e. you can
interact with contactless smart (and memory) cards, like MIFARE,
ePassports, ...)
The Nexus S supports reader/writer mode for 3 (4) contactless standards:
- ISO/IEC 14443 Type A (e.g. MIFARE) and Type B
- JIS X 6319-4 (that's FeliCa)
- ISO/IEC 15693 (that's vicinity coupling cards, which is not NFC
  but uses a similar communication technique also in 13.56 MHz)

*Peer-to-peer mode* is used for direct communication between two NFC
devices (e.g. two mobile phones, but an NFC device can be pretty much
anything). This mode lifts the restrictions imposed by an active reader
-- passive card system. Thus, in a classic RFID/smart card system there
is a reader device that starts and controls the communication with one
or multiple cards, and cards that process commands received by reader.
Whereas, in a peer-to-peer system any device can start (and control) the
communication with any other device.
Peer-to-peer mode is used to exchange any data between NFC devices. This
data can be as simple as NDEF messages, but it's even possible to tunnel
other network protocols like IP over a peer-to-peer link.
The Nexus S supports the peer-to-peer protocol (NFC-DEP, ISO/IEC 18092)
with LLCP (NFC Logical Link Control Protocol) on top. With the current
API level only a simple exchange of NDEF messages (with Android's
proprietary protocol on top of LLCP) is possible.

*Card-emulation mode* is used to emulate a contactless smart card with
an NFC device. This mode provides compatibility to existing RFID
(13.56MHz, inductive, proximity coupling) reader infrastructures. An NFC
device in card-emulation mode acts the same as any real contactless
smart card.
With card emulation it is important to notice the difference between a
_contactless smart card_ and an _NFC tag_:

  - An NFC tag is a contactless transponder that has a certain memory
layout and contains standardized data elements (NDEF messages).
Four such layouts are defined by the NFC Forum (tag types 1 to 4).
Tag type 1 is based on Innovision's Jewel tags, tag type 2 is
based on NXP's MIFARE Ultralight. So I would not consider these
two smart cards (they are more like simple memory cards). Tag
type 3 is based on FeliCa and tag type 4 is based on the ISO/IEC
7816-4 smart card standard. Therefore, the latter certainly are
smart cards. Yet, in this case an NFC tag is a smart card with a
specific file layout (i.e. a card that contains the NDEF
application).
Besides the standardized NFC tag formats, vendors like NXP have
created guidelines for using their contactless card technologies
(e.g. MIFARE Classic) as NFC tags.
An NFC tag is only data storage and doesn't have (may have but
not use) special security features like data encryption, ...

  - A smart card can be much more than an NFC tag. A smart card can
contain, for instance, a credit/debit card application, a
ticketing application for public transport ...
These applications have even existed before NFC. They DO NOT use
the NDEF format to exchange data. Instead they use their own
protocols (e.g. EMV for payment cards). Often they use special
security features of smart cards (high security execution
environment, highly secure data storage, cryptographic
processing power ...)

So the card-emulation mode allows the emulation of a contactless msart
card (and not an NFC tag, although the smart card could *possibly* be
used as NFC tag). As applications like credit cards typically have high
security requirements, card emulation is not handled by the NFC device
itself (i.e. the application processor of an NFC-enabled mobile phone).
Instead, the NFC device has a dedicated hardware component (the
so-called Secure Element) that handles all the card emulation. (*)

  (*) This is not entirely true, as some NFC controllers (like the
  PN544) would theoretically allow the emulation of ISO/IEC
  14443-4 contactelss smart cards from the application processor.
  Yet, I don't know of any NFC phone that makes this functionality
  available to the user and I rather doubt that this will become
  available on the Nexus S.

The Secure Element (SE) is typically a smart card itself. But instead of
a normal contact/contactless smart card interface it has a connection to
the NFC controller, which connects it to the NFC antenna.

The Nexus S has an integrated SE (a SmartMX combined into the same
package as the PN544 NFC 

[android-developers] DirectFb

2011-04-04 Thread Nilly
Hi,

I have followed the following link.
http://groups.google.com/group/android-developers/browse_thread/thread/c97dd3301ffab308/c6a8f41261e619e8?show_docid=c6a8f41261e619e8

I have compiled successfully using the code you have suggested but i
am not able to run it on the board.

I have written an example code which will render yuv on the screen but
i am getting following error.

sh-3.2# ./dfb_test out.yuv

   ~~| DirectFB 1.4.3 |
~~
(c) 2001-2009  The world wide DirectFB Open Source Community
(c) 2000-2004  Convergence (integrated media) GmbH
  

(*) DirectFB/Core: Multi Application Core. (2011-04-04-16:21)
[ DEBUG ]
(!) DirectFB/core/system: No system found!
(#) DirectFBError [DirectFBCreate failed]: No (suitable)
implementation found!

Am I missing something?

Regards,
NIral

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: (File export) What's going on with my code?[NEED HELP]

2011-04-04 Thread Alaeddine Ghribi
I really don't know what method to use! all right, i have this:
copyfile(context,data/data/
carburant.android.com/files/alaa.peugeot.settings.dat,sdCard.getAbsolutePath()
+ /Carburant/storeddata.dat);

I have to replace data/data/
carburant.android.com/files/alaa.peugeot.settings.dat by a method.
Have i to use this?
getFileStreamPathhttp://developer.android.com/reference/android/content/Context.html#getFileStreamPath(java.lang.String)
(String http://developer.android.com/reference/java/lang/String.html name)
Returns the absolute path on the filesystem where a file created with
openFileOutput(String,
int)http://developer.android.com/reference/android/content/Context.html#openFileOutput(java.lang.String,
int) is stored.

But the file created in the /data/data.. is not created with
openFileOutput(String,
int)http://developer.android.com/reference/android/content/Context.html#openFileOutput(java.lang.String,
int)


2011/4/4 Kostya Vasilyev kmans...@gmail.com

 A few things.

 1 - For the target file, don't use SDCARD in your paths.
 Environment.getExternalStorageDirectory already gives you the path to the
 top-level directory (root) of the memory card.

 Android 2.2 uses a path that's different from earlier versions, and you can
 rely on this function to do right thing.

 2 - For the source file, use this:


 http://developer.android.com/reference/android/content/Context.html#openFileInput(java.lang.String
 )

 or


 http://developer.android.com/reference/android/content/Context.html#openFileOutput(java.lang.String,
 int)

 Do not try to build the full path yourself (as in,
 /data/data/package_name/files) - the path can be different depending on
 the device and its Android version. The above functions already take care of
 that.

 You already have code to read your data files (to populate the list view),
 just do it the same way.

 -- Kostya

 2011/4/4 Alaeddine Ghribi alaeddineghr...@gmail.com

 So i maked this:
 catch(FileNotFoundException ex){
  Toast.makeText(context, File Not found,
 Toast.LENGTH_SHORT).show();
  String x=ex.getMessage();
  Log.d(Carburant, x);
 }

 Here is the message i get:
 04-04 11:07:20.851: DEBUG/Carburant(377): /alaa.peugeot.settings.dat (No
 such file or directory)

 So as the log indicated, the compiler doesn't finds the file in the
 /data/data...
 I maked one other thing, in the copyfile function i maked this:
 copyfile(context,*data/data/
 carburant.android.com/files/alaa.peugeot.settings.dat*,sdCard.getAbsolutePath()
 + /SDCARD/Carburant/storeddata.dat);

 The log message now indicates this:
 04-04 11:11:32.771: DEBUG/Carburant(852):
 /mnt/sdcard/SDCARD/Carburant/storeddata.dat (Permission denied)

 Let's begin to correct the first message :\
 Every user will put its name and car mark, so this 2 variables are not
 constant!
 So, in the menu export code i maked this:
  case R.id.exporter:
  final SharedPreferences preferences = PreferenceManager
  .getDefaultSharedPreferences(context);
 String fileName = getResources().getString(R.string.fileName);
  fileDir =  + preferences.getString(login, ) + .+
 preferences.getString(marque, ) + .;
 Import myImport = new Import(this,fileDir+fileName);
 //Import myImport(this, fileDir+fileName);
  myImport.transfer();
  return true;

 I think that the problem comes from the red line, it's a comment because i
 always have an error message on it, but i think that this line can make the
 problem solved, we have to import in the import function the filedir and
 filename, without this line, nothing imported = it can't find the file in
 the /data/data...

 So please what can i put to import the necessary variables to the import
 function(in the other class).
 Thank you.



 2011/4/4 TreKing treking...@gmail.com

  On Sun, Apr 3, 2011 at 9:11 PM, Alaeddine Ghribi 
 alaeddineghr...@gmail.com wrote:

 So i put a breakpoint in the catch line and in the debugger i think that
 i have the right variables:


 Put a break at the *start* of your code and *step through* line by line
 until you hit the line that causes the exception.

 OR

 Print the message the exception gives you (ex.getMessage()) to find out
 what file is giving the error.



 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 

[android-developers] Loading/flashing system.img, userdata.img

2011-04-04 Thread Abhijeet Pathak
I have downloaded froyo and gingerbread AOSP code and have compiled it.
I have got system.img and userdata.img as result.

I am using Samsung Galaxy 3 (GT-I5801) phone. I am not sure but I guess it 
doesn't support fastboot.

How do I flash these images to my phone? And also, will they overwrite my 
bootloader?

Please help.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Loading/flashing system.img, userdata.img

2011-04-04 Thread Abhijeet Pathak
I also tried using fastboot. 
I am getting following response:

#fastboot system /sdcard/system.img
Error scanning partitions : No such file or directory 




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Layout Question

2011-04-04 Thread Jake Colman

I have a layout that is displaying the time in the format 7:35 PM.
I'd like the display to be centered horizontally and vertically within
the layout.  Here is what I am using:

?xml version=1.0 encoding=utf-8?
RelativeLayout
xmlns:android=http://schemas.android.com/apk/res/android;
android:id=@+id/small_widget_layout 
android:layout_width=fill_parent
android:layout_height=fill_parent
android:background=@drawable/appwidget_bg
TextView 
android:id=@+id/small_widget_time 
android:layout_width=wrap_content 
android:layout_height=wrap_content 
android:layout_centerInParent=true
android:textSize=6pt 
android:textColor=#
/
/RelativeLayout

When the textSize is at 6pt, it works correctly.  When I specify 7pt,
the string is word-wrapped with the PM below the time, which is fine.
But it is aligned left within the layout. Why aren't the two lines of
text centered horizontally and vertically?

Thanks.

-- 
Jake Colman -- Android Tinkerer

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Loading/flashing system.img, userdata.img

2011-04-04 Thread Kostya Vasilyev
This is not the best place to ask this.

Try android-porting or http://www.xda-developers.com



2011/4/4 Abhijeet Pathak pathak...@gmail.com

 I also tried using fastboot.
 I am getting following response:

 #fastboot system /sdcard/system.img
 Error scanning partitions : No such file or directory




 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: in-app billing problems

2011-04-04 Thread Peter
Of course. That makes sense. Didn't thought of that.


On Apr 4, 11:41 am, Kostya Vasilyev kmans...@gmail.com wrote:
 A test account lets you make purchases with your actual product ids, as a
 final test, before you publish the application. I don't think you can do
 this with any other account.
  04.04.2011 13:34 пользователь Peter peter.fort...@gmail.com написал:







  I discovered the same. You need a production signed apk on your device
  to test this. I also saw that you are charged for testing this. But
  you can refund the money later, so that shouldn't be a problem.
  Actually I don't get why I need to create a test account for testing
  this, because everything is the same as with a non-testing-account. Or
  I'm I wrong her?

  Peter

  On Apr 2, 9:30 pm, Tony t...@smartmobilesolutions.com wrote:
  Update : after one day and a half, I am trying my code again and this
  time everything works :-). So I guess it is my fault to try something
  right after the announcement... :-)

  Two notes, though :

  1) you need to have a real credit card assigned to your google test
  account (and you will be charged for real when you do the test
  purchases). Keep this in mind...

  2) you need to deploy the production-signed apk on the test device,
  when you test against themarket. So export a production signedversionfrom

 Eclipse, upload it as a draft on theMarket, create/







  modify your in-apps items on themarket, publish them. Then deploy the
  same apk on the test device with test google account and do the
  testing.

  Anyway, it's fine now. Guys, thanks for the comments and good luck :-)

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Problem Setting the Alpha Value for an Appwidget Background

2011-04-04 Thread Jake Colman

I want to be able to set the alpha value for my appwidget's background
so that I can control its transparency at runtime.  After googling a
bit, I came up with the following:

Drawable bg = 
   Resources.getSystem().getDrawable(R.drawable.appwidget_bg);
bg.setAlpha(100);

This code throws a Resources$NotFoundException.

I'm sure I missed something blazingly obvious.  Can someone tell me what
it is?  I suspect that the problem is since this is a widget I can only
work with the remote views - even though I can get programmatic access
to the resource as I did above.  If that is the case, what is the remote
view equivalent of what I am trying to do?

Thanks.

-- 
Jake Colman -- Android Tinkerer

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Resources can't be loaded in a Open GL live wallpaper

2011-04-04 Thread MobileVisuals
I have investigated this now and the same nullpoint exception happens
everytime I call any of the ContextWrapper methods. This is very
strange because GLWallpaperService extends from ContextWrapper, so
there is an instance of ContextWrapper. I checked this with

Log.i(this, +this );

which resulted in

04-04 13:20:28.533: INFO/this(238):
net.markguerra.android.glwallpaperexample.MyWallpaperService@43d0f530

I then get nullpoint exception on even the simplest methods in
ContextWrapper, like isRestricted:

04-04 13:20:28.564: ERROR/AndroidRuntime(238): Caused by:
java.lang.NullPointerException
04-04 13:20:28.564: ERROR/AndroidRuntime(238): at
android.content.ContextWrapper.isRestricted(ContextWrapper.java:455)


On Apr 3, 6:55 pm, MobileVisuals eyv...@astralvisuals.com wrote:
 Here is the out put from logcat. The error happens when I call
 resources=this.getResources();

 04-03 16:48:33.422: ERROR/AndroidRuntime(290): FATAL EXCEPTION: main
 04-03 16:48:33.422: ERROR/AndroidRuntime(290):
 java.lang.RuntimeException: Unable to instantiate service
 net.markguerra.android.glwallpaperexample.MyWallpaperService:
 java.lang.NullPointerException
 04-03 16:48:33.422: ERROR/AndroidRuntime(290):     at
 android.app.ActivityThread.handleCreateService(ActivityThread.java:
 2943)
 04-03 16:48:33.422: ERROR/AndroidRuntime(290):     at
 android.app.ActivityThread.access$3300(ActivityThread.java:125)
 04-03 16:48:33.422: ERROR/AndroidRuntime(290):     at
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:2087)
 04-03 16:48:33.422: ERROR/AndroidRuntime(290):     at
 android.os.Handler.dispatchMessage(Handler.java:99)
 04-03 16:48:33.422: ERROR/AndroidRuntime(290):     at
 android.os.Looper.loop(Looper.java:123)
 04-03 16:48:33.422: ERROR/AndroidRuntime(290):     at
 android.app.ActivityThread.main(ActivityThread.java:4627)
 04-03 16:48:33.422: ERROR/AndroidRuntime(290):     at
 android.app.ActivityThread.main(ActivityThread.java:4627)
 04-03 16:48:33.422: ERROR/AndroidRuntime(290):     at
 java.lang.reflect.Method.invoke(Method.java:521)
 04-03 16:48:33.422: ERROR/AndroidRuntime(290):     at
 com.android.internal.os.ZygoteInit
 $MethodAndArgsCaller.run(ZygoteInit.java:868)
 04-03 16:48:33.422: ERROR/AndroidRuntime(290):     at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
 04-03 16:48:33.422: ERROR/AndroidRuntime(290):     at
 dalvik.system.NativeStart.main(Native Method)
 04-03 16:48:33.422: ERROR/AndroidRuntime(290): Caused by:
 java.lang.NullPointerException
 04-03 16:48:33.422: ERROR/AndroidRuntime(290):     at
 android.content.ContextWrapper.getResources(ContextWrapper.java:80)
 04-03 16:53:38.932: ERROR/AndroidRuntime(421):     at
 net.markguerra.android.glwallpaperexample.MyWallpaperService.init(MyWallpaperService.java:
 26)
 04-03 16:53:38.932: ERROR/AndroidRuntime(421):     at
 java.lang.Class.newInstanceImpl(Native Method)
 04-03 16:53:38.932: ERROR/AndroidRuntime(421):     at
 java.lang.Class.newInstance(Class.java:1429)
 04-03 16:53:38.932: ERROR/AndroidRuntime(421):     at
 android.app.ActivityThread.handleCreateService(ActivityThread.java:
 2940)

 On Apr 2, 5:14 pm, Marcin Orlowski webnet.andr...@gmail.com wrote:

  On 2 April 2011 16:12, MobileVisuals eyv...@astralvisuals.com wrote:

  My problem  is that I can’t load my texture resources. The app crashes

  And the log quote is...?

  Regards,
  Marcin Orlowski

  *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
  WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
  *Twitterhttp://webnetmobile.com/twitter/
  *

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] read character unicode form sqlite

2011-04-04 Thread lbendlin
I guess we're both right in some way :-) 

Here's the official documentation: http://www.sqlite.org/version3.html

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Loading/flashing system.img, userdata.img

2011-04-04 Thread Abhijeet Pathak
Yes.. But Google Android documentation also does not describe any other 
method than fastboot.. and that too for only few phones.
Thats why I asked here.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Loading/flashing system.img, userdata.img

2011-04-04 Thread Abhijeet Pathak

Is it compulsory to have special Google Development phone for ROM 
development or any Android phone can be used for this?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Text drawn by mPaint.drawText looks different with the default TextView?

2011-04-04 Thread mathcat
In a custom view extending View, I call mPaint.drawText in the onDraw
method, with a new Paint object mPaint. But the text drawn looks
different to the default TextView, the lines are thinner and not
smooth(like rope bitten by some insects). I just want it to be the
same look as TextView.How to do that? Sorry I`m not quite familiar
with Android graphics.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Can't communicate with NfcB tag

2011-04-04 Thread Nick Pelly
Hi,

Please don't hijack threads - this is a different discussion so a different
thread :)

I can give you a quick answer. We scan a *lot* of tags, and also noticed a
small set of NfcB/ISO-DEP cards that are a little tricky. You have to orient
the antennas in just the right alignment, and it can take a couple of
seconds. I asked our vendor and they explained that some NfcB cards are
designed to work with limited RF sensitivity, since they are designed to
work with fixed reader/writer infrastructure that has larger antennas and
higher power.

There is no way to adjust the power.

I think you will find any NFC Forum tags will work fine however.

Cheers,
Nick



On Sat, Mar 26, 2011 at 11:51 AM, Jvy jvy...@gmail.com wrote:

 Hi,

 I have problem discovering / detecting NfcB card with Nexus S. It
 could easily take me 5 to 60 seconds to detect the card.

 I suspect it is the power issue. Is there any API I can call to
 temporarily increase the NXP power during the scanning of NfcB card?

 Else I can't see this is viable for a near field proximity experience.

 Regards,

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers]StringIndexOutOfBoundsException when calling ava.net.URL.openStream

2011-04-04 Thread manigault
Hi all,
I faced really nasty problem these days. I am executing the following
code


String destination = ;// this string is initialized before
coming here


URL url = null;
InputStream inputStream = null;
try {
url = new URL(destination);
inputStream = url.openStream();
// process the input stream
catch (IOException e) {
// handle the exception
} finally {
if (inputStream != null) {
inputStream.close();
}
}


This was working fine so far, but i start to receive to following
exception -


Exception: java.lang.StringIndexOutOfBoundsException
Stack Trace :
java.lang.String.substring(String.java:1579)
 
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getAuthorizationCredentials(HttpURLConnectionImpl.java:
1769)
 
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.doRequestInternal(HttpURLConnectionImpl.java:
1701)
 
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.doRequest(HttpURLConnectionImpl.java:
1649)
 
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:
1153)
java.net.URL.openStream(URL.java:653)

I can't figure out for which values of 'destination' this exception is
thrown but i think this should never happen. The doc says the
openStream could throw only IOException. Any ideas ?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Text drawn by mPaint.drawText looks different with the default TextView?

2011-04-04 Thread skink


On Apr 4, 3:37 pm, mathcat scien...@gmail.com wrote:
 In a custom view extending View, I call mPaint.drawText in the onDraw
 method, with a new Paint object mPaint. But the text drawn looks
 different to the default TextView, the lines are thinner and not
 smooth(like rope bitten by some insects). I just want it to be the
 same look as TextView.How to do that? Sorry I`m not quite familiar
 with Android graphics

You can exterminate the insects with special weapon called
antyaliasing.

pskink

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Text drawn by mPaint.drawText looks different with the default TextView?

2011-04-04 Thread mathcat
Thank you skink!

But why the lines are thinner? how to make them the same as TextView?

On Apr 4, 9:41 pm, skink psk...@gmail.com wrote:
 On Apr 4, 3:37 pm, mathcat scien...@gmail.com wrote:

  In a custom view extending View, I call mPaint.drawText in the onDraw
  method, with a new Paint object mPaint. But the text drawn looks
  different to the default TextView, the lines are thinner and not
  smooth(like rope bitten by some insects). I just want it to be the
  same look as TextView.How to do that? Sorry I`m not quite familiar
  with Android graphics

 You can exterminate the insects with special weapon called
 antyaliasing.

 pskink

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Text drawn by mPaint.drawText looks different with the default TextView?

2011-04-04 Thread mathcat
Thank skink!

But why the lines are thinner than TextView? How to handle that?

On Apr 4, 9:41 pm, skink psk...@gmail.com wrote:
 On Apr 4, 3:37 pm, mathcat scien...@gmail.com wrote:

  In a custom view extending View, I call mPaint.drawText in the onDraw
  method, with a new Paint object mPaint. But the text drawn looks
  different to the default TextView, the lines are thinner and not
  smooth(like rope bitten by some insects). I just want it to be the
  same look as TextView.How to do that? Sorry I`m not quite familiar
  with Android graphics

 You can exterminate the insects with special weapon called
 antyaliasing.

 pskink

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers]StringIndexOutOfBoundsException when calling ava.net.URL.openStream

2011-04-04 Thread Daniel Drozdzewski
What does destination String equal to?
have you changed it recently?



On Mon, Apr 4, 2011 at 2:40 PM, manigault manig...@gmail.com wrote:
 Hi all,
 I faced really nasty problem these days. I am executing the following
 code


    String destination = ;// this string is initialized before
 coming here


    URL url = null;
    InputStream inputStream = null;
    try {
        url = new URL(destination);
        inputStream = url.openStream();
        // process the input stream
    catch (IOException e) {
        // handle the exception
    } finally {
        if (inputStream != null) {
            inputStream.close();
        }
    }


 This was working fine so far, but i start to receive to following
 exception -


    Exception: java.lang.StringIndexOutOfBoundsException
    Stack Trace :
    java.lang.String.substring(String.java:1579)

 org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getAuthorizationCredentials(HttpURLConnectionImpl.java:
 1769)

 org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.doRequestInternal(HttpURLConnectionImpl.java:
 1701)

 org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.doRequest(HttpURLConnectionImpl.java:
 1649)

 org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:
 1153)
    java.net.URL.openStream(URL.java:653)

 I can't figure out for which values of 'destination' this exception is
 thrown but i think this should never happen. The doc says the
 openStream could throw only IOException. Any ideas ?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
Daniel Drozdzewski

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Represent Graphically a Tree

2011-04-04 Thread Jordan
What would be the best way to represent a data tree graphically?

I've thinked to use a multi level TextView, but these levels are
implemented into ListView or I must implement them into my code?

Like a File Manager, wich the filesystem is the tree structure and the
directory and files are the items. I want to navigate inside my tree
pressing the items to go to the next level and back button to go back
to the previous tree level.

Is there something to use out of the box for doing this?

Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: More on Fragment inflation

2011-04-04 Thread blake
Code is here: http://callmeike.net/blake/android/contact-viewer-acp.tgz

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Android horizontal scroll list like Gallery

2011-04-04 Thread Alessio Grumiro
I think you can use horizontal scrollview with horizontal linear layout
inside.
Inside linear layout you can put items without listview, i hope.

Do you have a better solution?

Bye

2011/4/4 umakantpatil umakantpat...@gmail.com

 Hey,

 I want horizontal scroll like Gallery. Im not using Gallery because its
 center locked.

 Can some one here would help me out with this So I can have horizontal
 scrolling list?

 I think best example of this is pulse news reader :-
 https://market.android.com/details?id=com.alphonso.pulse

 Thanks :)

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: (Full) NFC support for Android (on a Nexus S, specifically)

2011-04-04 Thread Nick Pelly
We're not in a hurry to add public API's for Card Emulation. It is a
developers nightmare because most NFC hardware will only support one type of
card emulation technology. And there are at least 4 very common types
(Felica, Mifare Classic, Mifare Desire, ISO-DEP). So a developer would need
to understand all these types and the inter-operability issues, and choose
which set of phones to write their application for.

Not to mention dealing with multiple apps that all want to do card
emulation. Take Mifare as an example, how would the user decide which
application gets to control the Mifare Application Directory? Yes it is
possible to construct a combination of API's and system UI that lets the
user choose which application gets to do card emulation. But we have to
introduce API complexity and, cognitive overhead for the user.

As a third party developer, I highly encourage you to invest in peer-to-peer
NFC. This can easily handle multiple applications, and is guaranteed to work
across all Android phones.

Cheers,
Nick


On Thu, Mar 31, 2011 at 1:36 PM, nadam a...@anyro.se wrote:

 It would be nice to get a hint on when card emulation will be added as
 an official feature of the SDK. It's already mentioned in the source
 code (NfcAdapter.java) but hidden with @hide.

/**
 * Card Emulation mode Enables the manager to act as an NFC tag.
 Provided
 * that a Secure Element (an UICC for instance) is connected to
 the NFC
 * controller through its SWP interface, it can be exposed to the
 outside
 * NFC world and be addressed by external readers the same way
 they would
 * with a tag.
 * p
 * Which Secure Element is exposed is implementation-dependent.
 *
 * @hide
 */
private static final int DISCOVERY_MODE_CARD_EMULATION = 2;

 It seems to be possible to enable this somehow (http://www.youtube.com/
 watch?v=28TwCpx4Dng) but I don't know if it requires Java reflection,
 NDK programming or a custom Android build.

 On 31 mar, 04:39, Dianne Hackborn hack...@android.com wrote:
  The platform so far supports what is in the SDK.  It doesn't matter what
 a
  particular piece of hardware supports.
 
  It is enough to be useful in practice.  It may not be enough for what
  *you* want to do, and we understand that it does not do everything for
  everyone at this point, but this is what is there so far.
 
 
 
 
 
 
 
 
 
  On Wed, Mar 30, 2011 at 3:03 AM, JMC114 jorncruij...@gmail.com wrote:
   Greetings,
 
   After sifting through documentation and building NFC test applications
   on a Nexus S, I've come to the conclusion the Android SDK still lacks
   the functionality that NFC applications truly need in order to really
   be useful in practice.
 
   What's possible now:
   - Reading and writing tags.
   - P2P NDEF communication.
 
   What's missing:
   - Card emulation
   - P2P NDEF support on terminals/readers (which I'm given to understand
   is known as com.android.npp? NDEF Push Protocol. Can't find any
   documentation on that anywhere..) which - I believe - is (still)
   needed for P2P communication with regular desktop readers
 
   As far as I can tell, the NFC controller chip (PN544
  http://www.nxp.com/acrobat_download2/literature/9397/75016890.pdf) in
   the Nexus S supports all NFC functionality, the android SDK does not.
 
   Card emulation or proper documentation on how to initiate P2P
   communication with a regular (desktop) (nfc) reader is very much a
   requirement to unleash NFC's true potential, which is mobile payment.
 
   It seems impossibly hard to find any information on whether or not
   this - in my opinion vital - functionality is due to be implemented.
 
   Does anyone have any information, thoughts, opinions, anything on this
   subject? I'm really wondering what to expect from Android and NFC,
   because frankly, I'm only half impressed so far.
 
   Thanks
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see
 and
  answer them.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this 

Re: [android-developers] Problem Setting the Alpha Value for an Appwidget Background

2011-04-04 Thread Kostya Vasilyev
You are trying to load your own drawable from system resources. Get rid of
the getSystem thing.
04.04.2011 17:23 пользователь Jake Colman col...@ppllc.com написал:

 I want to be able to set the alpha value for my appwidget's background
 so that I can control its transparency at runtime. After googling a
 bit, I came up with the following:

 Drawable bg =
 Resources.getSystem().getDrawable(R.drawable.appwidget_bg);
 bg.setAlpha(100);

 This code throws a Resources$NotFoundException.

 I'm sure I missed something blazingly obvious. Can someone tell me what
 it is? I suspect that the problem is since this is a widget I can only
 work with the remote views - even though I can get programmatic access
 to the resource as I did above. If that is the case, what is the remote
 view equivalent of what I am trying to do?

 Thanks.

 --
 Jake Colman -- Android Tinkerer

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Activity lifecycle

2011-04-04 Thread Gino
In my tests, it looks like onSavedInstanceState() does not get called
when switching from portrait to landscape mode, or vice versa.

It does get called if you press the Home button.

This is on an Android 2.1 device, but it most likely applies to 1.6
and afterwards as well.

Does anyone know an easy way to test the onSavedInstanceState()
functionality ?  I tried using a task manager to kill my app, but
unfortunately it doesn't call the onSavedInstanceState() function.

Gino.


On Apr 2, 12:46 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Sat, Apr 2, 2011 at 12:28 PM, b_t bartata...@gmail.com wrote:
  And is there any way to force stop activity A to test if
  my onRestoreInstanceState and onSavedInstanceState implementation
  works
  when returning from B?

 Sure. Rotate the screen. By default, that will destroy and recreate
 the activity.

  In my device A is never destroyed.

 That seems unlikely.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Android Training...At Your Office:http://commonsware.com/training

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Using RatingBar as Fav with one star

2011-04-04 Thread ramindroid
Hi,

I tried implementing the Favourite functionaity for any Contacts using
the RatingBar (having one Star).
I set the rating a 0.0 initially (with stepSize as 1.0). On clicking,
the star gets rating 1 (turns green) but further click to make it 0 is
not working ( on setting stepSize as 0.5, Its getting 0- 0.5 - 1.0 -
 0.5... but not to zero).
I tried using onClickListener but its still not executing onClick().
So my question is: Is this possible to achieve using RatingBar? To
implement the same, what another/best appraoch?
* I tried having two images in the listItem and on clicking ...
changin to another... but i want to have standard look n feel as
setting a favourite contact.

Please provide the inputs.

thanks.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: adb devices returns an empty list

2011-04-04 Thread argongold
Hi Frank,

Thanks and I am going to post this message to android-platform group.

regards,
argon


On Apr 4, 3:16 pm, FrankG frankgru...@googlemail.com wrote:
 Hello Argon,

 IMHO you should switch to android-platform, as this kind of question
 is out of scope of the android sdk.

 And their you should provide by far more details. I.e. from where
 comes
 your platform, do you have the platform code, is the adbd started by
 init.d,
 can you see adbd using ps on the device and so on ?

 Maybe your platform has no adb support ?

 Good luck !  Frank

 On 4 Apr., 07:08, argongold argongol...@gmail.com wrote:

  Hi,
  I've a mini MID device and I am trying to use it for development/
  debugging purpose. But after all the setting steps( see below) . I am
  still not able to get device listed when I issue  'adb devices'
  command.

  Things I have done as follows:
  1. enable USB debugging on the device under Settings-Applications-

  Development-USB debugging

  2. I have changed the following file on my computer .
  /etc/udev/rules.d/51-android.rules and added the following line.
  SUBSYSTEM==usb, SYSFS{idVendor}==18d1, ATTR{idProduct}==0001,
  SYMLINK+=android_adb, MODE=0666, OWNER=MYNAME

  (on Computer)
  Command Issued  lsusb
  Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  Bus 005 Device 002: ID 1690:0741 Askey Computer Corp. [hex]
  Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  Bus 004 Device 002: ID 062a:6301 Creative Labs
  Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  Bus 001 Device 006: ID 18d1:0001
  Bus 001 Device 003: ID 0408:1fc3 Quanta Computer, Inc.
  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

  Note: device is connect to usb bus at Line no. 9  above .

  (on Computer)
  Command Issued  adb devices
  * daemon not running. starting it now on port 5037 *
  * daemon started successfully *
  List of devices attached

  (on Device itself)
  Command Issued  adbd
  cannot bind 'tcp:5037'

  (on Device itself)
  Command Issued  netstat -a | grep  5037

  nothing returns from above command.

  If you have experienced such issue please let me know steps to resolve
  it.  It seems the problem is on device side for which adbd returns
  'cannot bind 'tcp:5037'

  Thanks for your strong support.

  regards,
  argon



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Loading/flashing system.img, userdata.img

2011-04-04 Thread Marcin Orlowski
On 4 April 2011 15:34, Abhijeet Pathak pathak...@gmail.com wrote:


 Is it compulsory to have special Google Development phone for ROM
 development or any Android phone can be used for this?


You're already told to ask on the *right* group.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Problem Setting the Alpha Value for an Appwidget Background

2011-04-04 Thread Jake Colman

Kostya,

Ok, that was easy.  So now I don't crash but the background isn't
changing either!  After setting the alpha value do I need to somehow
tell the appwidget to use the modified background?  Or am I actually
going about this the entirely wrong way and not even using the right
method?

...Jake


 KV == Kostya Vasilyev kmans...@gmail.com writes:

   KV You are trying to load your own drawable from system
   KV resources. Get rid of the getSystem thing.

   KV 04.04.2011 17:23 пользователь Jake Colman col...@ppllc.com
   KVнаписал:

I want to be able to set the alpha value for my appwidget's
background so that I can control its transparency at
runtime. After googling a bit, I came up with the following:

Drawable bg =
Resources.getSystem().getDrawable(R.drawable.appwidget_bg);
bg.setAlpha(100);

This code throws a Resources$NotFoundException.

I'm sure I missed something blazingly obvious. Can someone tell me
what it is? I suspect that the problem is since this is a widget I
can only work with the remote views - even though I can get
programmatic access to the resource as I did above. If that is the
case, what is the remote view equivalent of what I am trying to
do?

Thanks.

--
Jake Colman -- Android Tinkerer

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

   KV -- 
   KV You received this message because you are subscribed to the Google
   KV Groups Android Developers group.
   KV To post to this group, send email to android-developers@googlegroups.com
   KV To unsubscribe from this group, send email to
   KV android-developers+unsubscr...@googlegroups.com
   KV For more options, visit this group at
   KV http://groups.google.com/group/android-developers?hl=en

-- 
Jake Colman -- Android Tinkerer

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers]StringIndexOutOfBoundsException when calling ava.net.URL.openStream

2011-04-04 Thread Martin Obreshkov
No destination is dynamically returned by other request to the server.
Basically i am a server which returns a list of urls which i am processing
in a for loop using this code. The server is querying a search engine and
returns urls which content mach the desired search.

On Mon, Apr 4, 2011 at 5:04 PM, Daniel Drozdzewski 
daniel.drozdzew...@gmail.com wrote:

 What does destination String equal to?
 have you changed it recently?



 On Mon, Apr 4, 2011 at 2:40 PM, manigault manig...@gmail.com wrote:
  Hi all,
  I faced really nasty problem these days. I am executing the following
  code
 
 
 String destination = ;// this string is initialized before
  coming here
 
 
 URL url = null;
 InputStream inputStream = null;
 try {
 url = new URL(destination);
 inputStream = url.openStream();
 // process the input stream
 catch (IOException e) {
 // handle the exception
 } finally {
 if (inputStream != null) {
 inputStream.close();
 }
 }
 
 
  This was working fine so far, but i start to receive to following
  exception -
 
 
 Exception: java.lang.StringIndexOutOfBoundsException
 Stack Trace :
 java.lang.String.substring(String.java:1579)
 
 
 org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getAuthorizationCredentials(HttpURLConnectionImpl.java:
  1769)
 
 
 org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.doRequestInternal(HttpURLConnectionImpl.java:
  1701)
 
 
 org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.doRequest(HttpURLConnectionImpl.java:
  1649)
 
 
 org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:
  1153)
 java.net.URL.openStream(URL.java:653)
 
  I can't figure out for which values of 'destination' this exception is
  thrown but i think this should never happen. The doc says the
  openStream could throw only IOException. Any ideas ?
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en



 --
 Daniel Drozdzewski

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
When I raise my flashing sword, and my hand takes hold on judgment, I will
take vengeance upon mine enemies, and I will repay those who haze me. Oh,
Lord, raise me to Thy right hand and count me among Thy saints.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: widget on lockscreen

2011-04-04 Thread Martin Obreshkov
Hmm i noticed that MixZing is also having a lock screen widget. If this is
only possible for HTC sense how they do it.

On Wed, Jun 30, 2010 at 11:51 AM, Martin Obreshkov manig...@gmail.comwrote:

 Thanks


 On Wed, Jun 30, 2010 at 11:35 AM, Al Sutton a...@funkyandroid.com wrote:

 It's a firmware thing, so yes, HTCs Sense can do it, but only because
 HTC wrote the firmware.

 Imho it's not a gerat idea anyway. One reason for having a lock screen
 is that it stops things happening when your device is put somewhere
 where it may get pressure on the screen which may cause undesirable
 behaviour (e.g. in a bag or pocket), so by putting your controls on
 the lock screen you run the risk of someone having the music paused or
 skipped due to a knock on the screen and then having to dig the device
 out in order to re-start/re-position playback.

 Al.

 On Jun 30, 9:24 am, Martin Obreshkov manig...@gmail.com wrote:
  Thanks for the reply but what about htc sense it has some controls over
  lockscreen. Is this implemented by htc sense onlyhttp://
 phandroid.com/wp-content/uploads/2009/06/rosie-lock-screen.jpg
 
  On Tue, Jun 29, 2010 at 8:12 PM, Dianne Hackborn hack...@android.com
 wrote:
 
 
 
 
 
   Sorry this is not currently supported.  That comment in the
 documentation
   is simply describing what could be done in the future.
 
   On Tue, Jun 29, 2010 at 8:22 AM, manigault manig...@gmail.com
 wrote:
 
   Hi all i am developing music player and i want to put some controls
   when screen is locked. Is there a way to put widget when screen is
   lock ? The documentation says that For example, the home screen has
   one way of viewing widgets, but the lock screen could also contain
   widgets, but i couldn't find a way to add widget to lockscreen so
 any
   ideas ?
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
 cr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
   --
   Dianne Hackborn
   Android framework engineer
   hack...@android.com
 
   Note: please don't send private questions to me, as I don't have time
 to
   provide private support, and so won't reply to such e-mails.  All such
   questions should be posted on public forums, where I and others can
 see and
   answer them.
 
--
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
 cr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  When I raise my flashing sword, and my hand takes hold on judgment, I
 will
  take vengeance upon mine enemies, and I will repay those who haze me.
 Oh,
  Lord, raise me to Thy right hand and count me among Thy saints.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 --
 When I raise my flashing sword, and my hand takes hold on judgment, I will
 take vengeance upon mine enemies, and I will repay those who haze me. Oh,
 Lord, raise me to Thy right hand and count me among Thy saints.




-- 
When I raise my flashing sword, and my hand takes hold on judgment, I will
take vengeance upon mine enemies, and I will repay those who haze me. Oh,
Lord, raise me to Thy right hand and count me among Thy saints.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: (Full) NFC support for Android (on a Nexus S, specifically)

2011-04-04 Thread JMC114
Hey Nick,

Thanks for your reply.

The main problem with peer-to-peer NFC, is that it is not (yet)
compatible with existing infrastructures that depend on RFID. Despite
P2P NFC being easier to use for developers, and having more potential
in the long run, and being - I presume - more secure (or, easier to
make secure), I believe card emulation mode to be very important for
the transition period due to its compatibility with RFID
infrastructures out in the world today.

I do understand the problems implementation of such API's in the
public would cause, and the complications usage of the SE brings. But
I believe the possibilities it would bring strongly outweigh the
negative aspects associated with it.

Regards,
JMC

On Apr 4, 4:15 pm, Nick Pelly n...@android.com wrote:
 We're not in a hurry to add public API's for Card Emulation. It is a
 developers nightmare because most NFC hardware will only support one type of
 card emulation technology. And there are at least 4 very common types
 (Felica, Mifare Classic, Mifare Desire, ISO-DEP). So a developer would need
 to understand all these types and the inter-operability issues, and choose
 which set of phones to write their application for.

 Not to mention dealing with multiple apps that all want to do card
 emulation. Take Mifare as an example, how would the user decide which
 application gets to control the Mifare Application Directory? Yes it is
 possible to construct a combination of API's and system UI that lets the
 user choose which application gets to do card emulation. But we have to
 introduce API complexity and, cognitive overhead for the user.

 As a third party developer, I highly encourage you to invest in peer-to-peer
 NFC. This can easily handle multiple applications, and is guaranteed to work
 across all Android phones.

 Cheers,
 Nick







 On Thu, Mar 31, 2011 at 1:36 PM, nadam a...@anyro.se wrote:
  It would be nice to get a hint on when card emulation will be added as
  an official feature of the SDK. It's already mentioned in the source
  code (NfcAdapter.java) but hidden with @hide.

     /**
      * Card Emulation mode Enables the manager to act as an NFC tag.
  Provided
      * that a Secure Element (an UICC for instance) is connected to
  the NFC
      * controller through its SWP interface, it can be exposed to the
  outside
      * NFC world and be addressed by external readers the same way
  they would
      * with a tag.
      * p
      * Which Secure Element is exposed is implementation-dependent.
      *
      * @hide
      */
     private static final int DISCOVERY_MODE_CARD_EMULATION = 2;

  It seems to be possible to enable this somehow (http://www.youtube.com/
  watch?v=28TwCpx4Dng) but I don't know if it requires Java reflection,
  NDK programming or a custom Android build.

  On 31 mar, 04:39, Dianne Hackborn hack...@android.com wrote:
   The platform so far supports what is in the SDK.  It doesn't matter what
  a
   particular piece of hardware supports.

   It is enough to be useful in practice.  It may not be enough for what
   *you* want to do, and we understand that it does not do everything for
   everyone at this point, but this is what is there so far.

   On Wed, Mar 30, 2011 at 3:03 AM, JMC114 jorncruij...@gmail.com wrote:
Greetings,

After sifting through documentation and building NFC test applications
on a Nexus S, I've come to the conclusion the Android SDK still lacks
the functionality that NFC applications truly need in order to really
be useful in practice.

What's possible now:
- Reading and writing tags.
- P2P NDEF communication.

What's missing:
- Card emulation
- P2P NDEF support on terminals/readers (which I'm given to understand
is known as com.android.npp? NDEF Push Protocol. Can't find any
documentation on that anywhere..) which - I believe - is (still)
needed for P2P communication with regular desktop readers

As far as I can tell, the NFC controller chip (PN544
   http://www.nxp.com/acrobat_download2/literature/9397/75016890.pdf) in
the Nexus S supports all NFC functionality, the android SDK does not.

Card emulation or proper documentation on how to initiate P2P
communication with a regular (desktop) (nfc) reader is very much a
requirement to unleash NFC's true potential, which is mobile payment.

It seems impossibly hard to find any information on whether or not
this - in my opinion vital - functionality is due to be implemented.

Does anyone have any information, thoughts, opinions, anything on this
subject? I'm really wondering what to expect from Android and NFC,
because frankly, I'm only half impressed so far.

Thanks

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
  android-developers@googlegroups.com
To unsubscribe from this group, send email to

Re: [android-developers] Re: (File export) What's going on with my code?[NEED HELP]

2011-04-04 Thread TreKing
Review this:
http://developer.android.com/guide/topics/data/data-storage.html

http://developer.android.com/guide/topics/data/data-storage.htmlAnd Google
Java IO.

Once you have a better understanding of how the system deals with Files and
what you're actually trying to do it should be a lot easier.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Market Statistics not working

2011-04-04 Thread TreKing
On Mon, Apr 4, 2011 at 5:40 AM, Manuel R. Ciosici
manuelrcios...@gmail.comwrote:

 Has anyone experienced something like this before?


Yes, we have:
http://groups.google.com/group/android-discuss/browse_thread/thread/7070b84290d452ae

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Testing Topic Please ignore

2011-04-04 Thread Noobs41bot
I keep posting, but they are not showing up... maybe its becuase of code 
examples in the txt... 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Problem Setting the Alpha Value for an Appwidget Background

2011-04-04 Thread Jake Colman

Nothing!  Since the drawable is already associated with the layout,
shouldn't it simply use the modified drawable?

 KV == Kostya Vasilyev kmans...@gmail.com writes:

   KV What do you do with bg after setting the alpha?

   KV 04.04.2011 18:44 пользователь Jake Colman col...@ppllc.com написал:

Kostya,

Ok, that was easy. So now I don't crash but the background isn't
changing either! After setting the alpha value do I need to somehow
tell the appwidget to use the modified background? Or am I actually
going about this the entirely wrong way and not even using the right
method?

...Jake


KV == Kostya Vasilyev kmans...@gmail.com writes:

   KV You are trying to load your own drawable from system
   KV resources. Get rid of the getSystem thing.

   KV 04.04.2011 17:23 пользователь Jake Colman col...@ppllc.com
   KV написал:

 I want to be able to set the alpha value for my appwidget's
 background so that I can control its transparency at
 runtime. After googling a bit, I came up with the following:

 Drawable bg =
 Resources.getSystem().getDrawable(R.drawable.appwidget_bg);
 bg.setAlpha(100);

 This code throws a Resources$NotFoundException.

 I'm sure I missed something blazingly obvious. Can someone tell me
 what it is? I suspect that the problem is since this is a widget I
 can only work with the remote views - even though I can get
 programmatic access to the resource as I did above. If that is the
 case, what is the remote view equivalent of what I am trying to
 do?

 Thanks.

 --
 Jake Colman -- Android Tinkerer

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
   KV android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

   KV --
   KV You received this message because you are subscribed to the Google
   KV Groups Android Developers group.
   KV To post to this group, send email to
   KV android-developers@googlegroups.com
   KV To unsubscribe from this group, send email to
   KV android-developers+unsubscr...@googlegroups.com
   KV For more options, visit this group at
   KV http://groups.google.com/group/android-developers?hl=en

--
Jake Colman -- Android Tinkerer

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

   KV -- 
   KV You received this message because you are subscribed to the Google
   KV Groups Android Developers group.
   KV To post to this group, send email to android-developers@googlegroups.com
   KV To unsubscribe from this group, send email to
   KV android-developers+unsubscr...@googlegroups.com
   KV For more options, visit this group at
   KV http://groups.google.com/group/android-developers?hl=en

-- 
Jake Colman -- Android Tinkerer

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Text drawn by mPaint.drawText looks different with the default TextView?

2011-04-04 Thread lbendlin
http://developer.android.com/reference/android/graphics/drawable/BitmapDrawable.html

look for the antialiases tag

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Do OpenGL ES 2.0 phones also support ES 1.1?

2011-04-04 Thread GJTorikian
Given that the APIs for OpenGL ES 2.0 and 1.1 are incompatible, I was
wondering if there is always some inherent support for both in
Android, or if it was on a per phone basis.

I am developing an ES 1.1 game. On my phone, a nearly two year old
model, the game drew quite well, visually. On my friend's newish Droid
2, all I saw were choppy polygons. I know my phone can't do ES 2.0 and
I assume his can.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Testing Topic Please ignore

2011-04-04 Thread TreKing
On Mon, Apr 4, 2011 at 10:15 AM, Noobs41bot jspi...@gmail.com wrote:

 I keep posting, but they are not showing up... maybe its becuase of code
 examples in the txt...


No, it's because this forum runs on Google Groups. When posting assume it
can take up to a week for anyone to see what you've posted. And be prepared
to be flooded when the forum decides to finally process the backlog of
messages and dump them all at once, in no particular order. Welcome.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: does NFC in gingerbread support card simulate?

2011-04-04 Thread Brill Pappin
Thanks for that Michael,
That has got to be the most useful message in this list to date.

- Brill Pappin
  Sixgreen Labs Inc.

On Mon, Apr 4, 2011 at 8:07 AM, Michael Roland mi.rol...@gmail.com wrote:

 Hallo JMC,

 I think there is a big misunderstanding out there of what card emulation
 is (and what it is not!).



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: does NFC in gingerbread support card simulate?

2011-04-04 Thread JMC114
Hey Michael,

Thank you very much for you elaborate answer. As you suggested, I did
not distinguish between smart cards and NFC tags.

I have several follow-up questions regarding your answer.

*Regarding P2P communication*

- If I understand correctly, Android uses a proprietary protocol
(which I believe is called com.android.npp) on top of LLCP as
specified by the NFC Forum, which is a protocol on top of NFCIP-1 as
specified in ISO 18092. I read in another discussion in this group
about a spec on com.android.npp that's due to be published, is there
any information as to a specific date for this publication? Or is
there any other (documented) way for regular terminals or desktop
readers to communicate with an Android phone over P2P?

*Regarding Card Emulation*

- How would installation of an application on the SE work? // How
would permission be given, and to whom? I don't yet clearly see how
this would work in practice.

- And more specifically, how would one develop and test an application
for the SE, if it requires permission by the SE owner.

- You mentioned it's possible to emulate a card with some tweaking of
the android source, how far could you go with this? Any pointers?

Either way, thank you very much for you clarification on card
emulation and the different NFC modes.

Thanks,
JMC

On Apr 4, 2:07 pm, Michael Roland mi.rol...@gmail.com wrote:
 Hallo JMC,

 I think there is a big misunderstanding out there of whatcardemulation
 is (and what it is not!).

 First of all, NFC has three different communication modes:
 * Reader/writer mode,
 * Peer-to-peer mode, and
 *Card-emulationmode

 *Reader/writer mode* is used to access NFC tag (i.e. tags that comply to
 the tag formats specified by the NFC Forum and contain NDEF data).
 Moreover, this modes provides compatibility to existing RFID (13.56MHz,
 inductive, proximity coupling)cardinfrastructures (i.e. you can
 interact with contactless smart (and memory) cards, like MIFARE,
 ePassports, ...)
 The Nexus S supports reader/writer mode for 3 (4) contactless standards:
     - ISO/IEC 14443 Type A (e.g. MIFARE) and Type B
     - JIS X 6319-4 (that's FeliCa)
     - ISO/IEC 15693 (that's vicinity coupling cards, which is not NFC
       but uses a similar communication technique also in 13.56 MHz)

 *Peer-to-peer mode* is used for direct communication between two NFC
 devices (e.g. two mobile phones, but an NFC device can be pretty much
 anything). This mode lifts the restrictions imposed by an active reader
 -- passivecard system. Thus, in a classic RFID/smartcardsystem there
 is a reader device that starts and controls the communication with one
 or multiple cards, and cards that process commands received by reader.
 Whereas, in a peer-to-peer system any device can start (and control) the
 communication with any other device.
 Peer-to-peer mode is used to exchange any data between NFC devices. This
 data can be as simple as NDEF messages, but it's even possible to tunnel
 other network protocols like IP over a peer-to-peer link.
 The Nexus S supports the peer-to-peer protocol (NFC-DEP, ISO/IEC 18092)
 with LLCP (NFC Logical Link Control Protocol) on top. With the current
 API level only a simple exchange of NDEF messages (with Android's
 proprietary protocol on top of LLCP) is possible.

 *Card-emulationmode* is used to emulate a contactless smartcardwith
 an NFC device. This mode provides compatibility to existing RFID
 (13.56MHz, inductive, proximity coupling) reader infrastructures. An NFC
 device incard-emulationmode acts the same as any real contactless
 smartcard.
 Withcardemulationit is important to notice the difference between a
 _contactless smart card_ and an _NFC tag_:

   - An NFC tag is a contactless transponder that has a certain memory
     layout and contains standardized data elements (NDEF messages).
     Four such layouts are defined by the NFC Forum (tag types 1 to 4).
     Tag type 1 is based on Innovision's Jewel tags, tag type 2 is
     based on NXP's MIFARE Ultralight. So I would not consider these
     two smart cards (they are more like simple memory cards). Tag
     type 3 is based on FeliCa and tag type 4 is based on the ISO/IEC
     7816-4 smartcardstandard. Therefore, the latter certainly are
     smart cards. Yet, in this case an NFC tag is a smartcardwith a
     specific file layout (i.e. acardthat contains the NDEF
     application).
     Besides the standardized NFC tag formats, vendors like NXP have
     created guidelines for using their contactlesscardtechnologies
     (e.g. MIFARE Classic) as NFC tags.
     An NFC tag is only data storage and doesn't have (may have but
     not use) special security features like data encryption, ...

   - A smartcardcan be much more than an NFC tag. A smartcardcan
     contain, for instance, a credit/debitcardapplication, a
     ticketing application for public transport ...
     These applications have even existed before NFC. They DO NOT use
     the NDEF format to exchange 

[android-developers] .Net Developer Job Opening - Valencia, CA

2011-04-04 Thread Makro Tech
Hi

This is Vignesh with Makro Technologies, Inc.
We have been in business for over 10 years and we are one of the Fast 500
National IT staffing and Solution firms in USA. Our clients include
country’s top-notch IT, Healthcare, Pharmaceutical, Financial,
Telecom,Government and other industries.

Staying current with technology, finding great consultants and exceeding our
clients' expectations are our primary objectives.

Thanks for your time and attention to this e-mail.  Please let me know if
you have any candidates available, please find the Job description as
mentioned below.

*Title : .Net Developer
Location : Valencia, CA
Duration :6 Months*
*Responsibilities:*
• Work closely with business representatives and other team members to
understand business requirements that drive the analysis, design and
development of quality technical solutions that align with business and IT
strategies and comply with corporate and regulatory standards
• Direct and participate in the full software development lifecycle
• Make recommendations towards the development of new systems or reuse of
existing systems
• Work on medium to large, varied and complex projects that require skill in
multiple technical environments and knowledge in various business areas
• Work on multiple simultaneous projects as a project team member and/or as
a project lead
• Coach and/or mentor more junior technical staff
*
Required Skills*
• Bachelor degree in Computer Science or a related area
• 7+ years of programming/systems analysis experience
• Waterfall SDLC experience
• Ability to be a self-starter in a dynamic and fast paced environment
• Microsoft technologies, including .Net, C#, VB.Net, ASP.Net, XML, HTML,
JavaScript.
• Tools: Visual Studio .Net 2008, SQL Server 2000-2008, SVN
• Database technologies: Microsoft SQL, Oracle PL/SQL
• Reporting systems: Crystal Reports Server 2008
• Regulatory software validation experience a plus

Thanks
*Vignesh
*Sr Talent Acquisation
Tel: 973-481-0100  Ext: 3069
Fax: 973 883 1488
*E mail:* vignesh.renik...@makrohealth.com
*Linkedin: 
**http://www.linkedin.com/in/vignesh1*http://www.linkedin.com/in/vignesh1

For current openings please visit
http://jobs.makrotech.com/searchjobs.aspx

Candidate HelpDesk: 973-679-5005
*
Makro Technologies Inc.*
www.makrotech.com
Corporate Headquarters: New Jersey
One Washington Park, Suite 1502, Newark, NJ 07102
*Other Offices:* Pennsylvania, Illinois, California
** Makro is a 3-time INC 5000 company for 2007/2008/2009
** Makro is a 3-time FAST 50 firm in NJ for 2005/2006/2007 (by Deloitte)
** Makro is a 3-time FAST 500 firm in USA for 2005/2006/2007 (by
Deloitte)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Problem Setting the Alpha Value for an Appwidget Background

2011-04-04 Thread Kostya Vasilyev
No. The widget is shown by a separate process, which loads drawables
independently from your own.

You could push the actual in-memory drawable over with setImageDrawable
(iirc), but that's not very efficient, although for a small image like that
should be OK.
04.04.2011 19:16 пользователь Jake Colman col...@ppllc.com написал:

 Nothing! Since the drawable is already associated with the layout,
 shouldn't it simply use the modified drawable?

 KV == Kostya Vasilyev kmans...@gmail.com writes:

 KV What do you do with bg after setting the alpha?

 KV 04.04.2011 18:44 пользователь Jake Colman col...@ppllc.com
написал:
 
  Kostya,
 
  Ok, that was easy. So now I don't crash but the background isn't
  changing either! After setting the alpha value do I need to somehow
  tell the appwidget to use the modified background? Or am I actually
  going about this the entirely wrong way and not even using the right
  method?
 
  ...Jake
 
 
  KV == Kostya Vasilyev kmans...@gmail.com writes:
 
 KV You are trying to load your own drawable from system
 KV resources. Get rid of the getSystem thing.
 
 KV 04.04.2011 17:23 пользователь Jake Colman col...@ppllc.com
 KV написал:
  
   I want to be able to set the alpha value for my appwidget's
   background so that I can control its transparency at
   runtime. After googling a bit, I came up with the following:
  
   Drawable bg =
   Resources.getSystem().getDrawable(R.drawable.appwidget_bg);
   bg.setAlpha(100);
  
   This code throws a Resources$NotFoundException.
  
   I'm sure I missed something blazingly obvious. Can someone tell me
   what it is? I suspect that the problem is since this is a widget I
   can only work with the remote views - even though I can get
   programmatic access to the resource as I did above. If that is the
   case, what is the remote view equivalent of what I am trying to
   do?
  
   Thanks.
  
   --
   Jake Colman -- Android Tinkerer
  
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 KV android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en
 
 KV --
 KV You received this message because you are subscribed to the Google
 KV Groups Android Developers group.
 KV To post to this group, send email to
 KV android-developers@googlegroups.com
 KV To unsubscribe from this group, send email to
 KV android-developers+unsubscr...@googlegroups.com
 KV For more options, visit this group at
 KV http://groups.google.com/group/android-developers?hl=en
 
  --
  Jake Colman -- Android Tinkerer
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

 KV --
 KV You received this message because you are subscribed to the Google
 KV Groups Android Developers group.
 KV To post to this group, send email to
android-developers@googlegroups.com
 KV To unsubscribe from this group, send email to
 KV android-developers+unsubscr...@googlegroups.com
 KV For more options, visit this group at
 KV http://groups.google.com/group/android-developers?hl=en

 --
 Jake Colman -- Android Tinkerer

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: (File export) What's going on with my code?[NEED HELP]

2011-04-04 Thread Alaeddine Ghribi
 All the informations are here i guess! But there is not an example :( !
Plus, the examples in in the android dev site are not very clear!
Please, can you help me(i'm noob, i know :( :D!) ?
Thanks.
Accessing files on external storage

If you're using API Level 8 or greater, use
getExternalFilesDir()http://developer.android.com/reference/android/content/Context.html#getExternalFilesDir(java.lang.String)
to
open a File http://developer.android.com/reference/java/io/File.html that
represents the external storage directory where you should save your files.
This method takes a type parameter that specifies the type of subdirectory
you want, such as
DIRECTORY_MUSIChttp://developer.android.com/reference/android/os/Environment.html#DIRECTORY_MUSIC
 and 
DIRECTORY_RINGTONEShttp://developer.android.com/reference/android/os/Environment.html#DIRECTORY_RINGTONES
 (pass null to receive the root of your application's file directory). This
method will create the appropriate directory if necessary. By specifying the
type of directory, you ensure that the Android's media scanner will properly
categorize your files in the system (for example, ringtones are identified
as ringtones and not music). If the user uninstalls your application, this
directory and all its contents will be deleted.

If you're using API Level 7 or lower, use
getExternalStorageDirectory()http://developer.android.com/reference/android/os/Environment.html#getExternalStorageDirectory(),
to open a File http://developer.android.com/reference/java/io/File.html
representing
the root of the external storage. You should then write your data in the
following directory:


/Android/data/*package_name*/files/

The *package_name* is your Java-style package name, such as 
com.example.android.app. If the user's device is running API Level 8 or
greater and they uninstall your application, this directory and all its
contents will be deleted.

2011/4/4 TreKing treking...@gmail.com

 Review this:
 http://developer.android.com/guide/topics/data/data-storage.html

 http://developer.android.com/guide/topics/data/data-storage.htmlAnd
 Google Java IO.

 Once you have a better understanding of how the system deals with Files and
 what you're actually trying to do it should be a lot easier.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Problem with activity group

2011-04-04 Thread Laxmi Verma
Hi,

I am using ActivityGroup class for one of my tab in my application.

1) There is a tab activity class calling the activitygroup class.

2) In activity group class i am calling one activity say Activity A which is
a list view.

3) On Activity A item click, I am calling another activity say Activity B.

I need to override the back button functionality in Activity A and Activity
B.

The problem which I am facing is on Activity A it is successfuly calling the
overriden onBackButton method but on Activity B instead of overriding the
back button method, it is calling the Tab Activity's back button method.  I
am not sure why?
I even debugged the code and it never goes into the onbackbutton method of
Activity B.

To resolve this I even tried calling Activity A on back button press of tab
activity which is required.  But the flow come as it goes into activity A
and then from there it goes directly to the First Activity.

I am also using Alert Dialog Box in both of the activity and passing
getParent() as context in the Alert Builder Dialog Box.

Any help in this regard will be great.


Thanks  Regards,
Laxmi Verma

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: (File export) What's going on with my code?[NEED HELP]

2011-04-04 Thread TreKing
On Mon, Apr 4, 2011 at 10:54 AM, Alaeddine Ghribi alaeddineghr...@gmail.com
 wrote:

 All the informations are here i guess! But there is not an example


You don't need an Android example. This is all standard Java IO. AGAIN:
Google Java IO. Use the Android docs to get File objects to the right
directories, then use STANDARD JAVA IO to do what you need on those STANDARD
FILE objects.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers]StringIndexOutOfBoundsException when calling ava.net.URL.openStream

2011-04-04 Thread Kostya Vasilyev
The top-level function you're calling should indeed only throw those
exceptions that are specified in its signature. But if it calls other
classes / methods, there could be all kinds of exceptions, including runtime
errors (like the one you are facing). The former would be caught and
eventualy rethrown as specified by the top-level method,  the latter can
lead to crashes.

I'd recommend you track down the source for your device's version of
HttpURLConnectionImpl.java, and take a look at the method mentioned in the
crash.

-- Kostya

2011/4/4 manigault manig...@gmail.com

 Hi all,
 I faced really nasty problem these days. I am executing the following
 code


String destination = ;// this string is initialized before
 coming here


URL url = null;
InputStream inputStream = null;
try {
url = new URL(destination);
inputStream = url.openStream();
// process the input stream
catch (IOException e) {
// handle the exception
} finally {
if (inputStream != null) {
inputStream.close();
}
}


 This was working fine so far, but i start to receive to following
 exception -


Exception: java.lang.StringIndexOutOfBoundsException
Stack Trace :
java.lang.String.substring(String.java:1579)


 org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getAuthorizationCredentials(HttpURLConnectionImpl.java:
 1769)


 org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.doRequestInternal(HttpURLConnectionImpl.java:
 1701)


 org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.doRequest(HttpURLConnectionImpl.java:
 1649)


 org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:
 1153)
java.net.URL.openStream(URL.java:653)

 I can't figure out for which values of 'destination' this exception is
 thrown but i think this should never happen. The doc says the
 openStream could throw only IOException. Any ideas ?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Building application based on 2.2 for 3.0

2011-04-04 Thread Manish Garg
Hi,

I had created one application on 2.2. Now my requirement is to run
same application on HonyComb but it is not getting build.

Do i need to take care something?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Android Layouts Are Horrible

2011-04-04 Thread Stephen Lebed
I've actually been very happy with the progress Google has made to the
layout tools.  It took a little while to get used to, but now I'm
finding it very easy to arrange and rearrange design elements.

Best,
Stephen


On Apr 3, 10:01 pm, grndvl1 grnd...@gmail.com wrote:
 Why is it I spend more time dealing with the layout of items than the
 actual coding of the program?  The Eclipse Graphical Layout tool
 really blows as it has a ton of errors and can't handle simple things
 like italic text in textview, scrollviews...  The layout parameters
 seem to be a hodge-podge of stuff thrown in there as an after thought,
 seems it wasn't really planned out.  They should have taken a lesson
 from Java's crappy Gridbag layout  and used or at least analyzed how
 Miglayout fixed many issues with Java GUI's.  I won't use any other
 layout manager other than Miglayout.  Anyway just venting here as I
 spent the last 1hr fixing something that should be so simple in a
 Scrollview/TableLayout/TableRow with ImageView and TextView in each
 row.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] [ask] responsiveness getting data from web service

2011-04-04 Thread Handita Okviyanto
Hey guys
 I wanna ask something about getting data through the web. About
consuming data from webservice. I just newbie in android. I want to
connect my application to json data on the web. I successfully made it
and running it. But the problem is about responsiveness. I using
thread to get data from the server. But when I test using my device it
takes so long and then android automatically show a dialog that my
application is not responding and providing user to close it. It maybe
takes more than 5 seconds to fetch data from the server. I am not
understand intent service yet. Maybe somebody can help me to find out
the problem. Or I make mistake in designing my application..? Please
help me

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] [ask] responsiveness getting data from web service

2011-04-04 Thread Handita Okviyanto
Hey guys
 I wanna ask something about getting data through the web. About
consuming data from webservice. I just newbie in android. I want to
connect my application to json data on the web. I successfully made it
and running it. But the problem is about responsiveness. I using
thread to get data from the server. But when I test using my device it
takes so long and then android automatically show a dialog that my
application is not responding and providing user to close it. It maybe
takes more than 5 seconds to fetch data from the server. I am not
understand intent service yet. Maybe somebody can help me to find out
the problem. Or I make mistake in designing my application..? Please
help me

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] [ask] responsiveness getting data from web service

2011-04-04 Thread Kostya Vasilyev
Based on this:


But the problem is about responsiveness. I using
thread to get data from the server. But when I test using my device it
takes so long and then android automatically show a dialog that my
application is not responding and providing user to close it. It maybe
takes more than 5 seconds to fetch data from the server.


you are not using a thread, or not using it correctly. One frequent mistake
is to treat Thread as a Runnable and call myThread.run() - this does not
start the thread, but rather executes the thread's worker function right
there. Use myThread.start() to start a thread.

Take a look as Androd's AsyncTask class that makes this type of thing
easier, including updating the UI with progress information, and showing the
data fetched from the net in your UI.

-- Kostya

2011/4/4 Handita Okviyanto viyanatm...@gmail.com

 Hey guys
  I wanna ask something about getting data through the web. About
 consuming data from webservice. I just newbie in android. I want to
 connect my application to json data on the web. I successfully made it
 and running it. But the problem is about responsiveness. I using
 thread to get data from the server. But when I test using my device it
 takes so long and then android automatically show a dialog that my
 application is not responding and providing user to close it. It maybe
 takes more than 5 seconds to fetch data from the server. I am not
 understand intent service yet. Maybe somebody can help me to find out
 the problem. Or I make mistake in designing my application..? Please
 help me

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Layout and GraphicsView

2011-04-04 Thread henry
I need to add two buttons and one textView with a Graphicsview. How do
I do this? I noticed an expert, Tony Obrien, has an code example,
Could you share with me?

Thanks,

-Henry




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Where is the source code of ADT

2011-04-04 Thread Tor Norbye
The source code for ADT is here:
http://android.git.kernel.org/?p=platform/sdk.git;a=summary

See http://source.android.com/source/download.html for instructions on
how to get the source, and see http://tools.android.com/build for
instructions on how to build the ADT.

-- Tor

On Sat, Apr 2, 2011 at 1:18 AM, 单单 birb...@gmail.com wrote:
 Hi All,

 Could anyone tell me that where the source code of ADT (Android
 Development Tools) plugin is. Thanks in advance!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: [ask] responsiveness getting data from web service

2011-04-04 Thread Handita Okviyanto
Oke. I will try it.
Thanks for the response

On Apr 4o, 11:18 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Based on this:



 But the problem is about responsiveness. I using
 thread to get data from the server. But when I test using my device it
 takes so long and then android automatically show a dialog that my
 application is not responding and providing user to close it. It maybe
 takes more than 5 seconds to fetch data from the server.
 

 you are not using a thread, or not using it correctly. One frequent mistake
 is to treat Thread as a Runnable and call myThread.run() - this does not
 start the thread, but rather executes the thread's worker function right
 there. Use myThread.start() to start a thread.

 Take a look as Androd's AsyncTask class that makes this type of thing
 easier, including updating the UI with progress information, and showing the
 data fetched from the net in your UI.

 -- Kostya

 2011/4/4 Handita Okviyanto viyanatm...@gmail.com



  Hey guys
   I wanna ask something about getting data through the web. About
  consuming data from webservice. I just newbie in android. I want to
  connect my application to json data on the web. I successfully made it
  and running it. But the problem is about responsiveness. I using
  thread to get data from the server. But when I test using my device it
  takes so long and then android automatically show a dialog that my
  application is not responding and providing user to close it. It maybe
  takes more than 5 seconds to fetch data from the server. I am not
  understand intent service yet. Maybe somebody can help me to find out
  the problem. Or I make mistake in designing my application..? Please
  help me

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Represent Graphically a Tree

2011-04-04 Thread TreKing
On Mon, Apr 4, 2011 at 9:06 AM, Jordan trolldr...@lulz-industries.orgwrote:

 What would be the best way to represent a data tree graphically?


ExpandableListView?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Mac phone

2011-04-04 Thread bob
I tried typing lsusb and it says this:

-bash: lsusb: command not found


On Apr 3, 6:53 am, Nasif Noorudeen nas...@gmail.com wrote:
 use  lsusb

 check  it is detcting in usb after enabling usb-debugging..



 On Sun, Apr 3, 2011 at 2:46 AM, Oliver Crow cro...@gmail.com wrote:
  I found I had this problem with my xperia x10, I installed PDAnet, which
  installs further drivers for your individual phone.

  On 2 Apr 2011, at 22:03, lbendlin l...@bendlin.us wrote:

  as long as you have checked the development box on your phone it will work
  with an Intel Mac and OSX 10.6.5 plus

  Sometimes you have to reboot your phone while leaving it connected for ADB
  to see it again.

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  android-developers@googlegroups.com
  To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en
 http://groups.google.com/group/android-developers?hl=en

   --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


  1   2   3   >