[android-developers] Re: TextToSpeech synthesizeToFile() problem

2010-02-23 Thread Dimitry Hristov
Greg, thank you for the answer, now I know the problem is on my side.

Yes I was able to write a file with OutputStreamWriter. Did it to /
data/data/[my_package_name]/files not to the /sdcard though.

The strange thing is that synthesizeToFile returns
TextToSpeech.SUCCESS, while LogCat reports an error saying
"android_tts_SynthProxy_synthesizeToFile(): error creating output
file".

I'll try using different AVD versions and investigate. Otherwise will
have to install API sources and see what's inside.





On Feb 22, 9:26 pm, greg  wrote:
> Hi Dimitry,
>
> I think it's working (as I've used the same document you referenced to
> setup the emulator to write TTS output to a file).  Have you tried
> writing any file from your emulated application?   If your application
> also cannot write a file, perhaps the emulated SD card is not setup
> correctly.
>
> - Greg
>
> On Feb 22, 6:58 am, Dimitry Hristov  wrote:
>
> > I'm following the official docs 
> > athttp://developer.android.com/resources/articles/tts.html
> > and trying to synthesize a String to a file:
>
> >         private OnClickListener saveBtnListener = new OnClickListener() {
> >                 @Override
> >                 public void onClick(View v) {
> >                         int x = mTts.synthesizeToFile("hello", null, 
> > "/asdcard/
> > wakeUp.wav");
>
> >                         if(x == TextToSpeech.SUCCESS) {
> >                                 Toast toast = Toast.makeText(context, 
> > "Saved "+x,
> > Toast.LENGTH_SHORT);
> >                                 toast.show();
> >                         }
> >                 }
> >         };
>
> > Then I run adb shell on the emulator to check if there is anything
> > saved to the file system. And there is nothing. I tried to save to non
> > existent folders, but synthesizeToFile still reports SUCCESS and
> > nothing new appears in the file system.
>
> > Am I missing something or synthesizeToFile is just not working?

-- 
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: What does the prefix 'm' stand for ?

2010-02-23 Thread Kaj Bjurman
I don't buy that argument since since all of the core classes in Java
are written without prefixes of any kind, and many of the classes were
implemented before IDEs became popular. I do also think that the
convention would have been added to the "Code Conventions for the Java
Programming Language" (http://java.sun.com/docs/codeconv/html/
CodeConvTOC.doc.html) if Sun thought that it added some great value.

One thing that I have observed (it could be 100% wrong, but it's based
on reading Java code since the language was released in 1996) is that
most people who think they need prefixes and odd conventions write too
long methods, or too complex logic, and often in combination with
classes that are doing more than one thing. There's not need of
prefixing if your methods are short and easy to read (IMHO).



On 22 Feb, 17:05, Romain Guy  wrote:
> I myself am not fond of prefixes, especially since languages like Java
> already have "this." when you need to distinguish local vars vs
> members. Also, modern IDEs highlight fields differently from local
> variables.
>
> It does make sense however on a project like Android where not
> everybody is necessarily using an IDE. And it's just a coding
> convention :)
>
>
>
>
>
> On Sun, Feb 21, 2010 at 10:20 PM, Frank Weiss  wrote:
> > I'm one of those guys who think scope prefixes, like "m", are more trouble
> > than they're worth. The fact that you had to explain it to a newbie makes me
> > smile.
>
> > On Sun, Feb 21, 2010 at 10:04 PM, Romain Guy  wrote:
>
> >> It stands for "member." I believe the use of an "m" prefix with MFC
> >> has nothing to do with the name MFC either, but rather to identify
> >> variables that are class members as opposed to local variables for
> >> instance.
>
> >> On Sun, Feb 21, 2010 at 9:52 PM, Christ  wrote:
> >> > Hi guys,
>
> >> > I saw many sample codes that each variable contains the 'm' prefix. I
> >> > don't know what this m means.
> >> > I have two-year experience in MFC. Each variable has 'm' prefix to
> >> > tell you that I'm the one variable of MFC component. (m stands for
> >> > MFC).
> >> > So...can anybody answer me this question?
>
> >> > Regards,
> >> > Christ
>
> >> > --
> >> > 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
>
> >> --
> >> Romain Guy
> >> Android framework engineer
> >> romain...@android.com
>
> >> Note: please don't send private questions to me, as I don't have time
> >> to provide private support.  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 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
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  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: Is there a normal human way to copy image from one folder to another?

2010-02-23 Thread benderillo
Thanks Anton.

It sounds like too much extra work for so simple and basic operation.
But, I guess this is only approach which would work for android.
Slightly disappointing though...
__
Alex


On Feb 19, 4:23 am, Streets Of Boston  wrote:
> No. You have to do this all yourself :(
>
> 1. Query from the mediastore all the info for your originalimage,
> including its file-path (DATA column).
> 2. Query from the thumbnail mediastore the info of all the thumbnails
> (can have more than one) for the givenimage.
>
> 3.Copyyourimage-file to another location. Remember this location
> for the new DATA column of your newimage.
>
> 4. Insert into the mediastore all the data obtained from point (1.)
> but set your DATA to the new file-path of your newimage(from point
> 3.).
> 5. Insert into the thumbnail mediastore the thumbnails of this newimage. Use 
> the data from point (2.), but update the IMAGE_ID with the
> newimage-id from point (4.) and make also copies of each thumbnail
> file (DATA column).
>
> On Feb 17, 9:19 pm, benderillo  wrote:
>
>
>
> > Hi everybody,
>
> > Here is the problem:
> > I'm trying to figure out the bestwaytocopyexisitng jpegimageon
> > SD card from one folder to another with MediaStore database properly
> > updated.
>
> > First approach I tried:
> > 1) Open IN and OUT streams; 2)Copyfile to a new location as byte
> > stream; 3) Use MediaScannerConnection.scanFile() to update MediaStore
> > DB.
> > Thiswayworks fine except one problem:imagethumbnail is not
> > generated (MediaStore.Images.Thumbnails is empty). I looked inside
> > "scanFile" method; it doesn't seem to have any code for thumbnail
> > generation.
>
> > Second approach:
> > Try to use Images.Media.insertImage() - with this approach I don't
> > know how to chose the physical location of the new file. You can't
> > control this. You just get an Uri to acopyof theimagewhich is
> > copied (re-encoded) to some place but not the folder you need it to be
> > in.
>
> > In other words, my question is: Isthereanywayto give MediaStore an
> >imagefile and say "Please, take this file and fill up your database
> > with all the information it should have, including thumbnail"?- Hide quoted 
> > text -
>
> - Show quoted text -

-- 
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] question about handle and runnables

2010-02-23 Thread Néstor Pavón Puro
Maybe because the second option is not to much time displayed? Put more time 
between the second and the third option.

--- El mar, 23/2/10, Michael Lam  escribió:

De: Michael Lam 
Asunto: [android-developers] question about handle and runnables
Para: "Android Developers" 
Fecha: martes, 23 de febrero, 2010 06:58

hi,

i am using handle and runnables to switch/change the content of the
TextView using a "timer". for some reason, when running, the app
always skips the second step ("Step Two: fry egg"), and only show the
last (third) step ("Step three: serve egg").


TextView t;
    private String sText;

    private Handler mHandler = new Handler();

    private Runnable mWaitRunnable = new Runnable() {
        public void run() {
            t.setText(sText);
        }
    };

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.main);

        mMonster = BitmapFactory.decodeResource(getResources(),
                R.drawable.monster1);

        t=new TextView(this);
        t=(TextView)findViewById(R.id.TextView01);

        sText = "Step One: unpack egg";
        t.setText(sText);

        sText = "Step Two: fry egg";
        mHandler.postDelayed(mWaitRunnable, 3000);

        sText = "Step three: serve egg";
        mHandler.postDelayed(mWaitRunnable, 4000);
        ...
}

-- 
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] Dragging a particular view in a viewgroup

2010-02-23 Thread mmkr
 Hi,

  I want to create a  custom layout(View group) in which dragging of
a particular view is possible like that in home screen.I tried by
creating custom layout in which I added views but i'm not able to drag
views.So if any one knows the solution please suggest me.

 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


[android-developers] Re: Petition: Google, please improve the Android Market.

2010-02-23 Thread Rob Irondad
Thanks for the feedback.

I didn't know about the carrier's cut, this is interesting.
I still want to remind readers that the service is not free because I
think it is an important 'detail', but I'll rephrase this sentence to
make it more accurate / fair to Google.

--
Rob

On Feb 23, 3:16 am, "Maps.Huge.Info (Maps API Guru)"
 wrote:
> You might want to drop the "let's not forget" clause as it's something
> that wouldn't help anypetitionand could keep people from agreeing
> with you.
>
> Google doesn't get 30% of your app sales, the carrier's cut, taxes,
> fees for the merchant account and other costs eat that up to probably
> zero profit or near to it.
>
> -John Coryat

-- 
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: Display a picture for few seconds before running into the main stream

2010-02-23 Thread Carl Whalley
This should give you some pointers:
http://www.androidacademy.com/3-tutorials/43-hands-on/167-coolsplash-an-interactive-splash-toy-for-android-apps

On Feb 22, 10:06 am, CMF  wrote:
> Hi all, I would like to display a picture for 2secons before running
> into the main stream of the program
> public void onCreate(Bundle savedInstanceState) {
>       super.onCreate(savedInstanceState);
>       setContentView(R.layout.startupImage);//startupImage contains a
> ImageView
>       //here I want to wait for 2 second
>       SystemClock.sleep(2000);//here the screen becomes blank:(
>       setContentView(R.layout.main);
>
>
>
> }

-- 
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: question about handle and runnables

2010-02-23 Thread Kaj Bjurman
No, that isn't the problem.


On 23 Feb, 09:24, Néstor Pavón Puro  wrote:
> Maybe because the second option is not to much time displayed? Put more time 
> between the second and the third option.
>
> --- El mar, 23/2/10, Michael Lam  escribió:
>
> De: Michael Lam 
> Asunto: [android-developers] question about handle and runnables
> Para: "Android Developers" 
> Fecha: martes, 23 de febrero, 2010 06:58
>
> hi,
>
> i am using handle and runnables to switch/change the content of the
> TextView using a "timer". for some reason, when running, the app
> always skips the second step ("Step Two: fry egg"), and only show the
> last (third) step ("Step three: serve egg").
>
> TextView t;
>     private String sText;
>
>     private Handler mHandler = new Handler();
>
>     private Runnable mWaitRunnable = new Runnable() {
>         public void run() {
>             t.setText(sText);
>         }
>     };
>
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>
>         setContentView(R.layout.main);
>
>         mMonster = BitmapFactory.decodeResource(getResources(),
>                 R.drawable.monster1);
>
>         t=new TextView(this);
>         t=(TextView)findViewById(R.id.TextView01);
>
>         sText = "Step One: unpack egg";
>         t.setText(sText);
>
>         sText = "Step Two: fry egg";
>         mHandler.postDelayed(mWaitRunnable, 3000);
>
>         sText = "Step three: serve egg";
>         mHandler.postDelayed(mWaitRunnable, 4000);
>         ...
>
> }
>
> --
> 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 
> athttp://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: Folder Chooser?

2010-02-23 Thread skink


On Feb 22, 10:36 pm, Robert Green  wrote:
> Hey guys, I'm wondering if anyone has a lead on some nice code to do a
> Folder Chooser / Directory Picker?  I know they wrote one at
> OpenIntents but I don't want to package the whole OI thing with my app
> - it'll make it bigger than I need.
>
> I just want a nice interface for picking directories (As in, a
> directory of images to slideshow).  Ideas?

hi, what about this one: http://www.anddev.org/file-folder_picker-t11422.html

you probably need to be logged to download  source attachment

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: Storing image in phone memory - exception

2010-02-23 Thread A R
Hello Venkat,
 Thanks for responding.

What is the difference between /data/data(app.memory) and own package
application memory? I thought they both are same.

 Thanks for the code, I am already able to write directly but I don't
want to do that because I want my image to be listed in Gallery on
save.

On Feb 23, 11:43 am, venkat ranjit  wrote:
> hi amit ,
>
>          in android we have no priviliges to write /data/data(app.memory)
> but we have premissions to write files in our own package application
> memory.i am sending a files that read and write data in application memory
> and sdcard both , i think this will helps u .
>
> Regards,
> Ranjit
>
> On Tue, Feb 23, 2010 at 11:51 AM, A R  wrote:
> > Hi,
>
> >  I am trying to store an image in phone memory /data/data/com.myapp/
> > files/here.jpeg but I keep getting an exception. If I try to store the
> > image using the normal 'FileOutputStream' it works fine. Can anyone
> > point out what am I doing wrong? I want to store an image in my phone
> > memory app folder so that when user is setting wallpaper the image can
> > be listed in 'gallery'. I do not want to store the image on sdcard.
>
> >  The same code works fine if I store the image in sdcard, only thing I
> > change is EXTERNAL_CONTENT_URI
>
> > ContentValues values = new ContentValues();
> >                values.put(MediaStore.MediaColumns.DATA, outPath);
> >                values.put(MediaStore.MediaColumns.TITLE, "testing1");
> >                values.put(MediaStore.MediaColumns.SIZE, file.length());
> >                values.put(MediaStore.MediaColumns.MIME_TYPE, "image/jpeg");
>
> >                Uri uri =
>
> > context.getContentResolver().insert(android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI,
> > values);
>
> >                Bitmap sourceBitmap = BitmapFactory.decodeByteArray(data, 0,
> > data.length);
>
> >                try {
> >                    OutputStream outStream =
> > context.getContentResolver().openOutputStream(uri);
> >                    sourceBitmap.compress(Bitmap.CompressFormat.JPEG, 50,
> > outStream);
> >                    outStream.close();
> >                } catch (Exception e) {
> >                    Logger.d("exception while writing image: ");
> >                }
>
> > The exception I am getting is:
>
> > 02-23 05:56:30.036: ERROR/MediaProvider(188): File creation failed
> > 02-23 05:56:30.036: ERROR/MediaProvider(188): java.io.IOException:
> > Parent directory of file is not writable: /data/data/com.myapp/files/
> > somefile.jpeg
> > 02-23 05:56:30.036: ERROR/MediaProvider(188):     at
> > java.io.File.createNewFile(File.java:1263)
> > 02-23 05:56:30.036: ERROR/MediaProvider(188):     at
>
> > com.android.providers.media.MediaProvider.ensureFileExists(MediaProvider.java:
> > 1670)
> > 02-23 05:56:30.036: ERROR/MediaProvider(188):     at
> > com.android.providers.media.MediaProvider.ensureFile(MediaProvider.java:
> > 1344)
> > 02-23 05:56:30.036: ERROR/MediaProvider(188):     at
>
> > com.android.providers.media.MediaProvider.insertInternal(MediaProvider.java:
> > 1413)
> > 02-23 05:56:30.036: ERROR/MediaProvider(188):     at
> > com.android.providers.media.MediaProvider.insert(MediaProvider.java:
> > 1381)
> > 02-23 05:56:30.036: ERROR/MediaProvider(188):     at
> > android.content.ContentProvider$Transport.insert(ContentProvider.java:
> > 150)
> > 02-23 05:56:30.036: ERROR/MediaProvider(188):     at
>
> > android.content.ContentProviderNative.onTransact(ContentProviderNative.java:
> > 140)
> > 02-23 05:56:30.036: ERROR/MediaProvider(188):     at
> > android.os.Binder.execTransact(Binder.java:287)
> > 02-23 05:56:30.036: ERROR/MediaProvider(188):     at
> > dalvik.system.NativeStart.run(Native Method)
> > 02-23 05:56:30.066: ERROR/DatabaseUtils(188): Writing exception to
> > parcel
> > 02-23 05:56:30.066: ERROR/DatabaseUtils(188):
> > java.lang.IllegalStateException: Unable to create new file: /data/data/
> > com.myapp/files/somefile.jpeg
> > 02-23 05:56:30.066: ERROR/DatabaseUtils(188):     at
> > com.android.providers.media.MediaProvider.ensureFile(MediaProvider.java:
> > 1345)
> > 02-23 05:56:30.066: ERROR/DatabaseUtils(188):     at
>
> > com.android.providers.media.MediaProvider.insertInternal(MediaProvider.java:
> > 1413)
> > 02-23 05:56:30.066: ERROR/DatabaseUtils(188):     at
> > com.android.providers.media.MediaProvider.insert(MediaProvider.java:
> > 1381)
> > 02-23 05:56:30.066: ERROR/DatabaseUtils(188):     at
> > android.content.ContentProvider$Transport.insert(ContentProvider.java:
> > 150)
> > 02-23 05:56:30.066: ERROR/DatabaseUtils(188):     at
>
> > android.content.ContentProviderNative.onTransact(ContentProviderNative.java:
> > 140)
> > 02-23 05:56:30.066: ERROR/DatabaseUtils(188):     at
> > android.os.Binder.execTransact(Binder.java:287)
> > 02-23 05:56:30.066: ERROR/DatabaseUtils(188):     at
> > dalvik.system.NativeStart.run(Native Method)
>
> > --
> > You received this message because you are subscribed to the Google

[android-developers] Re: TextToSpeech synthesizeToFile() problem

2010-02-23 Thread Dimitry Hristov
Indeed it works now. After removing my old AVD and creating a new one.



On Feb 23, 10:05 am, Dimitry Hristov  wrote:
> Greg, thank you for the answer, now I know the problem is on my side.
>
> Yes I was able to write a file with OutputStreamWriter. Did it to /
> data/data/[my_package_name]/files not to the /sdcard though.
>
> The strange thing is that synthesizeToFile returns
> TextToSpeech.SUCCESS, while LogCat reports an error saying
> "android_tts_SynthProxy_synthesizeToFile(): error creating output
> file".
>
> I'll try using different AVD versions and investigate. Otherwise will
> have to install API sources and see what's inside.
>
> On Feb 22, 9:26 pm, greg  wrote:
>
> > Hi Dimitry,
>
> > I think it's working (as I've used the same document you referenced to
> > setup the emulator to write TTS output to a file).  Have you tried
> > writing any file from your emulated application?   If your application
> > also cannot write a file, perhaps the emulated SD card is not setup
> > correctly.
>
> > - Greg
>
> > On Feb 22, 6:58 am, Dimitry Hristov  wrote:
>
> > > I'm following the official docs 
> > > athttp://developer.android.com/resources/articles/tts.html
> > > and trying to synthesize a String to a file:
>
> > >         private OnClickListener saveBtnListener = new OnClickListener() {
> > >                 @Override
> > >                 public void onClick(View v) {
> > >                         int x = mTts.synthesizeToFile("hello", null, 
> > > "/asdcard/
> > > wakeUp.wav");
>
> > >                         if(x == TextToSpeech.SUCCESS) {
> > >                                 Toast toast = Toast.makeText(context, 
> > > "Saved "+x,
> > > Toast.LENGTH_SHORT);
> > >                                 toast.show();
> > >                         }
> > >                 }
> > >         };
>
> > > Then I run adb shell on the emulator to check if there is anything
> > > saved to the file system. And there is nothing. I tried to save to non
> > > existent folders, but synthesizeToFile still reports SUCCESS and
> > > nothing new appears in the file system.
>
> > > Am I missing something or synthesizeToFile is just not working?

-- 
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: Storing image in phone memory - exception

2010-02-23 Thread A R
Hello Venkat,
 Thanks for responding.

What is the difference between /data/data(app.memory) and own package
application memory? I thought they both are same.

 Thanks for the code, I am already able to write directly but I don't
want to do that because I want my image to be listed in Gallery on
save.

On Feb 23, 11:43 am, venkat ranjit  wrote:
> hi amit ,
>
>          in android we have no priviliges to write /data/data(app.memory)
> but we have premissions to write files in our own package application
> memory.i am sending a files that read and write data in application memory
> and sdcard both , i think this will helps u .
>
> Regards,
> Ranjit
>
> On Tue, Feb 23, 2010 at 11:51 AM, A R  wrote:
> > Hi,
>
> >  I am trying to store an image in phone memory /data/data/com.myapp/
> > files/here.jpeg but I keep getting an exception. If I try to store the
> > image using the normal 'FileOutputStream' it works fine. Can anyone
> > point out what am I doing wrong? I want to store an image in my phone
> > memory app folder so that when user is setting wallpaper the image can
> > be listed in 'gallery'. I do not want to store the image on sdcard.
>
> >  The same code works fine if I store the image in sdcard, only thing I
> > change is EXTERNAL_CONTENT_URI
>
> > ContentValues values = new ContentValues();
> >                values.put(MediaStore.MediaColumns.DATA, outPath);
> >                values.put(MediaStore.MediaColumns.TITLE, "testing1");
> >                values.put(MediaStore.MediaColumns.SIZE, file.length());
> >                values.put(MediaStore.MediaColumns.MIME_TYPE, "image/jpeg");
>
> >                Uri uri =
>
> > context.getContentResolver().insert(android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI,
> > values);
>
> >                Bitmap sourceBitmap = BitmapFactory.decodeByteArray(data, 0,
> > data.length);
>
> >                try {
> >                    OutputStream outStream =
> > context.getContentResolver().openOutputStream(uri);
> >                    sourceBitmap.compress(Bitmap.CompressFormat.JPEG, 50,
> > outStream);
> >                    outStream.close();
> >                } catch (Exception e) {
> >                    Logger.d("exception while writing image: ");
> >                }
>
> > The exception I am getting is:
>
> > 02-23 05:56:30.036: ERROR/MediaProvider(188): File creation failed
> > 02-23 05:56:30.036: ERROR/MediaProvider(188): java.io.IOException:
> > Parent directory of file is not writable: /data/data/com.myapp/files/
> > somefile.jpeg
> > 02-23 05:56:30.036: ERROR/MediaProvider(188):     at
> > java.io.File.createNewFile(File.java:1263)
> > 02-23 05:56:30.036: ERROR/MediaProvider(188):     at
>
> > com.android.providers.media.MediaProvider.ensureFileExists(MediaProvider.java:
> > 1670)
> > 02-23 05:56:30.036: ERROR/MediaProvider(188):     at
> > com.android.providers.media.MediaProvider.ensureFile(MediaProvider.java:
> > 1344)
> > 02-23 05:56:30.036: ERROR/MediaProvider(188):     at
>
> > com.android.providers.media.MediaProvider.insertInternal(MediaProvider.java:
> > 1413)
> > 02-23 05:56:30.036: ERROR/MediaProvider(188):     at
> > com.android.providers.media.MediaProvider.insert(MediaProvider.java:
> > 1381)
> > 02-23 05:56:30.036: ERROR/MediaProvider(188):     at
> > android.content.ContentProvider$Transport.insert(ContentProvider.java:
> > 150)
> > 02-23 05:56:30.036: ERROR/MediaProvider(188):     at
>
> > android.content.ContentProviderNative.onTransact(ContentProviderNative.java:
> > 140)
> > 02-23 05:56:30.036: ERROR/MediaProvider(188):     at
> > android.os.Binder.execTransact(Binder.java:287)
> > 02-23 05:56:30.036: ERROR/MediaProvider(188):     at
> > dalvik.system.NativeStart.run(Native Method)
> > 02-23 05:56:30.066: ERROR/DatabaseUtils(188): Writing exception to
> > parcel
> > 02-23 05:56:30.066: ERROR/DatabaseUtils(188):
> > java.lang.IllegalStateException: Unable to create new file: /data/data/
> > com.myapp/files/somefile.jpeg
> > 02-23 05:56:30.066: ERROR/DatabaseUtils(188):     at
> > com.android.providers.media.MediaProvider.ensureFile(MediaProvider.java:
> > 1345)
> > 02-23 05:56:30.066: ERROR/DatabaseUtils(188):     at
>
> > com.android.providers.media.MediaProvider.insertInternal(MediaProvider.java:
> > 1413)
> > 02-23 05:56:30.066: ERROR/DatabaseUtils(188):     at
> > com.android.providers.media.MediaProvider.insert(MediaProvider.java:
> > 1381)
> > 02-23 05:56:30.066: ERROR/DatabaseUtils(188):     at
> > android.content.ContentProvider$Transport.insert(ContentProvider.java:
> > 150)
> > 02-23 05:56:30.066: ERROR/DatabaseUtils(188):     at
>
> > android.content.ContentProviderNative.onTransact(ContentProviderNative.java:
> > 140)
> > 02-23 05:56:30.066: ERROR/DatabaseUtils(188):     at
> > android.os.Binder.execTransact(Binder.java:287)
> > 02-23 05:56:30.066: ERROR/DatabaseUtils(188):     at
> > dalvik.system.NativeStart.run(Native Method)
>
> > --
> > You received this message because you are subscribed to the Google

[android-developers] About intercept sms

2010-02-23 Thread nigel
Hi,all
I have a requirement as follow:

1.When receive a short message,I hope my app can intercept it.
2.At the same time I can get its content to a custom table,and system
cannot send a notification to user.
3.The new short message's notification is sent by my app.

Now I already finish this function,But have some issues.

I use ContentObserver class to implement this function,When I run it
on emulator,it's well.But when I run it on a actual device,It will
occur below issues:

I sent a message to target device.The system still send notification
for the new message.After few seconds,My custom notification send by
my app,too.So,There are two notifications for the same message.And
when user click system's notification,he will can't read the new
message,because I already delete it before my app's notification send
to user.

Can you help me to solve this problem.For example:I can receive a sms
befor it store into database or let sms notification not work when
some message can match condition I specify.

Thanks a lot.

-- 
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: "java.security.NoSuchAlgorithmException: SSLContext SSL implementation not found"

2010-02-23 Thread Android-kums
Please help for my issue.

On Feb 22, 11:13 am, Android-kums  wrote:
> If anybody know about this issue,give me a solution.
>
> Thanks,kums.

-- 
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] Impossible to test contact groups in Android 2.0 with-out a physical phone?

2010-02-23 Thread pistol
My app (first written for Android 1.6) reads groups and contacts but I
have so far only been able to write code for 2.0 that compiles but I
have never executed.
Since the Contacts API and particularly the way groups work has
changed substantially in ways that I haven't quite been able to find
out I need to try it on a phone to see how it now works.

So is there any way at all I can test contact groups in the emulator?

I have looked all over for help on this and all I have been able to
glean is that I cannot get groups into the emulator unless I create
them in a Google (or other, Exchange?) account then sync with it.
However I cannot seem to sync/open an account from my emulator - and
this I have read may be impossible as you can only do it from a phone
with a valid IMEI.

Will I have to buy a phone?

thanks for any help.

Pete

-- 
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] Remote Test your apps on real phones with Sony Ericsson Perfecto Mobile

2010-02-23 Thread SonyEricsson DeveloperWorld
Perfecto mobile is a remote device testing from Sony Ericsson that
enables you to be sure that your application works on a real device
even though you don’t have it in your hand.

The Perfecto Mobile service enables you to

* Test on a range of real Sony Ericsson handsets via the Internet
* Test on pre-launched Sony Ericsson phones
* Remotely access various mobile networks and geographies.
* Showcase your application with snapshots and video clips
* Run automated tests across multiple handsets


More information is available at http://bit.ly/coUR5D

-- 
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] Remote Test your apps on real phones with Sony Ericsson Perfecto Mobile

2010-02-23 Thread SonyEricsson DeveloperWorld
Perfecto mobile is a remote device testing from Sony Ericsson that
enables you to be sure that your application works on a real device
even though you don’t have it in your hand.

The Perfecto Mobile service enables you to

* Test on a range of real Sony Ericsson handsets via the Internet
* Test on pre-launched Sony Ericsson phones
* Remotely access various mobile networks and geographies.
* Showcase your application with snapshots and video clips
* Run automated tests across multiple handsets


More information is available at http://bit.ly/coUR5D

-- 
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: eclipse linkedResources - linked layout xml is neither included in the apk nor generated

2010-02-23 Thread Adrian Vintu
Hi Bob,

Thank you for your input. I think they are all interesting ideas.

I have decided to use another approach though.

So here is how we are standing:
Project A (Java) is the common base and holds the layout xmls.
Projects B, C, etc (Android) are the regular applications.

I will make Eclipse file links in project B, C, etc to all the layout xmls
from project A.
I will add a prebuild script that will physically copy the files from
project A if no hard copy already exists in project B, C, etc (so physically
copy the linked files). The aapt will run ok.
Then I guess I will also have to delete them on post build.


I choose this way because it fits most for what I need. I also like it
because I have a visual representation of linked xmls. I can at any time
replace the linked xmls with custom ones, and I will immediately get visual
feedback - the linked/physical file icons in Eclipse.

It is a little bit weird, but I think, as usability, this fits my purposes
best.

Thank you,
BR,
Adrian Vintu


On Mon, Feb 22, 2010 at 5:11 PM, Bob Kerns  wrote:

> Yeah, google-fu fails when you are the first to try something -- or
> when those who have gone before are too foolish to ask their question
> in public!
>
> This way you get to both pose the question and the answer for the next
> person to try this.
>
> Anyway, the first thing I'd do is to think long and hard about my
> reasons for wanting to do this. If there's really not enough benefit,
> then don't do it; that's the simplest way.
>
> Otherwise, I'd write an ant script, and add an ant builder to my
> project that copies it in from the source. You'll want to set it up to
> run whenever the source changes, and to refresh the output file
> whenever the script runs. This way, it'll run the script, do the copy,
> and then tell Eclipse that the file has changed.
>
> But you won't be able to edit the file in res/ in Eclipse, without
> losing your changes. That may be a steep price to pay.
>
> A better solution, in my opinion, is to have them be separate files
> with a common ancestor, and use your revision control systems merging
> capabilities to merge changes back and forth. For example, with
> Subversion, use 'svn copy source/layout/main.xml res/layout/main.xml'
> to make the local res/layout copy, such that it is a descendant of the
> source/layout file.
>
> Then use 'svn merge' to merge changes between the two files.
>
> (Of course, you'll need 'svn commit' after each step, before touching
> these files again, but you can combine that with other changes).
>
> A big advantage of this approach is that you can have changes which
> you do NOT merge back, but only exist in one of the projects using the
> common source. And yet you can continue to merge other changes back
> and forth as needed. It's not as automatic, but it also leaves a
> better audit trail.
>
> On Feb 22, 6:47 am, Adrian Vintu  wrote:
> > Ok, I found it. Seems the resources are built using the aapt.exe command
> > line. This means, only physical files are taken into account...
> >
> > Anyone has an idea on a workarround for this? - to also make the linked
> > files be physically included in the RES folder but also be updated if the
> > source changes? Without using symlinks and stuff like that?
> >
> > Thank you,
> > BR,
> > Adrian Vintu
> >
>
> --
> 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] how to get user info

2010-02-23 Thread Narendra Bagade
Hi all,

Is there any way to get user info like email ID,phone number,country through
our application.

I mean ,Is there any api that will read this information of mobile user.

Please help me on this requirement..
-- 
Regards,

Narendra B
9632382960,
Bangalore.

-- 
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: help me

2010-02-23 Thread dillirao malipeddi
please write these lines inside button click listener code *not in
onCreate()*

username = name.getText().toString();
password = pass.getText().toString();


On Fri, Feb 19, 2010 at 2:47 PM, SREEHARI
wrote:

> As Darshana said u dint say what is the exact problem.
> Is this code getting failed for authentication??
> Use ".equals" instead of "=="
>
> *if (username.equals("kami") && password.equals("kami"))
>
> Hope this will work
>
>
> --
> 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
>



-- 
Thank you,
Dilli Rao. M
www.arijasoft.com

-- 
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: Singleton Service ???

2010-02-23 Thread MobDev
actually I had a question regarding this...
I made a service which plays an MP3, so it uses a single instance (in
the whole service) of MediaPlayer..
Still I noticed (by mistake because the Service didn't get closed
while exiting my main Activity) that the Service obviously kept
running, but when I restarted my app it created another Service which
also could play the MP3, thus creating a "mixing" effect, having the
same MP3 playing double... The second one I could stop through my App
but the first "lost" one couldn't be stopped...
To me this doesn't look like a Singleton's behaviour, I actually have
two seperate entities of a Service running in the system...
Also, a little question, I use the onBind() method and the .aidl
interface methology to create my Service... Is there a correct way to
stop a Service ? And if so where should this be implemented (for
example unBind() in the onDestroy() method of my main Activity) ?
Thanks in advance Mark (or anyone who might shed some light on my
issue) !

On 11 feb, 17:11, "Mark Murphy"  wrote:
> > I'd like to know if it's possible to create a Singelton Service
> > throughout an application ?
>
> Services are singletons by their very nature.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.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


[android-developers] how to convert mp3to PCM format in android

2010-02-23 Thread kavitha
Hi All,

Is there any way to convert mp3 to PCM stream in android?

Please help.

Thanks
Kavitha

-- 
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] Experience with different Android devices and apps shown in Android Market

2010-02-23 Thread androidDeveloper
I am interested in your experience with Android apps. Do you have
problems with some devices (errors, crashes...), apps that are not
shown on some devices or other problems?

If you have some of these problems,  is it clear to you where the
problem comes from?

Greetings
Android Developer

-- 
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] PlayDriver

2010-02-23 Thread Pierre Henry
Hi,

I'm playing with 'MediaPlayer' class and 'm encoutering a curious
message in debug win:
__
02-23 11:34:06.288: ERROR/PlayerDriver(51): Invalid percentage value
82597
__

The message is scrolling with increasing value of the percentage
value.

The pid 51 is the /system/bin/mediaserver process.

Any idea?

-- 
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: Singleton Service ???

2010-02-23 Thread MobDev
Lol,
I see I actually forgot to place the question in the first part of my
previous post :D
That is : if a Service already is running, is there some way to bind
to it when my app starts up, and/or programmatically check if it's
already running ?
So that I won't be having 2 separate Service entities that do exactly
the same...

On 23 feb, 11:44, MobDev  wrote:
> actually I had a question regarding this...
> I made a service which plays an MP3, so it uses a single instance (in
> the whole service) of MediaPlayer..
> Still I noticed (by mistake because the Service didn't get closed
> while exiting my main Activity) that the Service obviously kept
> running, but when I restarted my app it created another Service which
> also could play the MP3, thus creating a "mixing" effect, having the
> same MP3 playing double... The second one I could stop through my App
> but the first "lost" one couldn't be stopped...
> To me this doesn't look like a Singleton's behaviour, I actually have
> two seperate entities of a Service running in the system...
> Also, a little question, I use the onBind() method and the .aidl
> interface methology to create my Service... Is there a correct way to
> stop a Service ? And if so where should this be implemented (for
> example unBind() in the onDestroy() method of my main Activity) ?
> Thanks in advance Mark (or anyone who might shed some light on my
> issue) !
>
> On 11 feb, 17:11, "Mark Murphy"  wrote:
>
> > > I'd like to know if it's possible to create a Singelton Service
> > > throughout an application ?
>
> > Services are singletons by their very nature.
>
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com
> > Android App Developer Books:http://commonsware.com/books.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


[android-developers] Re: Pinwheel or progress indicator while loading screen

2010-02-23 Thread javame_android
Hello,

Is there anyone who can let me know how to achieve this?

I want that once the login button is clicked a ProgressDialog is
displayed and it should be dismissed only when the data from the
server has been completely loaded.

Can anyone guide how to accomplish this?


Thanks & Regards
Sunil

-- 
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: Remote Test your apps on real phones with Sony Ericsson Perfecto Mobile

2010-02-23 Thread Kaj Bjurman
What's the relation to Android?

On 23 Feb, 10:47, SonyEricsson DeveloperWorld
 wrote:
> Perfecto mobile is a remote device testing from Sony Ericsson that
> enables you to be sure that your application works on a real device
> even though you don’t have it in your hand.
>
> The Perfecto Mobile service enables you to
>
>     * Test on a range of real Sony Ericsson handsets via the Internet
>     * Test on pre-launched Sony Ericsson phones
>     * Remotely access various mobile networks and geographies.
>     * Showcase your application with snapshots and video clips
>     * Run automated tests across multiple handsets
>
> More information is available athttp://bit.ly/coUR5D

-- 
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] Need Calendar.apk and CalendarProvider.apk

2010-02-23 Thread Piyush
Hello All,

I need to install calendar app on emulator. But there is no default
calendar app on emulator.

I got calendar.apk from some site and successfully installed this
file. But when I open calendar application exception sceren comes ---
'The process com.android.calendar has stopped unexpectedly. Please try
again.'

I think apk was not proper. So please can anybody provide me working
Calendar.apk and CalendarProvider.apk?.

Thanks & Regards,
Piyush Jain

-- 
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.bluetooth.a2dp.intent.action.SINK_STATE_CHANGED

2010-02-23 Thread Dongjoon Lee
yes, i tried that and got the event whenever the bt headset state was
changed.


On 2월22일, 오후7시42분, Alex Corbi  wrote:
> btw, have you tried it already? works?
>
> On 17 Feb., 09:16, Dongjoon Lee  wrote:
>
>
>
> > Hi.
>
> > If the bluetooth headset is connected, system send this intent.
> > "android.bluetooth.intent.action.HEADSET_STATE_CHANGED"
>
> > So you can receive that and get extra information.
> > For extracting extra information, use this intent.
> > "android.bluetooth.intent.HEADSET_STATE"
> > Through this you can get bluetooth headset connection state.
> > disconnected, connecting, connected.
>
> > I'm not sure my answer satisfies your question.
>
> > On 1월15일, 오전5시19분,AlexCorbi wrote:
>
> > > Hi Nick,
>
> > > Can you tell me please which devices use ACL Connections, do common
> > > bluetooth handsfree devices (like the ones present in cars ) use this
> > > transfer protocol?
>
> > > I am researching this to implement a new functionality on my app Voice
> > > Alerts (+info ->http://49ers.es/corbi/voice-alerts) so the app
> > > activates automatically when the phone gets connected with a bluetooth
> > > headset or car system.
>
> > > i appreciate the help,
>
> > > Best regards..
>
> > >Alex.
>
> > > On Jan 12, 5:01 am, Nick Pelly  wrote:
>
> > > > On Mon, Jan 11, 2010 at 5:27 PM,AlexCorbi wrote:
> > > > > Hi Nick,
>
> > > > > Thanks for your answer.
>
> > > > > What i am trying to do is to detect when a bluetooth headset device
> > > > > connect to the phone so my app can react to this event.
>
> > > > > is there an alternative?
>
> > > > For the requirement you stated there is no public API option. But
> > > > maybe you can explain what your app wants to do when a BT headset
> > > > connects, and I might know a better option. For example ACL_CONNECTED
> > > > will tell you when a low level ACL connection is established and is
> > > > part of the public API.
>
> > > > >Alex
>
> > > > > On Jan 11, 6:17 am, Nick Pelly  wrote:
> > > > >> On Mon, Jan 11, 2010 at 7:40 AM,AlexCorbi wrote:
> > > > >> > HI everybody,
>
> > > > >> > im currently looking for the way that my app knows when the phone 
> > > > >> > has
> > > > >> > being paired and connected to a bluetooth headset device.
>
> > > > >> > I read something about this intent, but not on the Reference
> > > > >> > documentation ofhttp://developer.android.com
>
> > > > >> > android.bluetooth.a2dp.intent.action.SINK_STATE_CHANGED
>
> > > > >> > is this actually working, is it officially supported.
>
> > > > >> > I mean, can we just register a broadcastreceiver to handle this
> > > > >> > intent , check for the EXTRA_STATE string extra to see if it equals
> > > > >> > STATE_CONNECTED and be sure that the phone is now connected with a
> > > > >> > bluetooth headset device ???
>
> > > > >> > What about this BluetoothA2dpService class?? There is no official
> > > > >> > documentation about this, everything i found i from code snippets 
> > > > >> > of
> > > > >> > the android OS source code.
>
> > > > >> > What do you guys think about this?
>
> > > > >> It's not part of the official Android API. So it is very dangerous to
> > > > >> use, since it can (and probably will) break in a future OTA. It might
> > > > >> not work at all on some Android devices, since Android devices are
> > > > >> only required to implement the official API.
>
> > > > >> There is currently no way to determine if a Bluetooth device is
> > > > >> connected to the built-in Bluetooth headset service through the
> > > > >> official API.
>
> > > > >> If you can explain what you are trying to do, I might be able to
> > > > >> suggest a better alternative?
>
> > > > >> Nick
>
> > > > > --
> > > > > 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: Images from Xml

2010-02-23 Thread Eosproject
Thanks. I need images, so I have problems with array... (images)

xml


http://schemas.android.com/apk/res/android";>







java

public class main extends Activity {
/** Called when the activity is first created. */
private static final String TAG = "CompXML";
int[] items;
Canvas canvas = new Canvas();
Paint paint = new Paint();


@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
ImageView iv = new ImageView(this);
ImageView item = new ImageView(this);

RelativeLayout myLayout = new RelativeLayout(this);

try
{
XmlResourceParser xrp = this.getResources().getXml(R.xml.game);

while (xrp.getEventType() != XmlResourceParser.END_DOCUMENT) {
if (xrp.getEventType() == XmlResourceParser.START_TAG) {

//s - tag name
String s = xrp.getName();

if (s.equals("stage")) {

int resid = xrp.getAttributeResourceValue(null, "id", 0);

Bitmap viewStage = BitmapFactory.decodeResource(this.getResources(),
resid);
iv.setImageBitmap(viewStage);

myLayout.addView(iv);




} else if (s.equals("item")) {


for(int i=0; ihttp://groups.google.com/group/android-developers?hl=en


[android-developers] Re: how to convert mp3to PCM format in android

2010-02-23 Thread skink


kavitha wrote:
> Hi All,
>
> Is there any way to convert mp3 to PCM stream in android?
>
> Please help.
>
> Thanks
> Kavitha


use lame --decode

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] Create a log screen with a dialog!

2010-02-23 Thread nep0x
hi people!

I m developing an app and a i have a little doubt. It is the
following:

My app first activity is very simple. it shows two buttons: ENTER  &
EXIT. When the user press the button ENTER the app displays a dialog
where the user have to log. I want that the app access to an external
database to check the user and the password. Once it is checked the
app starts the next activity. This is the idea.
I ve implemented the access to a an external database by a web service
(REST).

I ve done access to the database and display the result in an activity
with the well-known process of expanding another thead, create a
handler and execute runneable object.But in this case where must i
put the startActivity to start the next activity is the user exits? in
the handler? any advice?

thanks in advance

nep0x

-- 
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: how to convert mp3to PCM format in android

2010-02-23 Thread kavitha
Thanks for reply skink.

I downloaded lame.zip,,but totally lost

how to use in my android project.

Thanks
Kavitha

On Tue, Feb 23, 2010 at 5:10 PM, skink  wrote:

>
>
> kavitha wrote:
> > Hi All,
> >
> > Is there any way to convert mp3 to PCM stream in android?
> >
> > Please help.
> >
> > Thanks
> > Kavitha
>
>
> use lame --decode
>
> 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

-- 
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] client certificate authentication for ssl/https connection

2010-02-23 Thread saify.zeenwala
hi

just create certificate using bouncy castle algo as android supports only
BKS certificates only.

use below mentioned link to generate client side certificat and store it
using keystore.
http://crazybob.org/2010/02/android-trusting-ssl-certificates.html

regards



On Tue, Feb 23, 2010 at 12:35 PM, Babasaheb  wrote:

> Hi,
>
> I want to connect to a server using ssl/https connection. During
> handshake between client and the server, I want to have server
> certificate authentication as well as client certificate
> authentication. The server certificate authentication is successful.
> But I don't know how to send client certificate to server for
> authentication, during the handshake.
> Can anybody please provide some tutorial for the same?
>
> Thanks,
> Babasaheb
>
> --
> 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: Populated database inside the app package (HOW-TO)?

2010-02-23 Thread Todd S.
I just got this to work yesterday, followed the following post:

http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/

I was able to write a function that lets me overwrite the existing
database used by the app, export the existing database to the SD card
and import the exported database to the app.  The database gets placed
in the asset's folder and gets copied into the /data/data/
yourpackagename/databases folder when you run createDatabase().

Hope this helps.

On Jan 19, 6:12 am, TheGlad  wrote:
> Hello, fellow developers!
> I'm trying to bind a pre-populated database (.db file) to my
> application, so that I could use the data right away. I cannot,
> however, figure out a way to:
> 1) Store the .db file inside the application.
> 2) Access the database inside the application.
>
> Please, can someone show easy-to-follow steps with code how to
> approach it.
>
> Thanks A LOT!!!

-- 
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: Populated database inside the app package (HOW-TO)?

2010-02-23 Thread Todd S.
I was able to get this to work by following post:

http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/

The database gets placed in the assets folder and then during the
createDatabase() gets copied into the "/data/data/yourpackagename/
databases/" folder.  Modifying this, you can easily use it to export
your database to the SD Card and import it as well.

On Jan 19, 6:12 am, TheGlad  wrote:
> Hello, fellow developers!
> I'm trying to bind a pre-populated database (.db file) to my
> application, so that I could use the data right away. I cannot,
> however, figure out a way to:
> 1) Store the .db file inside the application.
> 2) Access the database inside the application.
>
> Please, can someone show easy-to-follow steps with code how to
> approach it.
>
> Thanks A LOT!!!

-- 
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] (Update) Re: Talking to wpa_supplicant for TTLS / PEAP / TLS (Runtime+wpa_cli / JNI / LocalSocket(Unix domain socket) / wpa_supplicant.conf?)

2010-02-23 Thread a2ronus
(Update: I got a reply from Jouni Malinen on the hostap mailinglist, I
tried his approachm but that doesn't seem to work either. I posted the
message below on the hostap mailinglist as well, since it seems to be
an Android-wpa_supplicant combination problem)

Hello Jouni,

Thanks for the reply. I've tried talking to the Unix domain Socket,
but it doesn't work. It appears to be a permission problem.

You mentioned that Solution 3 should work.
Quote from my previous post; "- Solution 3: Talking directly to the
control interface of wpa_suplicant using Unix domain sockets. I found
that the Android API supplies us with the LocalSocket class for
this. ..."

I have tried 2 ways of connecting to the wpa_supplicant Unix domain
socket(s).

1. From an Android terminal emulator through wpa_cli.
2. I adapted an example Java Android program (original:
http://all4dev.blogspot.com/2009/02/android-localsocket-localserversocket.html).

For clarity: each Android app has its own group and username, for
example  = app_35:app_35. For each approach I adjusted
wpa_supplicant.conf>ctrl_interface_group to allow an app access to the
domain sockets, for example (ctrl_interface_group=app_35).

Results approach 1 ( From an Android terminal emulator through
wpa_cli. ):
1. I start up the Android terminal emulator and enter the command
wpa_cli -p/data/misc/wifi/sockets/ctrl_wpa_79-0. I get the message:

"Using interface 'tiwlan0'
Could not connect to wpa_supplicant - re-trying"
(The output is the same if I don't add the path to the socket, or
change the path to /data/misc/wifi/sockets.)

Results approaches 2a and 2b:
Next, I tried it from an Android Java program (with the correct
wpa_supplicant.conf.ctrl_interface_group and after
wpa_cli>reconfigure) using 2 slightly different approaches:
a. When I use 'tiwlan0' as LocalSocketAddress, I use an abstract
namespace for the LocalSocket. When I do this I get a 'connection
refused' error message from the Android debug tool logcat.
b. When In use "/data/misc/wifi/sockets/ctrl_wpa_79-0", I use the
Filesystem Namespace. I then get a 'permission denied' error message.
a&b Both throw an IOException at the line "receiver.connect(new
LocalSocketAddress(SOCKET_ADDRESS, NAMESPACE)); " (this happens when
"if socket is in invalid state or the address does not exist.").

So, or I'm doing something wrong, or something goes wrong with the
socket permissions. In the adb shell output the file permissions for
the sockets are set to  system:wifi.

Below this message you can find the shell output and the Java code.

Thanks for any help in advance.

Kind regards,

Aäron Jansen




* Extra = ADB shell output showing location of sockets, and
wpa_supplicant.conf *
C:\Users\ajansen\Desktop\android-sdk-windows\tools>adb root
adbd is already running as root

C:\Users\ajansen\Desktop\android-sdk-windows\tools>adb shell
# cd /data/misc/wifi
cd /data/misc/wifi

# cat wpa_supplicant.conf
cat wpa_supplicant.conf

ctrl_interface=tiwlan0
ctrl_interface_group=app_35
network={
ssid="aaron"
proto=WPA2
key_mgmt=WPA-EAP
eap=PEAP
pairwise=CCMP
}
#

# cd sockets
cd sockets
# pwd
pwd
/data/misc/wifi/sockets
# ls
ls
wpa_ctrl_79-1
wpa_ctrl_79-0
# ls -l
ls -l
srw-rw system   wifi  2010-02-23 10:23 wpa_ctrl_79-1
srw-rw system   wifi  2010-02-23 10:23 wpa_ctrl_79-0
#


* Java code *
package com.example.demolocalsocket;

import java.io.IOException;
import java.io.InputStream;

import android.app.Activity;
import android.net.LocalServerSocket;
import android.net.LocalSocket;
import android.net.LocalSocketAddress;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

/**
*
* @author Denis Migol
*
*/
public class DemoLocalSocketActivity extends Activity {

public static String SOCKET_ADDRESS = "tiwlan0";
public static LocalSocketAddress.Namespace NAMESPACE =
LocalSocketAddress.Namespace.ABSTRACT;

// background threads use this Handler to post messages to
// the main application thread
private final Handler handler = new Handler();

public class NotificationRunnable implements Runnable {
private String message = null;

public void run() {
if (message != null && message.length() > 0) {
showNotification(message);
}
}

/**
* @param message the message to set
*/
public void setMessage(String message) {
this.message = message;
}
}

// post this to the Handler when the background thread notifies
private final NotificationRunnable notificationRunnable = new
NotificationRunnable();

public void showNotification(String message) {
Toast.makeText(this, message+ " " + this.handler.toString(),
Toast.LENGTH_LONG).show();
}

class SocketListener extends Thread {
private Handler handler

[android-developers] Hang up phone call

2010-02-23 Thread Isaac Wagner
I've spend the last couple days looking for a way to hang up a phone
cal via the API.  I'm guessing for some "security" reason that Google
does not allow this.  Not being one to give up yet...is there any
undocumented way to hang up a phone call?

Of course the real solution would be for Google to add a HANG_UP_CALL
permission and expose the hangup() method to the public API, but it
doesn't appear that will happen. :(

Thanks,

-Isaac

-- 
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 playing audio on android

2010-02-23 Thread Alex Coventry
OldSkoolMark  sublimeslime.com> writes:
> Try putting the start() call in onResume().

Thanks for the suggestion.  Turned out the mp3 file I was testing with is
unplayable on android.  Transcoding with ogg and replacing fixed the problem. 
On the other hand, no other android apps were able to play the file.  The file
was generated from a WAV using LAME, and is playable with mplayer.)



-- 
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: question about handle and runnables

2010-02-23 Thread niko20
Hi,

I'm not seeing any code where you are creating a new handler to use

You need a mHandler = new Handler(); in your OnCreate routine BEFORE
you use it.

-niko

On Feb 23, 2:50 am, Kaj Bjurman  wrote:
> No, that isn't the problem.
>
> On 23 Feb, 09:24, Néstor Pavón Puro  wrote:
>
> > Maybe because the second option is not to much time displayed? Put more 
> > time between the second and the third option.
>
> > --- El mar, 23/2/10, Michael Lam  escribió:
>
> > De: Michael Lam 
> > Asunto: [android-developers] question about handle and runnables
> > Para: "Android Developers" 
> > Fecha: martes, 23 de febrero, 2010 06:58
>
> > hi,
>
> > i am using handle and runnables to switch/change the content of the
> > TextView using a "timer". for some reason, when running, the app
> > always skips the second step ("Step Two: fry egg"), and only show the
> > last (third) step ("Step three: serve egg").
>
> > TextView t;
> >     private String sText;
>
> >     private Handler mHandler = new Handler();
>
> >     private Runnable mWaitRunnable = new Runnable() {
> >         public void run() {
> >             t.setText(sText);
> >         }
> >     };
>
> >     @Override
> >     public void onCreate(Bundle savedInstanceState) {
> >         super.onCreate(savedInstanceState);
>
> >         setContentView(R.layout.main);
>
> >         mMonster = BitmapFactory.decodeResource(getResources(),
> >                 R.drawable.monster1);
>
> >         t=new TextView(this);
> >         t=(TextView)findViewById(R.id.TextView01);
>
> >         sText = "Step One: unpack egg";
> >         t.setText(sText);
>
> >         sText = "Step Two: fry egg";
> >         mHandler.postDelayed(mWaitRunnable, 3000);
>
> >         sText = "Step three: serve egg";
> >         mHandler.postDelayed(mWaitRunnable, 4000);
> >         ...
>
> > }
>
> > --
> > 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 
> > athttp://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: Petition: Google, please improve the Android Market.

2010-02-23 Thread Streets Of Boston
Yep, you're correct.
Google gets only a small portion of the 30% to cover the costs of the
payment transactions. The bulk of the 30% goes to the carriers. At an
Android Dev Lab Google told us Google's share just covers their cost.

On Feb 22, 9:16 pm, "Maps.Huge.Info (Maps API Guru)"
 wrote:
> You might want to drop the "let's not forget" clause as it's something
> that wouldn't help any petition and could keep people from agreeing
> with you.
>
> Google doesn't get 30% of your app sales, the carrier's cut, taxes,
> fees for the merchant account and other costs eat that up to probably
> zero profit or near to it.
>
> -John Coryat
>
> On Feb 22, 7:56 pm, Matthew LeMieux  wrote:
>
>
>
> > Has anybody else noticed that it is very difficult for many users to go
> > through the flow to even be able to purchase an app?  I would like to see
> > getting a paid app be as easy as getting a free app.  Perhaps giving users
> > the opportunity to register and add apps to their phone on a desktop rather
> > than only on the phone (similar to the experience iPhone users have).
>
> > When I originally went through the flow on my G1, I found that the
> > registration data was in a small dialog where I couldn't really see what was
> > being entered while I was entering it.  I was a highly motivated user and
> > hence completed the whole process, but what about a casual user?
>
> > How many users do you think have fallen out of your sales funnel at that
> > point?   I would be very interested to see data on how many android users
> > have completed the registration flow for purchasing paid apps...
>
> > -Matthew
>
> > On Sun, Feb 21, 2010 at 5:43 AM, Rob Irondad  wrote:
> > > Hi fellow developers.
> > > I've come up with this text for a petition (warning: long):
>
> > >http://docs.google.com/View?id=dd9hmc43_0c9zh58gd
>
> > > You're all welcome to review it and send your comments before I
> > > publish it to some petition website.
> > > You can email me directly (rob.iron...@gmail.com).
>
> > > --
> > > Rob
>
> > > --
> > > 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- Hide quoted text -
>
> - Show quoted text -

-- 
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: Petition: Google, please improve the Android Market.

2010-02-23 Thread Hekki
Hi,

Are you sure about the carrier thing ?

I don't see when they are involved :

Clients only use the carrier as a dumb pipe here to get internet
access, they pay using google checkout which have their credit card
information(much like itunes does).
So google handle the payment itself.

When is the carrier involved at all ? I don't understand.

Yahel

On 23 fév, 15:58, Streets Of Boston  wrote:
> Yep, you're correct.
> Google gets only a small portion of the 30% to cover the costs of the
> payment transactions. The bulk of the 30% goes to the carriers. At an
> Android Dev Lab Google told us Google's share just covers their cost.
>
> On Feb 22, 9:16 pm, "Maps.Huge.Info (Maps API Guru)"
>
>
>
>  wrote:
> > You might want to drop the "let's not forget" clause as it's something
> > that wouldn't help any petition and could keep people from agreeing
> > with you.
>
> > Google doesn't get 30% of your app sales, the carrier's cut, taxes,
> > fees for the merchant account and other costs eat that up to probably
> > zero profit or near to it.
>
> > -John Coryat
>
> > On Feb 22, 7:56 pm, Matthew LeMieux  wrote:
>
> > > Has anybody else noticed that it is very difficult for many users to go
> > > through the flow to even be able to purchase an app?  I would like to see
> > > getting a paid app be as easy as getting a free app.  Perhaps giving users
> > > the opportunity to register and add apps to their phone on a desktop 
> > > rather
> > > than only on the phone (similar to the experience iPhone users have).
>
> > > When I originally went through the flow on my G1, I found that the
> > > registration data was in a small dialog where I couldn't really see what 
> > > was
> > > being entered while I was entering it.  I was a highly motivated user and
> > > hence completed the whole process, but what about a casual user?
>
> > > How many users do you think have fallen out of your sales funnel at that
> > > point?   I would be very interested to see data on how many android users
> > > have completed the registration flow for purchasing paid apps...
>
> > > -Matthew
>
> > > On Sun, Feb 21, 2010 at 5:43 AM, Rob Irondad  
> > > wrote:
> > > > Hi fellow developers.
> > > > I've come up with this text for a petition (warning: long):
>
> > > >http://docs.google.com/View?id=dd9hmc43_0c9zh58gd
>
> > > > You're all welcome to review it and send your comments before I
> > > > publish it to some petition website.
> > > > You can email me directly (rob.iron...@gmail.com).
>
> > > > --
> > > > Rob
>
> > > > --
> > > > 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 > > >  ­cr...@googlegroups.com>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en-Hide quoted text 
> > > >-
>
> > - Show quoted text -

-- 
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] stay inside webview?!

2010-02-23 Thread Marco Alexander Schmitz
dear developer,

I need help on the following topic.

I just created a webview activity, and I loaded a webside into it.

Well, when the user starts to click on some button, my activity is
gone and the default webbrowser-activity is opened.

In this case my menuitems are lost.

Is it possible to keep the browsing user inside my activity?

Thanks!
Marco

-- 
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: Petition: Google, please improve the Android Market.

2010-02-23 Thread Disconnect
Google has been very vague about where that 30% goes when you're on a nexus,
adp, etc.

On Tue, Feb 23, 2010 at 10:37 AM, Hekki  wrote:

> Hi,
>
> Are you sure about the carrier thing ?
>
> I don't see when they are involved :
>
> Clients only use the carrier as a dumb pipe here to get internet
> access, they pay using google checkout which have their credit card
> information(much like itunes does).
> So google handle the payment itself.
>
> When is the carrier involved at all ? I don't understand.
>
> Yahel
>
> On 23 fév, 15:58, Streets Of Boston  wrote:
> > Yep, you're correct.
> > Google gets only a small portion of the 30% to cover the costs of the
> > payment transactions. The bulk of the 30% goes to the carriers. At an
> > Android Dev Lab Google told us Google's share just covers their cost.
> >
> > On Feb 22, 9:16 pm, "Maps.Huge.Info (Maps API Guru)"
> >
> >
> >
> >  wrote:
> > > You might want to drop the "let's not forget" clause as it's something
> > > that wouldn't help any petition and could keep people from agreeing
> > > with you.
> >
> > > Google doesn't get 30% of your app sales, the carrier's cut, taxes,
> > > fees for the merchant account and other costs eat that up to probably
> > > zero profit or near to it.
> >
> > > -John Coryat
> >
> > > On Feb 22, 7:56 pm, Matthew LeMieux  wrote:
> >
> > > > Has anybody else noticed that it is very difficult for many users to
> go
> > > > through the flow to even be able to purchase an app?  I would like to
> see
> > > > getting a paid app be as easy as getting a free app.  Perhaps giving
> users
> > > > the opportunity to register and add apps to their phone on a desktop
> rather
> > > > than only on the phone (similar to the experience iPhone users have).
> >
> > > > When I originally went through the flow on my G1, I found that the
> > > > registration data was in a small dialog where I couldn't really see
> what was
> > > > being entered while I was entering it.  I was a highly motivated user
> and
> > > > hence completed the whole process, but what about a casual user?
> >
> > > > How many users do you think have fallen out of your sales funnel at
> that
> > > > point?   I would be very interested to see data on how many android
> users
> > > > have completed the registration flow for purchasing paid apps...
> >
> > > > -Matthew
> >
> > > > On Sun, Feb 21, 2010 at 5:43 AM, Rob Irondad 
> wrote:
> > > > > Hi fellow developers.
> > > > > I've come up with this text for a petition (warning: long):
> >
> > > > >http://docs.google.com/View?id=dd9hmc43_0c9zh58gd
> >
> > > > > You're all welcome to review it and send your comments before I
> > > > > publish it to some petition website.
> > > > > You can email me directly (rob.iron...@gmail.com).
> >
> > > > > --
> > > > > Rob
> >
> > > > > --
> > > > > 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 ­cr...@googlegroups.com>
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/android-developers?hl=en-Hide quoted
> text -
> >
> > > - Show quoted text -
>
> --
> 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] stay inside webview?!

2010-02-23 Thread Mark Murphy
Marco Alexander Schmitz wrote:
> dear developer,
> 
> I need help on the following topic.
> 
> I just created a webview activity, and I loaded a webside into it.
> 
> Well, when the user starts to click on some button, my activity is
> gone and the default webbrowser-activity is opened.
> 
> In this case my menuitems are lost.
> 
> Is it possible to keep the browsing user inside my activity?

Step #1: Create an implementation of WebViewClient

Step #2: In that WebViewClient, implement shouldOverrideUrlLoading() and
handle whichever links you want to yourself

Step #3: Attach an instance of your WebViewClient to your WebView

http://github.com/commonsguy/cw-android/tree/master/WebKit/Browser3/

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

Android Development Wiki: http://wiki.andmob.org

-- 
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] TabHost issue in 1.5

2010-02-23 Thread Pablo Szyrko
Hi,
I have a TabActivity that contains three tabs and the content launch a
new activity. The code works for 1.6 and later but doesn't work for
1.5.

I found a old thread with the same problem but without answer:
http://www.mail-archive.com/android-developers@googlegroups.com/msg35229.html
Could you help me?
Thanks, Pablo

This is the exception thrown when the activity is shown:

02-23 10:26:00.669: ERROR/AndroidRuntime(1271):
java.lang.StackOverflowError
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
java.util.concurrent.locks.ReentrantLock
$NonfairSync.lock(ReentrantLock.java:177)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:252)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
java.util.concurrent.CopyOnWriteArrayList.removeRange(CopyOnWriteArrayList.java:
583)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
java.util.concurrent.CopyOnWriteArrayList.remove(CopyOnWriteArrayList.java:
380)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
java.util.concurrent.CopyOnWriteArrayList.remove(CopyOnWriteArrayList.java:
390)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewTreeObserver.removeOnPreDrawListener(ViewTreeObserver.java:
377)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.widget.TextView.onDraw(TextView.java:3753)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.View.draw(View.java:5838)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1540)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.View.draw(View.java:5841)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1540)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.widget.AbsListView.dispatchDraw(AbsListView.java:1326)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.widget.ListView.dispatchDraw(ListView.java:2863)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.View.draw(View.java:5944)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.widget.AbsListView.draw(AbsListView.java:2180)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1540)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.View.draw(View.java:5841)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.widget.FrameLayout.draw(FrameLayout.java:352)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
com.szyrko.FastScrollView.draw(FastScrollView.java:161)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1540)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.View.draw(View.java:5841)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.widget.FrameLayout.draw(FrameLayout.java:352)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1540)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271):

[android-developers] Bring Activity to front

2010-02-23 Thread // C
I am writing a small streaming application with purpose to test send
Activity to background and send Activity to foreground functionality.
Basically it looks like illustrated below. From the logs you can see
that the platform is trying to bring the streaming application to
front again, but unfortunately it fails to do so. Can someone give me
a hint what I am doing wrong ? I know my example is not best practice.
You should use notifications instead, but I still need to know why
this does not work as expected.

I tried this but unfortunately this did not work. Am I doing something
wrong ?
I enclose my piece of code and some log prints.


Intent myIntent = myStreamingPlayer.getIntent();
// Start StreamingPlayer etc ...


// Move StremingPlayer to background
myStreamingPlayer.moveTaskToBack(true);

// Play 5 more seconds
SystemClock.sleep(5000);

// move StreamingPlayer to foreground
myStreamingPlayer.startActivity(myIntent);

Unfortunately the StreamingPlayer remains in background here ...

02-23 10:21:49.897: DEBUG/StreamingPlayer(4707): Prepare called
02-23 10:21:51.897: DEBUG/StreamingPlayer(4707): onBufferingUpdate
called --->   percent:0
02-23 10:21:55.567: DEBUG/StreamingPlayer(4707): onBufferingUpdate
called --->   percent:100
02-23 10:21:55.657: DEBUG/StreamingPlayer(4707): Start called
02-23 10:21:55.657: DEBUG/StreamingPlayer(4707): onPrepared called
02-23 10:21:55.927: WARN/AudioFlinger(35): write blocked for 133 msecs
02-23 10:22:00.707: INFO/ActivityManager(60): moveTaskToBack: 28
02-23 10:22:01.187: DEBUG/StreamingPlayer(4707): surfaceDestroyed
called
02-23 10:22:01.257: WARN/InputManagerService(60): Starting input on
non-focused client com.android.internal.view.IInputMethodClient$Stub
$pr...@436d7b48 (uid=10034 pid=4707)
02-23 10:22:05.727: INFO/ActivityManager(60): Starting activity:
Intent { action=android.intent.action.MAIN flags=0x1000
comp={com.streamingplayer/com.streamingplayer.StreamingPlayer} }

-- 
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] exporting widgets in jar file without /res/values/attrs.XML and R.styleable ???

2010-02-23 Thread Houcem Berrayana
Hi all,

I was writing a kind of custom views that should be packaged in a jar
file to be used in other applications. So I have added some attributes
to my custom widgets in order to uses the related values in my widgets
constructor. The problem is that in the controller I am executing this
king of instructions:
scrolling = arr.getBoolean(R.styleable.ScrollTextView_setScrolling,
false);

Notice that I am referencing R.styleable class. This is fine when I
use my widgets directly in my application because it can see R class.

Now, if I want to export my widgets in a separate jar file. so there
will not be an R class and there's not the attributes declaration XML
file. It will certainly refuse to compile!!! Is there a way to export
R.java and /re/values/attrs.xml ??? If not is there a way to tell java
compilator not to look for R.class ???

Thank you.
Best regards,
Houcem

-- 
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: question about handle and runnables

2010-02-23 Thread Kaj Bjurman
He created them where he declared them.


On 23 Feb, 14:34, niko20  wrote:
> Hi,
>
> I'm not seeing any code where you are creating a new handler to use
>
> You need a mHandler = new Handler(); in your OnCreate routine BEFORE
> you use it.
>
> -niko
>
> On Feb 23, 2:50 am, Kaj Bjurman  wrote:
>
>
>
> > No, that isn't the problem.
>
> > On 23 Feb, 09:24, Néstor Pavón Puro  wrote:
>
> > > Maybe because the second option is not to much time displayed? Put more 
> > > time between the second and the third option.
>
> > > --- El mar, 23/2/10, Michael Lam  escribió:
>
> > > De: Michael Lam 
> > > Asunto: [android-developers] question about handle and runnables
> > > Para: "Android Developers" 
> > > Fecha: martes, 23 de febrero, 2010 06:58
>
> > > hi,
>
> > > i am using handle and runnables to switch/change the content of the
> > > TextView using a "timer". for some reason, when running, the app
> > > always skips the second step ("Step Two: fry egg"), and only show the
> > > last (third) step ("Step three: serve egg").
>
> > > TextView t;
> > >     private String sText;
>
> > >     private Handler mHandler = new Handler();
>
> > >     private Runnable mWaitRunnable = new Runnable() {
> > >         public void run() {
> > >             t.setText(sText);
> > >         }
> > >     };
>
> > >     @Override
> > >     public void onCreate(Bundle savedInstanceState) {
> > >         super.onCreate(savedInstanceState);
>
> > >         setContentView(R.layout.main);
>
> > >         mMonster = BitmapFactory.decodeResource(getResources(),
> > >                 R.drawable.monster1);
>
> > >         t=new TextView(this);
> > >         t=(TextView)findViewById(R.id.TextView01);
>
> > >         sText = "Step One: unpack egg";
> > >         t.setText(sText);
>
> > >         sText = "Step Two: fry egg";
> > >         mHandler.postDelayed(mWaitRunnable, 3000);
>
> > >         sText = "Step three: serve egg";
> > >         mHandler.postDelayed(mWaitRunnable, 4000);
> > >         ...
>
> > > }
>
> > > --
> > > 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 
> > > athttp://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: Multiple development environments on a single machine: Problem changing default 8700 port in ADT/DDMS

2010-02-23 Thread Pawel Kapala
Have anyone experienced similar problem?

On Feb 3, 9:15 am, Pawel Kapala  wrote:
> Hello!
>
> I am trying to set up multiple Android development environments on
> single Linux Debian machine. Everything works fine for one user. But
> whenever second user on the same machine tries to launch Eclipse (with
> ADT) there is an error displayed, that 8700 port is being used.
> Therefore, the second user is unable to debug. I have researched this
> issue myself and tried following solutions, but I am yet unsuccessful:
> 1) I have changed the DDMS port in Eclipse, for the second user to
> 8740 (Window -> Preferences -> Android -> DDMS -> Base local debugger
> port). No use: Eclipse still opens 8700 port for listening (showed by
> netstat and strace).
> 2) I have run the DDMS before running Eclipse, changed the port in it
> to be 8740 (File -> Preferences -> Debugger -> Port of selected VM).
> Not handy to have DDMS running outside Eclipse, Eclipse still opens
> 8700 port for listening.
> 3) Tried looking in the source code of ADT, found the reference where
> the 8700 port is passed and opened, it looks ok though and leaves me
> without a clue.
> 4) I have found several similar threads, but none of them helped my
> case (piled below for reference):
>    
> 4.1)http://groups.google.com/group/android-developers/browse_thread/threa...
>    
> 4.2)http://groups.google.com/group/android-developers/browse_thread/threa...
>    
> 4.3)http://groups.google.com/group/android-developers/browse_thread/threa...
>
> What am I missing? Could anyone give me a pointer?
>
> Using:
> Eclipse 3.5.1
> ADT 0.95
> Debian Lenny
>
> Thanks,
>
> --PawelKapala
> Tieto Corporationwww.tieto.com

-- 
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: Localization in Eclair

2010-02-23 Thread android learner
Thank you Mark.

On Feb 22, 6:38 pm, Mark Murphy  wrote:
> android learner wrote:
> > Does Android provide any tool(s) that would help
> > developers translate the strings (may be to convert from xml to xliff
> > format or some other format that translators generally use)?
>
> No, though it would not take much work for somebody to write one.
>
> > The
> > 'Internationalization and Localization' part in developer.android.com
> > still has a stub ("coming soon").
>
> Try:
>
> http://developer.android.com/guide/topics/resources/localization.html
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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: converting short array to byte array help

2010-02-23 Thread maxsap
anyone?

-- 
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: MapView

2010-02-23 Thread Aamir Yaseen
Hi everyone,
I was able to solve this issue, so thought better update everyone,
this might help others.

Mistake I was making was:
I had to call setState(marker, stateBitset) in the getMarker(int
stateBitset) method of OverlayItem., otherwise it does not work.

StateListDrawable is mazing way of changing icon/look and feel of any
component depending upon its state :)

Special thanks to TreKing for the help.


Regards,
Aamir Yaseen

On Feb 10, 5:26 pm, TreKing  wrote:
> On Wed, Feb 10, 2010 at 11:21 AM, Aamir Yaseen wrote:
>
> > what do you suggest in this case?
>
> I haven't done anything with StateListDrawable or the states in the overlay
> item so unfortunately I'm out of ideas for you. Sorry.
>
> -
> TreKing - Chicago transit tracking app for Android-powered 
> deviceshttp://sites.google.com/site/rezmobileapps/treking

-- 
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] exporting widgets in jar file without /res/values/attrs.XML and R.styleable ???

2010-02-23 Thread Mark Murphy
Houcem Berrayana wrote:
> Is there a way to export
> R.java and /re/values/attrs.xml

Not in a regular JAR, no.

> If not is there a way to tell java
> compilator not to look for R.class ???

Not really. You can use getIdentifier() on Resources to look up the IDs
you need on the fly, but please cache those values, as that call is
apparently a bit expensive (uses reflection IIRC).

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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: exporting widgets in jar file without /res/values/attrs.XML and R.styleable ???

2010-02-23 Thread Houcem Berrayana
Thank you Mark,
Actually I will be using this is constructor and I will not have more
than 3 instances of my classes. I'll try to use this method I think
that may help.

Thanks again

On 23 fév, 17:52, Mark Murphy  wrote:
> Houcem Berrayana wrote:
> > Is there a way to export
> > R.java and /re/values/attrs.xml
>
> Not in a regular JAR, no.
>
> > If not is there a way to tell java
> > compilator not to look for R.class ???
>
> Not really. You can use getIdentifier() on Resources to look up the IDs
> you need on the fly, but please cache those values, as that call is
> apparently a bit expensive (uses reflection IIRC).
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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: Petition: Google, please improve the Android Market.

2010-02-23 Thread Streets Of Boston
Well,

This is what Google told us at the Android Developers Lab. The bulk of
the 30% goes to the carriers, a fraction of this 30% goes to google to
run Google Checkout and the payment processor.

I guess the bulk of the 30% that goes to the carrier is an incentive
to have Android Market (and not other markets?) installed.


On Feb 23, 10:49 am, Disconnect  wrote:
> Google has been very vague about where that 30% goes when you're on a nexus,
> adp, etc.
>
>
>
> On Tue, Feb 23, 2010 at 10:37 AM, Hekki  wrote:
> > Hi,
>
> > Are you sure about the carrier thing ?
>
> > I don't see when they are involved :
>
> > Clients only use the carrier as a dumb pipe here to get internet
> > access, they pay using google checkout which have their credit card
> > information(much like itunes does).
> > So google handle the payment itself.
>
> > When is the carrier involved at all ? I don't understand.
>
> > Yahel
>
> > On 23 fév, 15:58, Streets Of Boston  wrote:
> > > Yep, you're correct.
> > > Google gets only a small portion of the 30% to cover the costs of the
> > > payment transactions. The bulk of the 30% goes to the carriers. At an
> > > Android Dev Lab Google told us Google's share just covers their cost.
>
> > > On Feb 22, 9:16 pm, "Maps.Huge.Info (Maps API Guru)"
>
> > >  wrote:
> > > > You might want to drop the "let's not forget" clause as it's something
> > > > that wouldn't help any petition and could keep people from agreeing
> > > > with you.
>
> > > > Google doesn't get 30% of your app sales, the carrier's cut, taxes,
> > > > fees for the merchant account and other costs eat that up to probably
> > > > zero profit or near to it.
>
> > > > -John Coryat
>
> > > > On Feb 22, 7:56 pm, Matthew LeMieux  wrote:
>
> > > > > Has anybody else noticed that it is very difficult for many users to
> > go
> > > > > through the flow to even be able to purchase an app?  I would like to
> > see
> > > > > getting a paid app be as easy as getting a free app.  Perhaps giving
> > users
> > > > > the opportunity to register and add apps to their phone on a desktop
> > rather
> > > > > than only on the phone (similar to the experience iPhone users have).
>
> > > > > When I originally went through the flow on my G1, I found that the
> > > > > registration data was in a small dialog where I couldn't really see
> > what was
> > > > > being entered while I was entering it.  I was a highly motivated user
> > and
> > > > > hence completed the whole process, but what about a casual user?
>
> > > > > How many users do you think have fallen out of your sales funnel at
> > that
> > > > > point?   I would be very interested to see data on how many android
> > users
> > > > > have completed the registration flow for purchasing paid apps...
>
> > > > > -Matthew
>
> > > > > On Sun, Feb 21, 2010 at 5:43 AM, Rob Irondad 
> > wrote:
> > > > > > Hi fellow developers.
> > > > > > I've come up with this text for a petition (warning: long):
>
> > > > > >http://docs.google.com/View?id=dd9hmc43_0c9zh58gd
>
> > > > > > You're all welcome to review it and send your comments before I
> > > > > > publish it to some petition website.
> > > > > > You can email me directly (rob.iron...@gmail.com).
>
> > > > > > --
> > > > > > Rob
>
> > > > > > --
> > > > > > 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 > ­cr...@googlegroups.com>
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/android-developers?hl=en-Hidequoted
> > text -
>
> > > > - Show quoted text -
>
> > --
> > 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- Hide quoted text -
>
> - Show quoted text -

-- 
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: About XML parising

2010-02-23 Thread CMF
I successfully getting the file I want by
XmlResourceParser xpp =
mContext.getResources().getXml(R.xml.gamestatus);
int eventType = xpp.getEventType();
while (eventType != XmlPullParser.END_DOCUMENT)
{
if(eventType == XmlPullParser.START_DOCUMENT) {
Log.d("testing","Start document");
} else if(eventType == XmlPullParser.END_DOCUMENT) {
Log.d("testing","End document");
} else if(eventType == XmlPullParser.START_TAG) {
Log.d("testing","Start tag "+xpp.getName());
} else if(eventType == XmlPullParser.END_TAG) {
Log.d("testing","End tag "+xpp.getName());
} else if(eventType == XmlPullParser.TEXT) {
Log.d("testing","Text "+xpp.getText());
}
eventType = xpp.next();
}
however, when I want to edit the content, what is the method to do
that?



On Feb 20, 3:00 am, Bob Kerns  wrote:
> Yes, that's a completely different question than getting data from res/
> values/strings.xml -- even though they look like the same thing!
>
> It's also an easy question you would have answered yourself, were you
> not expecting there to be an event! A reasonable idea, but incorrect,
> and that's what's confusing you.
>
> There is not a separate event for attributes. You get attributes when
> you process the START_TAG event.
>
> See the XmlPullParser.getAttributeCount() method,  and the
> XmlPullParser.getAttributeXXX(int), family of methods.
>
> On Feb 19, 9:43 am,CMF wrote:
>
> > Um, lets make my question more explicitly here.
> > I have a xml file "myfile.xml"
> > which the content is:
> > 
> > contenta
> > contentb
> > ...
> > contentaa
> > ...
> > 
>
> > the myfile.xml is placed at res/xml/
> > I would like to get all the node( but don't know how many) attribute
> > "name", as well as the corresponding content.
>
> > On Feb 20, 1:07 am, Frank Weiss  wrote:
>
> > > It's not clear what you are trying to accomplish, but it looks like you
> > > don't understand how the res/values/strings.xml and R object work. The
> > > Android builder takes the data defined in the xml file and generates a 
> > > Java
> > > source file that contains that data. The Android application can then get
> > > that data directly from the R object at run time.
>
> > > If you are trying to put some XML in strings.xml, do as Mark said, but
> > > obtain it as a String from the R object first:
>
> > > String myXml = R.xml.string;
>
> > > Then have your parser parse that string, myXml.
>
> > > On Fri, Feb 19, 2010 at 8:01 AM,CMF wrote:
> > > > Here is my code using XmlPullParser .
> > > > strings.xml just included "Hello world"
> > > > when I read the log. Some String characters are read including "Hello
> > > > world"
> > > > is it the problem of input encoding? btw, how to solve this probleM?
>
> > > >        XmlPullParserFactory factory =
> > > > XmlPullParserFactory.newInstance();
> > > >        XmlPullParser xpp = factory.newPullParser();
>
> > > > xpp.setInput(getResources().openRawResource(R.xml.strings),null);
> > > >        int eventType = xpp.getEventType();
> > > >        while (eventType != XmlPullParser.END_DOCUMENT)
> > > >        {
> > > >                if(eventType == XmlPullParser.START_DOCUMENT) {
> > > >                Log.d("testing","Start document");
> > > >            } else if(eventType == XmlPullParser.END_DOCUMENT) {
> > > >                Log.d("testing","End document");
> > > >            } else if(eventType == XmlPullParser.START_TAG) {
> > > >                Log.d("testing","Start tag "+xpp.getName());
> > > >            } else if(eventType == XmlPullParser.END_TAG) {
> > > >                Log.d("testing","End tag "+xpp.getName());
> > > >            } else if(eventType == XmlPullParser.TEXT) {
> > > >                Log.d("testing","Text "+xpp.getText());
> > > >            }
> > > >            eventType = xpp.next();
> > > >        }
>
> > > > On Feb 19, 10:50 pm, Mark Murphy  wrote:
> > > >  >CMFwrote:
> > > > > > I have my code here
>
> > > > > > Document dom;
> > > > > > DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
> > > > > > try
> > > > > >         {
> > > > > >             DocumentBuilder db = dbf.newDocumentBuilder();
> > > > > >             dom =
> > > > > > db.parse("strings.xml");                                         //
> > > > > > here I don't know the path of strings.xml which is in the 
> > > > > > res/values.
> > > > > >         }catch(ParserConfigurationException pce) {
> > > > > >             pce.printStackTrace();
> > > > > >         }catch(SAXException se) {
> > > > > >             se.printStackTrace();
> > > > > >         }catch(IOException ioe) {
> > > > > >             ioe.printStackTrace();
> > > > > >         }
>
> > > > > > ...// which I expect I can get the content needed ...but the 
> > > > > > keypoint
> > > > > > is , i dont know how to read the res/values/strings.xml as the input
> > > > > 

[android-developers] from webview to activity

2010-02-23 Thread Marco Alexander Schmitz
dear developer,

is it possible that a user clicks inside a webview on a link like  and then my activity is opened?

I need this for sms, email, telephone and some specials.

Lets say the user browses on the impressum and clicks on the phone
number for support. I want the phone to call that number...

Or lets say the browser clicks on an image (with a special href?), and
I want the user to land on my picture-view-activity...

thanks,
marco

-- 
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: converting short array to byte array help

2010-02-23 Thread Michael Davey
http://tinyurl.com/yfvzk5r

On 23 Feb 2010, at 16:17, maxsap wrote:

> anyone?
> 
> -- 
> 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: Petition: Google, please improve the Android Market.

2010-02-23 Thread Mark Murphy
Disconnect wrote:
> Google has been very vague about where that 30% goes when you're on a
> nexus, adp, etc.

Yes, that's true.

Better yet, what about devices that just simply aren't phones?
Admittedly, I'm not aware of a non-phone with the Android Market on it
yet, but I presume it's only a matter of time.

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

Android Development Wiki: http://wiki.andmob.org

-- 
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: Pinwheel or progress indicator while loading screen

2010-02-23 Thread Vaikunth

Hi,

Use threading concept for that.

Regards,
Vaikunth

On Feb 23, 4:07 pm, javame_android  wrote:
> Hello,
>
> Is there anyone who can let me know how to achieve this?
>
> I want that once the login button is clicked a ProgressDialog is
> displayed and it should be dismissed only when the data from the
> server has been completely loaded.
>
> Can anyone guide how to accomplish this?
>
> Thanks & Regards
> Sunil

-- 
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: Petition: Google, please improve the Android Market.

2010-02-23 Thread Ken H
1. A real website

God, yes. Why is there not one?? There's Cyrket and AndroLib, but
Google should have done this first.

3. A way for developers to reply to comments

This is very frustrating to me too, but I think this is a stupid/lazy
user issue, not Google's fault. It's just as easy to email the
developer as to leave a silly, easily explained comment, but they
don't. Maybe if they put the "email developer" item under the
"comments" item?

4. App description..."Also can we please at least have clickable links
on the app description? Expecting a user to re-type a URL on a mobile
device is absurd."

The "Visit the developers web page" is clickable. I think if your
asking for clickable links "inside" your description then that may be
asking too much. I mean if you want to say more then do it on the
webpage.

5. Multiple versions of an app

Think this would be a big mistake. You may be thinking too much like a
developer and not like a common user :)
I think users would be completely confused by multiple versions of the
same app. Remember, Apple is successful because they simplify things.

6. Statistics "...what does "active" exactly mean anyway?"

An "active" install is an app that on a phone. 76% active installs
means 76% of the people who downloaded your app still have it on there
phone, 24% uninstalled it.

"Also, when a user uninstalls an app, they're asked why they did it.
Really, we'd like to know too!"

Yes, absolutely.

7. Other features?..."a way for users to easily send log files and
screenshots, to report a problem with an app"

It's called email. I'm not trying to be funny but any user that could
send that sort of thing is going to know to send it in an email.
Common users would never think or bother doing that so why make it
"easy".



But overall I think this is good idea. I think Google is a little too
slow in it's fixes/improvements.

Ken

On Feb 23, 9:18 am, Disconnect  wrote:
> What carrier does that go to on nexus and such? Those devices don't have
> assigned carriers, and the software load is created by google. (That 30% was
> explained as incentive/payment for shipping the market, passing
> compatibility tests, etc.)
>
> On Tue, Feb 23, 2010 at 11:36 AM, Streets Of Boston 
>
>
> > wrote:
> > Well,
>
> > This is what Google told us at the Android Developers Lab. The bulk of
> > the 30% goes to the carriers, a fraction of this 30% goes to google to
> > run Google Checkout and the payment processor.
>
> > I guess the bulk of the 30% that goes to the carrier is an incentive
> > to have Android Market (and not other markets?) installed.
>
> > On Feb 23, 10:49 am, Disconnect  wrote:
> > > Google has been very vague about where that 30% goes when you're on a
> > nexus,
> > > adp, etc.
>
> > > On Tue, Feb 23, 2010 at 10:37 AM, Hekki  wrote:
> > > > Hi,
>
> > > > Are you sure about the carrier thing ?
>
> > > > I don't see when they are involved :
>
> > > > Clients only use the carrier as a dumb pipe here to get internet
> > > > access, they pay using google checkout which have their credit card
> > > > information(much like itunes does).
> > > > So google handle the payment itself.
>
> > > > When is the carrier involved at all ? I don't understand.
>
> > > > Yahel
>
> > > > On 23 fév, 15:58, Streets Of Boston  wrote:
> > > > > Yep, you're correct.
> > > > > Google gets only a small portion of the 30% to cover the costs of the
> > > > > payment transactions. The bulk of the 30% goes to the carriers. At an
> > > > > Android Dev Lab Google told us Google's share just covers their cost.
>
> > > > > On Feb 22, 9:16 pm, "Maps.Huge.Info (Maps API Guru)"
>
> > > > >  wrote:
> > > > > > You might want to drop the "let's not forget" clause as it's
> > something
> > > > > > that wouldn't help any petition and could keep people from agreeing
> > > > > > with you.
>
> > > > > > Google doesn't get 30% of your app sales, the carrier's cut, taxes,
> > > > > > fees for the merchant account and other costs eat that up to
> > probably
> > > > > > zero profit or near to it.
>
> > > > > > -John Coryat
>
> > > > > > On Feb 22, 7:56 pm, Matthew LeMieux  wrote:
>
> > > > > > > Has anybody else noticed that it is very difficult for many users
> > to
> > > > go
> > > > > > > through the flow to even be able to purchase an app?  I would
> > like to
> > > > see
> > > > > > > getting a paid app be as easy as getting a free app.  Perhaps
> > giving
> > > > users
> > > > > > > the opportunity to register and add apps to their phone on a
> > desktop
> > > > rather
> > > > > > > than only on the phone (similar to the experience iPhone users
> > have).
>
> > > > > > > When I originally went through the flow on my G1, I found that
> > the
> > > > > > > registration data was in a small dialog where I couldn't really
> > see
> > > > what was
> > > > > > > being entered while I was entering it.  I was a highly motivated
> > user
> > > > and
> > > > > > > hence completed the whole process, but what about a casual user?
>
> > > > > >

[android-developers] Re: Layout and minsdkversion issue

2010-02-23 Thread nikhil
My problem is the app appears correctly on the simulator but messes up
on the phone if I set the minsdkversion to 5. While for 2 it appears
correctly on both, can there be any problem with compatibility mode?
Will I have to redesign it for minsdkversion 5? If yes, how should I
do it ?

On Feb 22, 5:19 pm, Lance Nanek  wrote:
> A low min SDK with no target SDK setting can result in your
> application being run in compatibility mode re things like screen
> size:http://developer.android.com/intl/fr/guide/practices/screens_support
>
> On Feb 22, 4:41 pm, nikhil  wrote:
>
> > I developed this app withminsdkversionset to 5. thelayoutof my
> > views appear perfectly on the simulator. But when I install it on the
> > phone the objects (textboxes, buttons) on the view change their sizes
> > and get jumbled up. While trying out different things I changed the
> >minsdkversionto 2 and thelayoutwas just perfect on the phone as the
> > simulator. I am confused as to why the objects resize and get clunked
> > together if the version is 5 and appear just perfect if the version is
> > 2.
>
> > The phone is running android 2.1
>
> > Has anyone faced anything like this?
>
> > Please let me know if you have any idea about this issue.

-- 
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: Petition: Google, please improve the Android Market.

2010-02-23 Thread Maps.Huge.Info (Maps API Guru)
When you consider what 30% is of the average app, it amounts to 30 to
60 cents. Credit card processors charge a per transaction fee that
even large users are subject to. This varies from 10 to 30 cents.
Also, the credit card companies get somewhere between 2.1% and 4% as a
transaction fee. Since the volume of sales on Android market are
extremely low, and the number of devices that aren't on carriers are
also very low, doing the math reveals that even for those devices, the
gross income from sales is probably less than the cost to account for
it.

The vast majority of transactions handled by the Android market are
for free apps with zero revenue for anyone. Who's footing the bill for
all that activity? There are servers, bandwidth, engineers, techs,
accountants and probably a small army of people involved with this
system. Who's paying for all that infrastructure?

Google provides the market app more for the convenience of the users
and developers, not a source of revenue. When you consider this, then
the money angle sort of vanishes.

I would suggest that the old saying about catching more flies with
honey than vinegar holds true. It would be better to have a petition
that has a positive note with requests for things rather than demands
and anger. Of course, that's just my opinion.

-John Coryat

-- 
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] Developer Survey on Carrier Network APIs

2010-02-23 Thread Wipro Research
Here’s a chance to tell a major national carrier which APIs
(“enablers”) you want to see as a developer. The survey will take
about 5 minutes and all participants will have a chance to win one of
six Android smart phones.
Thanks so much for your help and your feedback!

To start the survey, go to 
http://devcentral.checkboxonline.com/network_widget_cp.aspx

-- 
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: Nexus One: A-GPS and setup w/o carrier

2010-02-23 Thread mah
I have a Nexus One that has never had a SIM installed... I enabled its
GPS and took it outside. It took a while to get a location (as is
expected without A-GPS), but it was able to get a fix. When I walked
within range of a WiFi I attach to, Google Maps then displayed my
accurate location on a map.

Note: On this device, I've not even entered my Google account
information; I just skipped that part of the initial device power-on.



On Feb 22, 12:04 pm, greg  wrote:
> I'm interested in buying a Nexus One to develop an accurate trail
> mapping application that uses the Nexus One's GPS receiver,
> accelerometer, and compass.  Currently, I'm not interested in using it
> as a phone and therefore am not interested in signing a contract with
> a carrier.  So, I have a couple questions.
>
> 1) As mentioned in the Wikipedia article about A-GPS, "A typical A-GPS-
> enabled receiver will use a data connection (Internet or other) to
> contact the assistance server for A-GPS information. Some A-GPS
> devices cannot fall back to standard GPS."  Does the Nexus One fall
> back to standard GPS if the assistance server is not available?
>
> 2) Is it possible to setup a Nexus One (i.e., enter my Google account
> information) without a phone service, perhaps using WiFi instead?
>
> - Greg
>
> P.S., I asked these questions to the sales help team 
> athttp://www.google.com/phone
> and was directed here.  Obviously, they aren't paid a commission. :*)

-- 
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.speech.action.RECOGNIZE_SPEECH" activity not found

2010-02-23 Thread Mukesh kumar
when we call
Intent intent = new Intent("android.speech.action.RECOGNIZE_SPEECH");
startActivityForResult(intent, 0);

After that show Exception:

Activity not foun exception

Exception:
android.content.ActivitNotFoundException:No Activity Found to handle
Intent{action=android.speech.action.RECOGNIZE_SPEECH}

-- 
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] How to correctly use / fill an ImageView?

2010-02-23 Thread Marcus
Hi,

I want to show an image file in an ImageView widget.

Since
iv.setImageURI(Uri.fromFile(new File("filepath...")));

does not work (getting INFO/System.out(1624): resolveUri failed on bad
bitmap uri: file:///sdcard/test/photos/photo13.jpg) I tried the
following:

BitmapFactory.Options opts = new BitmapFactory.Options();
opts.inSampleSize = 4;
if(mBitmap != null) {
  imgPhoto.setImageBitmap(mBitmap);
}

But the samplesize is static. So small pictures (like icons and so on)
are blurry. If I don't set a samplesize, the picture might get too big
(for example photos).

So how to do that?

-- 
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] looking for implementation of IAlarmManager

2010-02-23 Thread Matt Calder
Hi,

I am interested in the scheduling done by the
AlarmManager.setInexactRepeating method and so I started looking for
the implementation but I haven't been able to find anything.
Internally to AlarmManager, I can see that the actual work is being
done by an android.app.IAlarmManager interface.  After googling around
for a bit there seems to reference to an implementing class called
android.app.IAlarmManager.Stub but that is as far I get.

As sort of an offhand guess it seems that an instance of IAlarmManager
might implemented as native code and somehow becomes available to the
application at runtime.

I am working in eclipse with the 1.6 Android source code.

Thanks,
Matt

-- 
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] MMS Not Working

2010-02-23 Thread Ramjee Singh
I am facing some issues while sending mms:

Logs says:

I/global  ( 1223): *** checkClosedAndCreate: bind to if= rmnet0
E/OSNetworkSystem( 1223): *** bindif (rmnet0) failed! errno is 1,
Operation not permitted
E/global  ( 1223): bindInterface failed!

-- 
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: how to convert mp3to PCM format in android

2010-02-23 Thread skink


On Feb 23, 1:13 pm, kavitha  wrote:
> Thanks for reply skink.
>
> I downloaded lame.zip,,but totally lost
>
> how to use in my android project.
>
> Thanks
> Kavitha
>
>
>
> On Tue, Feb 23, 2010 at 5:10 PM, skink  wrote:
>
> > kavitha wrote:
> > > Hi All,
>
> > > Is there any way to convert mp3 to PCM stream in android?
>
> > > Please help.
>
> > > Thanks
> > > Kavitha
>
> > use lame --decode
>
> > 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

if you want to convert the files from your application you should have
lame sources.

using NDK you could integrate it with your app

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] Why does my phone show only one Locale in settings / set locale ???

2010-02-23 Thread lordjoe
IN testing internationalization I find my phone - (google dev version
of  HTC Hero) I see only one local - English when I try to set the
locale in the Settings application -
How many locales are really available and how do we make them
available to settings???
People overseas (i.e. not in the US) what locales do you see???

-- 
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: Location.getAccuracy()

2010-02-23 Thread Funksta
I always assumed you just had to take it that the accuracy could be in
any direction, including up and down. I often had issues with the
vertical accuracy because sometimes it really matters how high you
are.

-Geoff

On Feb 22, 3:28 am, meet  wrote:
> Hello,
>
> Does Location.getAccuracy() returns radial accuracy ?
> I want the accuracy in terms of horizontal and vertical accuracy. Is
> there any way to do this ?
> Any suggestions are invited.
>
> Thanks,
> Meet

-- 
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: MapView

2010-02-23 Thread Fabian Sturm
Hi,

Am Dienstag, den 23.02.2010, 07:49 -0800 schrieb Aamir Yaseen:
> Hi everyone,
> I was able to solve this issue, so thought better update everyone,
> this might help others.

do you use the focus state to change the icon in your statelistdrawable?
I do this and it works but I can't "focus, unfocus (tap background) and
refocus" the same item in a row. I can only reliably change the focus
from one item to the another.

I also opened a bugreport with sample code, but don't have a reply yet.

  http://code.google.com/p/android/issues/detail?id=6752

Thanks a lot,

Fabian

-- 
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] ImageView setImageURL(Uri imgUri) does not work with "android.resource//..." Uri

2010-02-23 Thread qlimax
I'm trying to do the following thing without success:

ImageView imgView=(ImageView)findViewById(R.id.imgView);
Uri imgUri=Uri.parse("android.resource://
my.package.name/"+R.drawable.image);
imageView.setImageURI(imgUri)

I'm stuck, because the imageView just shows nothing...

how I can get an Uri (that I can use as ImageView source) from a local
resource?
which kind of Uri are accepted for the ImageView?

It would  be nice, if someone could help me.

IMHO, this topic lacks of documentation

thank you.
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


[android-developers] Re: rotate progress bar

2010-02-23 Thread Vertifi Software
Build a custom widget by modifying the android AbsSeekBar class code,
not by extending ProgressBar.  The rotate/translate technique in your
onDraw is valid.

On Feb 15, 4:24 pm, Jonathan  wrote:
> HI, I am extending the normal android.widget.ProgressBar. I want to
> make it vertical. This is my current onDraw Method
>
>         @Override
>         protected synchronized void onDraw(Canvas canvas) {
>
>                 canvas.save();
>                  canvas.rotate(90);
>                 canvas.translate(0,-50);
>                 super.onDraw(canvas);
>                 canvas.restore();
>         }
>
> This rotates it fine, however I am having alot of sizing issues. It
> seems as though I have to set the width and the height of the control
> to be the same thing or else I run into alot of clipping issues.
> Basically, I want to have a progress bar that, once rotated, is 50dip
> wide and fills the screen vertically. Can anyone think of a way to do
> this?
>
> Also, it doesn't seem to be actually drawing the progress properly,
> but I will revisit that once I get the clipping sorted out.
>
> Thanks
>
> Jon

-- 
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] Need help with small animation

2010-02-23 Thread social hub
Hi,

|---
TEXT VIEW
---'
SLIDE DRAWER image


I have a layout like this above textview and an image that slides down after
clicking the text view

I have loooked at translate animation but the issue is I want the image to
start from the bottom of text view and gradually get into its full view.

Translate animation doesnt let me start from behind the textview so that it
can appear slowly and coming out at the bottom of text view and expanding to
its fullview


I have linear layout now with textview and imageview

Please let me know how to do this.

Thanks in advance with your 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] Re: Eclipse is too slow

2010-02-23 Thread Twisted Ware
Yep, although that does sound a little slower than my 1.9 Ubuntu
machine, it's not lightning quick. Plenty fast enough to code in.

On Feb 22, 4:55 am, Ferm  wrote:
> Hello
>
> I just installed the latest version of Eclipse IDE for Java Developers
> together with the ADT plugin on my Mac (2.8 GHz, 4 GB Ram).
>
> - Opening new files from the package explorer. For example, opening a
> layout xml file takes 1-2sec- And the mouse pointer changes.
> - Switching between tabs
> - Resizing views in the workspace
>
> The performance rapidly decreases when I open more files.
>
> Are all of you developing under these circumstances? How can I speed
> up eclipse?
>
> 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


Re: [android-developers] from webview to activity

2010-02-23 Thread Jason Proctor
all this is very possible. check the documentation for WebView and 
WebViewClient to find out how.





dear developer,

is it possible that a user clicks inside a webview on a link like  and then my activity is opened?

I need this for sms, email, telephone and some specials.

Lets say the user browses on the impressum and clicks on the phone
number for support. I want the phone to call that number...

Or lets say the browser clicks on an image (with a special href?), and
I want the user to land on my picture-view-activity...

thanks,
marco

--
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



--
jason.vp.engineering.particle

--
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] SQLite database question

2010-02-23 Thread Paul
I have a database that works fine to create a new row the first time
after I start the application, but subsequent times, data base helper
returns the same rowID and does not store a new row. It doesn't help
when leaving or returning to an activity or if I stop and start the
database. Do I need to do something to tell insert to ... insert? I
can work around by restarting the app, but there must be something
simple I'm missing.

I've used the Notepad example database as my starting point.

Any help would be appreciated.
Thanks,
Paul

-- 
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: How can I verify android basic API? (e.g. Date and Time API)

2010-02-23 Thread Evans
Hello Bishu

You can find cts in
http://android.git.kernel.org/?p=platform/cts.git;a=tree;f=tests;h=95461e7438487895c7246645ed7fb9e1d432b03e;hb=refs/heads/eclair-release
I don't know where is document in there, but you can find it. You can
run CTS with your device also.

On Feb 17, 11:25 am, bishu  wrote:
> Am running around to get more details on CTS , where i can find it and
> how to run those cases on a android real device...
>
> thanks
> bishu
>
> On Jan 24, 9:11 pm, Evans  wrote:
>
>
>
> > Is it already covered by Platform API Tests inCTS(Compatibility Test
> > Suit)?
>
> > On Jan 24, 8:54 pm, Evans  wrote:
>
> > > We already use Android API. But sometimes I want to know is it
> > > verified or not? by whom?(e.g. Android team in google) by which one?
> > > (e.g. Unit test or Basic Acceptance Test for API) Do android team have
> > > any test report?
>
> > > Because this is a platform for smartphone. For example, if there has
> > > any problem in Android API (e.g. Date and Time), it makes customer
> > > spend money and time more. But I can't find any report about verifying
> > > API test.
>
> > > If you have any information about it, please let me know :) Also if
> > > there has no information, how can I test some API to verify API.
>
> > > Thanks.- Hide quoted text -
>
> > - Show quoted text -

-- 
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: Persisting alarms

2010-02-23 Thread Ken H
But how can you then set the alarm to fire at a specific time? Every
example I've come across has the alarm fire a certain amount of time
after reboot. I want to set a specific time used in my app and the
onReceive method seems pretty limited in what it will let you do.

Ken

On Feb 2, 1:26 pm, Mike Novak  wrote:
> register to receive the BOOT_COMPLETED broadcast.
>
> and register with theAlarmManagerthen.
>
> Mike
>
> On Feb 2, 2010, at 4:17 PM, Chris wrote:
>
>
>
> > Hello everyone
>
> > TheAlarmManagerAPI states that alarms created with this API are
> > removed when the phone is turned off and rebooted.
>
> > Is there a way to persist the alarms?
>
> > If I knew how to start a process immediately on bootup, I could
> > recreate the alarms, but I haven't had much luck finding this
> > information.
>
> > If anyone knows how to persist an alarm after bootup or at least auto-
> > execute an activity or intent after bootup, I would greatly appreciate
> > it.
>
> > Thanks
> > Chris
>
> > --
> > 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: Petition: Google, please improve the Android Market.

2010-02-23 Thread Mark Murphy
Hekki wrote:
> Are you sure about the carrier thing ?

Yes.

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

_Beginning Android_ from Apress Now Available!

-- 
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] How to access starred items in Google Maps?

2010-02-23 Thread Andreas Schildbach
Can anyone give an example of how to access starred items (places) in
Google Maps from another app? I'd like to pick one of those and then
read the postal address of those items (maybe lat/lon as well).

If there is an alternative, I'd prefer code that runs under 1.5 as well.

Best regards,

Andreas



-- 
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] general design question

2010-02-23 Thread sdphil
for a particular activity - what is the best way to store data that
needs to be displayed.  the issue is that when the user changes
orientation, you need to be able to re-render your activity -- which
means you need to get back at that data that you use to render.

i understand the MVC design pattern, but I guess I'm wondering where
the M should be stored.

global variables?  static members of your activity?  serialized to
private storage?

tia.

-- 
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] Insert symbol in edittext window

2010-02-23 Thread André
Hello,

I have an EditText window that I want to insert a symbol in by
pressing a button. I have tried

edittext.appen("thesymbol");

this works. But it only inserts the symbol in the end. I want it to
insert the symbol where the marker is.
How can I do this in a simple way?

André

-- 
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: Petition: Google, please improve the Android Market.

2010-02-23 Thread Disconnect
What carrier does that go to on nexus and such? Those devices don't have
assigned carriers, and the software load is created by google. (That 30% was
explained as incentive/payment for shipping the market, passing
compatibility tests, etc.)

On Tue, Feb 23, 2010 at 11:36 AM, Streets Of Boston  wrote:

> Well,
>
> This is what Google told us at the Android Developers Lab. The bulk of
> the 30% goes to the carriers, a fraction of this 30% goes to google to
> run Google Checkout and the payment processor.
>
> I guess the bulk of the 30% that goes to the carrier is an incentive
> to have Android Market (and not other markets?) installed.
>
>
> On Feb 23, 10:49 am, Disconnect  wrote:
> > Google has been very vague about where that 30% goes when you're on a
> nexus,
> > adp, etc.
> >
> >
> >
> > On Tue, Feb 23, 2010 at 10:37 AM, Hekki  wrote:
> > > Hi,
> >
> > > Are you sure about the carrier thing ?
> >
> > > I don't see when they are involved :
> >
> > > Clients only use the carrier as a dumb pipe here to get internet
> > > access, they pay using google checkout which have their credit card
> > > information(much like itunes does).
> > > So google handle the payment itself.
> >
> > > When is the carrier involved at all ? I don't understand.
> >
> > > Yahel
> >
> > > On 23 fév, 15:58, Streets Of Boston  wrote:
> > > > Yep, you're correct.
> > > > Google gets only a small portion of the 30% to cover the costs of the
> > > > payment transactions. The bulk of the 30% goes to the carriers. At an
> > > > Android Dev Lab Google told us Google's share just covers their cost.
> >
> > > > On Feb 22, 9:16 pm, "Maps.Huge.Info (Maps API Guru)"
> >
> > > >  wrote:
> > > > > You might want to drop the "let's not forget" clause as it's
> something
> > > > > that wouldn't help any petition and could keep people from agreeing
> > > > > with you.
> >
> > > > > Google doesn't get 30% of your app sales, the carrier's cut, taxes,
> > > > > fees for the merchant account and other costs eat that up to
> probably
> > > > > zero profit or near to it.
> >
> > > > > -John Coryat
> >
> > > > > On Feb 22, 7:56 pm, Matthew LeMieux  wrote:
> >
> > > > > > Has anybody else noticed that it is very difficult for many users
> to
> > > go
> > > > > > through the flow to even be able to purchase an app?  I would
> like to
> > > see
> > > > > > getting a paid app be as easy as getting a free app.  Perhaps
> giving
> > > users
> > > > > > the opportunity to register and add apps to their phone on a
> desktop
> > > rather
> > > > > > than only on the phone (similar to the experience iPhone users
> have).
> >
> > > > > > When I originally went through the flow on my G1, I found that
> the
> > > > > > registration data was in a small dialog where I couldn't really
> see
> > > what was
> > > > > > being entered while I was entering it.  I was a highly motivated
> user
> > > and
> > > > > > hence completed the whole process, but what about a casual user?
> >
> > > > > > How many users do you think have fallen out of your sales funnel
> at
> > > that
> > > > > > point?   I would be very interested to see data on how many
> android
> > > users
> > > > > > have completed the registration flow for purchasing paid apps...
> >
> > > > > > -Matthew
> >
> > > > > > On Sun, Feb 21, 2010 at 5:43 AM, Rob Irondad <
> rob.iron...@gmail.com>
> > > wrote:
> > > > > > > Hi fellow developers.
> > > > > > > I've come up with this text for a petition (warning: long):
> >
> > > > > > >http://docs.google.com/View?id=dd9hmc43_0c9zh58gd
> >
> > > > > > > You're all welcome to review it and send your comments before I
> > > > > > > publish it to some petition website.
> > > > > > > You can email me directly (rob.iron...@gmail.com).
> >
> > > > > > > --
> > > > > > > Rob
> >
> > > > > > > --
> > > > > > > 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
>  > > > ­cr...@googlegroups.com>
> > > > > > > For more options, visit this group at
> > > > > > >
> http://groups.google.com/group/android-developers?hl=en-Hidequoted
> > > text -
> >
> > > > > - Show quoted text -
> >
> > > --
> > > 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- Hide quoted
> text -
> >
> > - Show quoted text -
>
> --
> 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@go

[android-developers] Having content in wallpaper

2010-02-23 Thread Janam
Hi,

I'm trying to figure out a way to hold RSS feeds in the wallpaper. How
can I have the wallpaper hold/display content and not just an image?

 Is this even possible? If so, can anyone guide me to appropriate
articles/tutorials/apis.

Thank You.

-- 
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] Find/Set Value of Spinner

2010-02-23 Thread Nick Owens
Oh Holy Experts:

I know this is an easy one to start off the morning.  I haven't worked with
spinners before and I am trying to set the value of a spinner.

The only examples I can find on the first 5 pages of a Google search refer
to Spinner.setSelection().  That's great once I find out the ordinal of the
selection I need, but I don't know it yet!

The value I get is from the phone database, say "red", and I have a spinner
like so:

array_spinner = new String[5];
array_spinner[0] = "blue";
array_spinner[1] = "green";
array_spinner[2] = "red";
array_spinner[3] = "uglycolor";
array_spinner[4] = "someothercolor";

Spinner s = (Spinner) findViewById(R.id.res_color);
ArrayAdapter adapter = new ArrayAdapter(this,
android.R.layout.simple_spinner_item, array_spinner);
s.setAdapter(adapter);
s.setSelection(2);

So, the question is how do I get from "red" to "2"?!  There must be some
setSelectionByValue() or getSelectionIndex() function, right?

Thanks,
Nick Owens
VP, ThreeClix
Office: (904) 429-7039
Mobile: (847) 565-9392
After Hours: (904) 540-5830



-- 
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: What does the prefix 'm' stand for ?

2010-02-23 Thread Romain Guy
That was a choice made at Sun when they wrote the Java core classes,
our choice was to use a prefix. That's all. It's NOT going to change.

On Tue, Feb 23, 2010 at 12:07 AM, Kaj Bjurman  wrote:
> I don't buy that argument since since all of the core classes in Java
> are written without prefixes of any kind, and many of the classes were
> implemented before IDEs became popular. I do also think that the
> convention would have been added to the "Code Conventions for the Java
> Programming Language" (http://java.sun.com/docs/codeconv/html/
> CodeConvTOC.doc.html) if Sun thought that it added some great value.
>
> One thing that I have observed (it could be 100% wrong, but it's based
> on reading Java code since the language was released in 1996) is that
> most people who think they need prefixes and odd conventions write too
> long methods, or too complex logic, and often in combination with
> classes that are doing more than one thing. There's not need of
> prefixing if your methods are short and easy to read (IMHO).
>
>
>
> On 22 Feb, 17:05, Romain Guy  wrote:
>> I myself am not fond of prefixes, especially since languages like Java
>> already have "this." when you need to distinguish local vars vs
>> members. Also, modern IDEs highlight fields differently from local
>> variables.
>>
>> It does make sense however on a project like Android where not
>> everybody is necessarily using an IDE. And it's just a coding
>> convention :)
>>
>>
>>
>>
>>
>> On Sun, Feb 21, 2010 at 10:20 PM, Frank Weiss  wrote:
>> > I'm one of those guys who think scope prefixes, like "m", are more trouble
>> > than they're worth. The fact that you had to explain it to a newbie makes 
>> > me
>> > smile.
>>
>> > On Sun, Feb 21, 2010 at 10:04 PM, Romain Guy  wrote:
>>
>> >> It stands for "member." I believe the use of an "m" prefix with MFC
>> >> has nothing to do with the name MFC either, but rather to identify
>> >> variables that are class members as opposed to local variables for
>> >> instance.
>>
>> >> On Sun, Feb 21, 2010 at 9:52 PM, Christ  wrote:
>> >> > Hi guys,
>>
>> >> > I saw many sample codes that each variable contains the 'm' prefix. I
>> >> > don't know what this m means.
>> >> > I have two-year experience in MFC. Each variable has 'm' prefix to
>> >> > tell you that I'm the one variable of MFC component. (m stands for
>> >> > MFC).
>> >> > So...can anybody answer me this question?
>>
>> >> > Regards,
>> >> > Christ
>>
>> >> > --
>> >> > 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
>>
>> >> --
>> >> Romain Guy
>> >> Android framework engineer
>> >> romain...@android.com
>>
>> >> Note: please don't send private questions to me, as I don't have time
>> >> to provide private support.  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 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
>>
>> --
>> Romain Guy
>> Android framework engineer
>> romain...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time
>> to provide private support.  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
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  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 subscr

Re: [android-developers] Re: Camera on HTC Hero: Calling camera.autoFocus(...) gives a IOException .. ?

2010-02-23 Thread Mark Murphy
Streets Of Boston wrote:
> The problem is that when i create this sample project, i cannot be
> sure that it will recreate the problem, since i can't reproduce it.\

Oh, uh, yeah, good point.

> I'll try to get a sample going (a simple camera app that uses
> autofocus) and hopefully this will recreate the problem.

It's worth a shot.

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

Android App Developer Books: http://commonsware.com/books

-- 
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] New Android Project -> Create from existing source -> Unhandled event loop exception, java.lang.StackOverflowError

2010-02-23 Thread Matt Kanninen
This work flow is causing Eclipse to give me:

Unhandled event loop exception
java.lang.StackOverflowError


Looking at the eclipse log it gives just a bit more information:

Unhandled event loop exception java.lang.StackOverflowError
org.eclipse.ui


I am running:

Eclipse IDE for Java Developers 1.2.1.20090918-0703 epp.package.java

I tried re downloading eclipse, re installing the ADT plugin, using a
new workspace, same problem.


I am running a Dell Studio XPS 8100 64-bit Operating system with
Windows 7 Home Premium.


I can work around this by doing File -> Import rather then File -> New.

-- 
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] Find/Set Value of Spinner

2010-02-23 Thread TreKing
On Tue, Feb 23, 2010 at 8:30 AM, Nick Owens  wrote:

> So, the question is how do I get from "red" to "2"?!  There must be some
> setSelectionByValue() or getSelectionIndex() function, right?
>

Documentation is your friend. Spinner inherits from AdapterView, which has
the getSelectedItemPosition() function.

http://developer.android.com/intl/de/reference/android/widget/AdapterView.html#getSelectedItemPosition()

Tip:
if you're using Eclipse, when you are using classes that are not your own,
type "s.get" to see a list of all getter functions available to that class.
Run through the list looking at the descriptions to see if any appear to be
what you need.

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

-- 
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: Petition: Google, please improve the Android Market.

2010-02-23 Thread strazzere
Any android device, phone or not can have the market it on it. People
from other countries can also purchase paid applications if their
country has not yet been enabled.

This was the concept behind the "Market Enabler" and the research done
behind it. It's my understanding that the carrier that the device is
on, receives the chuck of the fees.

So throwing a T-Mobile sim card inside the Nexus One will net T-Mobile
with those fees. If you load up an Archos and use the Market Enabler,
T-Mobile might get those too, depending if you use those tmobile
"credentials" to access the market.

The market is filtered by your carrier, then your device (by software
id). That doesn't stop someone with a low software version and no
carrier from spoofing everything and having the "fee" go to someone it
theoretically shouldn't...

-Tim Strazzere

On Feb 23, 11:00 am, Mark Murphy  wrote:
> Disconnect wrote:
> > Google has been very vague about where that 30% goes when you're on a
> > nexus, adp, etc.
>
> Yes, that's true.
>
> Better yet, what about devices that just simply aren't phones?
> Admittedly, I'm not aware of a non-phone with the Android Market on it
> yet, but I presume it's only a matter of time.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Development Wiki:http://wiki.andmob.org

-- 
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: glDeleteBuffers crashes

2010-02-23 Thread Viktor Linder
I've also experienced this crash whenever calling glDeleteBuffers() on
the emulator. On the phone (G1) it works.
Since you seem to be doing dynamic geometry creation, it would be
interesting to know if you also encounter this issue:
http://groups.google.com/group/android-developers/browse_thread/thread/87827933dc7346c6

Best regards,
Viktor Linder

On 22 Feb, 22:20, Clankrieger  wrote:
> Hi,
>
> I tried to use VBO on 1.6 Android SDK and get a crash whenever I try
> to give the VBO id free usingglDeleteBuffers. The issue has already
> been filed here:
>
> http://code.google.com/p/android/issues/detail?id=4273
>
> Is there any way of giving a VBO id free, then? Otherwise I'm afraid
> that I can't use VBO because I might run out of graphics memory/buffer
> IDs.
>
> 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: Nexus One: A-GPS and setup w/o carrier

2010-02-23 Thread greg
Thanks.  One last question, since you've used the Nexus One outside,
how would you describe the visibility of its screen in shade and in
direct sunlight?

Thanks again,
Greg

On Feb 23, 11:42 am, mah  wrote:
> I have a Nexus One that has never had a SIM installed... I enabled its
> GPS and took it outside. It took a while to get a location (as is
> expected without A-GPS), but it was able to get a fix. When I walked
> within range of a WiFi I attach to, Google Maps then displayed my
> accurate location on a map.
>
> Note: On this device, I've not even entered my Google account
> information; I just skipped that part of the initial device power-on.
>
> On Feb 22, 12:04 pm, greg  wrote:
>
> > I'm interested in buying a Nexus One to develop an accurate trail
> > mapping application that uses the Nexus One's GPS receiver,
> > accelerometer, and compass.  Currently, I'm not interested in using it
> > as a phone and therefore am not interested in signing a contract with
> > a carrier.  So, I have a couple questions.
>
> > 1) As mentioned in the Wikipedia article about A-GPS, "A typical A-GPS-
> > enabled receiver will use a data connection (Internet or other) to
> > contact the assistance server for A-GPS information. Some A-GPS
> > devices cannot fall back to standard GPS."  Does the Nexus One fall
> > back to standard GPS if the assistance server is not available?
>
> > 2) Is it possible to setup a Nexus One (i.e., enter my Google account
> > information) without a phone service, perhaps using WiFi instead?
>
> > - Greg
>
> > P.S., I asked these questions to the sales help team 
> > athttp://www.google.com/phone
> > and was directed here.  Obviously, they aren't paid a commission. :*)
>
>

-- 
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: Petition: Google, please improve the Android Market.

2010-02-23 Thread brucko

> So throwing a T-Mobile sim card inside the Nexus One will net T-Mobile
> with those fees. If you load up an Archos and use the Market Enabler,
> T-Mobile might get those too, depending if you use those tmobile
> "credentials" to access the market.
>
> The market is filtered by your carrier, then your device (by software
> id). That doesn't stop someone with a low software version and no
> carrier from spoofing everything and having the "fee" go to someone it
> theoretically shouldn't...
>
> -Tim Strazzere

This is correct. I have been using an unlocked phone in Australia and
my carrier (optus) does not support Market so I have no access.

Throw in my wifes SIM from the "3" network and paid apps magically
appear. Market access is controlled through the carrier named on the
SIM.

-- 
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] A Widget that looks like a launcher icon?

2010-02-23 Thread Mariano Kamp
Thanks guys.

The thing is, it shouldn't look like a widget, but like an active shortcut
with a badge representing the unread count. My shortcuts to labels in Gmail
have the drawback that I always have to open them to see what's in them.

It would be great if there were a way to use common functionality to meet
the look of the particular platform, but I understand there isn't such a
functionality at the moment.

On Mon, Feb 22, 2010 at 11:01 PM, Romain Guy  wrote:

> Widgets should look like widgets, not like shortcuts. The main reason
> is that there is absolutely NO guarantee about what a shortcut will
> look like. Other devices (especially ones with custom system UIs like
> MOTOBLUR or HTC Sense) might have a different look and feel. Or in the
> next update of Android we might change the way shortcuts are
> presented.
>
> On Mon, Feb 22, 2010 at 1:40 PM, Mariano Kamp 
> wrote:
> > Hi,
> > I would like to write a widget that emulates the look of an application
> > launcher shortcut. In particular I want the white font label on a black,
> > semi-transparent background. As it should look the same as the launcher
> > shortcut I wouldn't like too much to imitate the actual look, but to
> > re-use/copy it. Any idea where I can get that?
> > I checked the launcher app and found application-boxed.xml, but it
> doesn't
> > seem to do what I want and I am probably way off anyway.
> > Any ideas?
> > Btw. I know that this is like a shortcut, but on a shortcut I cannot
> render
> > the number of unread items.
> > Cheers,
> > Mariano
> >
> > --
> > 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
>
>
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  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 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: Petition: Google, please improve the Android Market.

2010-02-23 Thread Tim
I know ;)

I've done the research and published the work arounds :)

-Tim Strazzere


On Tue, Feb 23, 2010 at 2:46 PM, brucko  wrote:

>
> > So throwing a T-Mobile sim card inside the Nexus One will net T-Mobile
> > with those fees. If you load up an Archos and use the Market Enabler,
> > T-Mobile might get those too, depending if you use those tmobile
> > "credentials" to access the market.
> >
> > The market is filtered by your carrier, then your device (by software
> > id). That doesn't stop someone with a low software version and no
> > carrier from spoofing everything and having the "fee" go to someone it
> > theoretically shouldn't...
> >
> > -Tim Strazzere
>
> This is correct. I have been using an unlocked phone in Australia and
> my carrier (optus) does not support Market so I have no access.
>
> Throw in my wifes SIM from the "3" network and paid apps magically
> appear. Market access is controlled through the carrier named on the
> SIM.
>
> --
> 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: Nexus One: A-GPS and setup w/o carrier

2010-02-23 Thread mah
I haven't used it extensively outside -- I was curious regarding your
question and that prompted me to give it a shot ;)

That being said, my initial glance at the screen was difficult enough
that I had to shade the sun with my hand to view it properly. Hardly a
scientific data set, but I definitely noticed that.

On Feb 23, 2:45 pm, greg  wrote:
> Thanks.  One last question, since you've used the Nexus One outside,
> how would you describe the visibility of its screen in shade and in
> direct sunlight?
>
> Thanks again,
> Greg
>
> On Feb 23, 11:42 am, mah  wrote:
>
> > I have a Nexus One that has never had a SIM installed... I enabled its
> > GPS and took it outside. It took a while to get a location (as is
> > expected without A-GPS), but it was able to get a fix. When I walked
> > within range of a WiFi I attach to, Google Maps then displayed my
> > accurate location on a map.
>
> > Note: On this device, I've not even entered my Google account
> > information; I just skipped that part of the initial device power-on.
>
> > On Feb 22, 12:04 pm, greg  wrote:
>
> > > I'm interested in buying a Nexus One to develop an accurate trail
> > > mapping application that uses the Nexus One's GPS receiver,
> > > accelerometer, and compass.  Currently, I'm not interested in using it
> > > as a phone and therefore am not interested in signing a contract with
> > > a carrier.  So, I have a couple questions.
>
> > > 1) As mentioned in the Wikipedia article about A-GPS, "A typical A-GPS-
> > > enabled receiver will use a data connection (Internet or other) to
> > > contact the assistance server for A-GPS information. Some A-GPS
> > > devices cannot fall back to standard GPS."  Does the Nexus One fall
> > > back to standard GPS if the assistance server is not available?
>
> > > 2) Is it possible to setup a Nexus One (i.e., enter my Google account
> > > information) without a phone service, perhaps using WiFi instead?
>
> > > - Greg
>
> > > P.S., I asked these questions to the sales help team 
> > > athttp://www.google.com/phone
> > > and was directed here.  Obviously, they aren't paid a commission. :*)

-- 
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   >