[android-developers] Re: obtain information from "My Profile"

2011-11-15 Thread jose
I want to get alias or name the owner of the mobile

On 16 nov, 01:05, TreKing  wrote:
> On Tue, Nov 15, 2011 at 2:33 AM, jose  wrote:
> > Hello, I want to obtain information from Contacts "My Profile", to know
> > the cell phone owner's name. thanks
>
> What are you talking about?
>
> --- 
> --
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] Problem with Android Emulator

2011-11-15 Thread Bishan
When i start the emulator, it show on taskbar. but it is not comes to my pc
screen. i tried to get it on my pc screen using task manager by selecting
Bring to Front command. but it is not comes to infront of my screen.

how could i fix 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: onConfigurationChanged call back is not getting called?

2011-11-15 Thread shweta
Hello,

Put configChanges attribute into manifiest file before closing  tag.
Example are given below:




On Nov 15, 11:58 pm, Shri  wrote:
> If you are running on Honeycomb, you need to also include "screenSize"
> (which was introduced in Honeycomb) along with "orientation". 
> Seehttp://developer.android.com/guide/topics/manifest/activity-element.h...
> .

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Camera access

2011-11-15 Thread kypriakos

Just in case this will help anyone else - i figured out the issue. I
was snapping
a picture and then restarting the preview right away. With the slower
phones (G1)
this was ok but with newer phones that are faster this won't work. I
moved the
preview to start inside the jpegcallback and after the picture was
stored and
it works fine now.

Thanks

On Nov 16, 12:41 am, kypriakos  wrote:
> Well this is what I found out -
>
> first time the activity is launched the camera goes into preview mode,
> snaps a pic,
> stores the pic and then tries to get into preview mode again. I
> removed the last
> step and still the pic is taken and it stays stuck on the screen. I
> realized that
> the camera service usually will ask the user if he/she wants to save
> the pic. Either
> way it then returns to the preview mode. In the case of my app it is
> supposed to snap
> the pic, save it and return to preview. This exact code works on teh
> G1 but on the
> LG after the pic is snapped it remains on the screen.
>
> Would the camera service be different across Froyo-based mobiles? I
> wouldn't thjnk
> so ...
>
> On Nov 15, 6:05 pm, kypriakos  wrote:
>
>
>
>
>
>
>
> > Right on Mark, One of the reasons I found out was a lingering process
> > that was locked it.
> > I killed that process and the camera service responds fine now.
>
> > The second time it did this I found out that after the camera goes
> > into preview, an image
> > is snapped (this is the app I am testing that takes pictures
> > automatically every few
> > seconds) but right after the first picture is snapped on this phone
> > the Camera service dies.
> > This is still puzzling cause like I said earlier this app works fine
> > on an identical phone.
> > I will check to see if I am setting the resolution of the preview or
> > the picture to be something
> > outside what this camera can handle? Also I saw messages that the
> > Rolloff feature is not
> > supported, no idea what that is.
> > When I set the autofocus in the manifest the phone (again running 2.2)
> > said that this feature
> > is not available, which makes no sense since 2.2 does support
> > autofocus.
>
> > On Nov 15, 5:53 pm, Mark Murphy  wrote:
>
> > > It seems like the CameraService thinks that the camera is in use. Only
> > > one application can use the camera at a time. And if an application
> > > leaks the camera (by not closing it), it might be tied up until the
> > > process gets terminated or you reboot the phone.
>
> > > On Tue, Nov 15, 2011 at 5:17 PM, kypriakos  wrote:
>
> > > > Hi all,
>
> > > > I have been running an activity that access the phone's camera (on
> > > > Froyo), puts it
> > > > in preview mode and then snaps and stores a picture. This has been
> > > > working fine
> > > > on one phone but on a second phone with the same OS and specs I get
> > > > the following:
>
> > > > I/#LGIME  ( 1481):  onStartInput: restarting=false, fieldId=-1
> > > > I/System.out( 6895): surface created - calling picture ...
> > > > E/CameraService( 1291): CameraService::connect X (pid 6895, new client
> > > > 0x1bfc8) rejected. (old pid 5261, old client 0x22798)
> > > > E/CameraService( 1291): forcefully terminating old client.. ref count
>
> > > > Has anyone seen this before? What would cause the camera service to
> > > > reject connections to
> > > > it since the Manifest for the app is the same as on the other phone
> > > > and it does allow Camera
> > > > access. Any ideas would be appreciated.
>
> > > > 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
>
> > > --
> > > Mark Murphy (a Commons 
> > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|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] Help needed with dynamic layout change [UI Rearrange]

2011-11-15 Thread androidCrazy
I have two activities. 

The first activity has buttons arranged as per layoutfirst.xml in protrait 
mode and layoutfirst.xml in landscape mode, placed in layouts-land folder.
The second activity is a text view.

The navigation first view -> button click -> second view
Change orientation to landscape in second view -> click on back -> comes to 
first view with deformed layoutfirst.xml of the portrait orientation. I 
want that to be changed to layoutfirst.xml in the layouts-land folder. To 
achieve this, in onStart() method of the first view, called 
"setContentView(R.layout.layoutfirst);", the layout was changed accordingly 
but the screen freezes.

Is there anything I'm missing or any other way to achieve this. Any help is 
greatly appreciated. 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] Remove Log Statements

2011-11-15 Thread Android Developer
Hi All,

Before pushing application to market we need to remove Log statements.
if application contains more java files then its hard to remove one by
one.

is Proguard is the best solution for this scenario? if its that it
giving some problem while optimizing external jar files especially
restlet jar it throughs nullPointerException.

How do i solve this?


Thanks
Mani.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] device in sleep mode, service still working ?

2011-11-15 Thread SL@maxis


Assume I write a service (no interface) that communicates with a PC when  
an event occurs via WiFi or Bluetooth.


When the phone goes into sleep mode, is the service still working ? Thanks.


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

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


Re: [android-developers] Android Development Environment?

2011-11-15 Thread manoj lasantha
i installed ADT in eclipse and SDK as well in windows as ubuntu.But i feel
sound good in ubuntu as the emulator is in a rather speed state in ubuntu:

On Fri, Nov 11, 2011 at 9:56 AM, Jones  wrote:

> What development environments are most Android developers using
> (Eclipse, IntelliJ, etc)?
>
> What development platform is most prevalent (Windows, OSX, Linux)?
>
> Thanks!
> Jones/
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> 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




-- 

lpalliyaguru

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 connect android device to wifi printer ??

2011-11-15 Thread Hrishi
Hi ... I am newbie to android ,Want to code a Android app, which will
connect to a wifi printer and than make a printing.

Please tell me step that how could i get this result ...

The question mark is how to connect to the network printer

So if anyone can suggest me a way i would appriciate it,

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: How to access class file

2011-11-15 Thread Ketan
Can I access bytecode of some file/function from dex file 

On Nov 12, 12:58 am, Mark Murphy  wrote:
> On Fri, Nov 11, 2011 at 6:47 AM, Ketan  wrote:
> > I want to acess class file from bin folder in android.
> > I was doing it using
> > File f = new File("/bin/filename.class");
>
> > Its working fine in java but in android giving path doesnt work,,, so
> > please suggest me other way to access class file of any java file.
>
> This is not possible. For starters, there is no .class file in an Android APK.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training in NYC:http://marakana.com/training/android/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Camera access

2011-11-15 Thread kypriakos

Well this is what I found out -

first time the activity is launched the camera goes into preview mode,
snaps a pic,
stores the pic and then tries to get into preview mode again. I
removed the last
step and still the pic is taken and it stays stuck on the screen. I
realized that
the camera service usually will ask the user if he/she wants to save
the pic. Either
way it then returns to the preview mode. In the case of my app it is
supposed to snap
the pic, save it and return to preview. This exact code works on teh
G1 but on the
LG after the pic is snapped it remains on the screen.

Would the camera service be different across Froyo-based mobiles? I
wouldn't thjnk
so ...

On Nov 15, 6:05 pm, kypriakos  wrote:
> Right on Mark, One of the reasons I found out was a lingering process
> that was locked it.
> I killed that process and the camera service responds fine now.
>
> The second time it did this I found out that after the camera goes
> into preview, an image
> is snapped (this is the app I am testing that takes pictures
> automatically every few
> seconds) but right after the first picture is snapped on this phone
> the Camera service dies.
> This is still puzzling cause like I said earlier this app works fine
> on an identical phone.
> I will check to see if I am setting the resolution of the preview or
> the picture to be something
> outside what this camera can handle? Also I saw messages that the
> Rolloff feature is not
> supported, no idea what that is.
> When I set the autofocus in the manifest the phone (again running 2.2)
> said that this feature
> is not available, which makes no sense since 2.2 does support
> autofocus.
>
> On Nov 15, 5:53 pm, Mark Murphy  wrote:
>
>
>
>
>
>
>
> > It seems like the CameraService thinks that the camera is in use. Only
> > one application can use the camera at a time. And if an application
> > leaks the camera (by not closing it), it might be tied up until the
> > process gets terminated or you reboot the phone.
>
> > On Tue, Nov 15, 2011 at 5:17 PM, kypriakos  wrote:
>
> > > Hi all,
>
> > > I have been running an activity that access the phone's camera (on
> > > Froyo), puts it
> > > in preview mode and then snaps and stores a picture. This has been
> > > working fine
> > > on one phone but on a second phone with the same OS and specs I get
> > > the following:
>
> > > I/#LGIME  ( 1481):  onStartInput: restarting=false, fieldId=-1
> > > I/System.out( 6895): surface created - calling picture ...
> > > E/CameraService( 1291): CameraService::connect X (pid 6895, new client
> > > 0x1bfc8) rejected. (old pid 5261, old client 0x22798)
> > > E/CameraService( 1291): forcefully terminating old client.. ref count
>
> > > Has anyone seen this before? What would cause the camera service to
> > > reject connections to
> > > it since the Manifest for the app is the same as on the other phone
> > > and it does allow Camera
> > > access. Any ideas would be appreciated.
>
> > > 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
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|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] Required SPI interface opencv running on Android

2011-11-15 Thread srinivasan shanmugam
Dear All,

I got the opencv for Android serial port -api ie., for UART communication 
in the below link

http://code.google.com/p/android-serialport-api/source/checkout
Similarly Could you pls get me the link for Android_SPI_api for using SPI 
interface on IMX_535 qsb on which android is running

As i'm helpless,Kindly do the needful as soon as possible,

Thanks in advance,
Srinivasan S 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Two active surfaceViews on top of one another

2011-11-15 Thread Rajeev Ranganathan
I am yet try  the solution,which Nick has mentioned.
Meanwhile,i was trying another thing,where am not actually,stacking
the surfaceviews(one over the other),
but have created a layout in such a way that,they should come side by
side.But,still,am able to view
only one surfaceView content.The WHITE PATCH gets displayed on the
other which actually should render
 a video content.Heres the layout design,
**

http://schemas.android.com/apk/res/
android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>















**
Am i missing something..???..:(

Regards,
-Rajeev

On Nov 15, 10:19 am, Dianne Hackborn  wrote:
> On Mon, Nov 14, 2011 at 4:36 AM, Nickw  wrote:
> > I (and others, e.g. look athttp://nhenze.net/?p=172) have managed to
> > get this to work with an OpenGL surface view layered on top of a
> > camera feed surface view. It works (on my test system) if (counter-
> > intuitively) the OpenGL view is added *before* the camera feed.
> > However, two or three times on this newsgroup, Google employees have
> > stated that it isn't guaranteed to work.
>
> This is not guaranteed to work. :)  It is completely undefined what Z order
> you will end up with surface views that are of the same type.  There is
> nothing in the code trying to control what order they appear in; the result
> you get is entirely based on arbitrary luck.
>
> The only control you have over z ordering are these:
>
> http://developer.android.com/reference/android/view/SurfaceView.html#...)
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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


Re: [android-developers] MediaMetadataRetriever does this work PLEASE Help?

2011-11-15 Thread New Developer

So my play loop is

loadFrame()   {
   frames.incrementProgressBy(326-(playSpeed*30)); frames is a seekbar
   frame = frames.getProgress();
   pict = retriever.getFrameAtTime(frame*1000);
   mBitmap  = Bitmap.createBitmap(pict, 0, 0, 1060,600, matrix, 
false);

   super.setImageBitmap(mBitmap);
}

@Override protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
if (isPlaying)  loadFrame();
}

so essentially  frame is incremented by 326
thus  getFrame  is in steps of  326,000

I think this is generating the jumpiness I see,
But if I make this any smaller it will play slower than what was recorded.
the 326 allows a 15 second video to play back in 15 seconds.

So is there anyway to speed up the time it takes to recall loadFrame()  
thus allowing for a smaller step value ?



Thanks in advance


On 11/15/2011 11:22 PM, New Developer wrote:

Horay ! ! ! !
funny that just
retrieve.getFrameAtTime(frame);vs  retrieve.getFrameAtTime(frame * 
1000);

can make such a HUGE difference, now  If I can just make it smoother

Thanks all


On 11/14/2011 01:34 PM, New Developer wrote:
No matter what I pass as a value to getFrameAtTime()  always displays 
the first frame
If I  keep a copy of the past frames and compare them they are not 
the same neither is the pixel array from getPixels

So the bitmap must be updating but just not displaying on screen.

I have tried setting the layer type  to  Hardware accelerated  will 
not work
isHardwareAccelerated   returns false  even after  
layout.setLayerType(View.LAYER_TYPE_HARDWARE,  null);



tried to use runOnUiThread
   mActivity.runOnUiThread(new Runnable() {
public void run() {
mBitmap.prepareToDraw();
ImageDisplay.imageView.setImageBitmap(mBitmap);
ImageDisplay.imageView.invalidate();
}
});

No Joy

Please any advice on how to get these bitmaps to show ? ? ?

Main Activity   has  a FrameLayout
the FrameLayout is fille with a call to a Fragment  inflate
The fragment extends an ImageView Type
Works great with jpg  and png will not work with  3gp

Thanks again



On 11/13/2011 07:41 PM, New Developer wrote:

No matter what value is passed to
  pict = retrieve.getFrameAtTime(frame);
You always have the first frame never anything else ?
Why ?



On 11/13/2011 04:04 PM, New Developer wrote:

Called from a class that implements  ImageView

@Override protected void onDraw(Canvas canvas) {
Log.e("Video Media" , "on Draw Called");
super.onDraw(canvas);
Log.e("Media", "drawstep 2");
if (isPlaying)  loadFrame();
Log.e("Media", "drawstep 3");
}

private void loadFrame() {
if (isPlaying) {
frames.incrementProgressBy(11-playSpeed);
if (frame == duration)  {
isPlaying = false;
frame = 0;
frames.setProgress(0);
frames.setEnabled(true);
speed.setEnabled(true);

play.setBackgroundDrawable(getResources().getDrawable(R.drawable.play));

}
pict.recycle(); mBitmap.recycle();
   
retrieve.getFrameAtTime(frame);retrieve.getFrameAtTime(frame);retrieve.getFrameAtTime(frame);retrieve.getFrameAtTime(frame);
mBitmap  = Bitmap.createBitmap(pict, 0, 0, 
pict.getWidth(),pict.getHeight(), matrix, true);
Log.e("Media", "load Frame" + frame + "("+ 
(11-playSpeed) +")" + pict.getWidth() + " x " + 
pict.getHeight() );

Log.e("Media", "load Framestep 1   ");
super.setImageBitmap(mBitmap);
Log.e("Media", "load Framestep 2   ");
super.invalidate();
Log.e("Media", "load Framestep 3   ");
}
}


frame get inremented in steps of 10  , thus  pict = 
retrieve.getFrameAtTime(frame);  loads every 10 frames

mBitmap as you can see is set to update the super.setImageBitmap()

resulting in the following logcat

11-13 15:47:52.605: E/Video Media(4647): on Draw Called
11-13 15:47:52.615: E/Media(4647): drawstep 2
11-13 15:47:52.915: E/Media(4647): load Frame2450
(10)1280 x 720

11-13 15:47:52.915: E/Media(4647): load Framestep 1
11-13 15:47:52.915: E/Media(4647): load Framestep 2
11-13 15:47:52.915: E/Media(4647): load Framestep 3
11-13 15:47:52.915: E/Media(4647): drawstep 3

11-13 15:47:52.935: E/Video Media(4647): on Draw Called
11-13 15:47:52.945: E/Media(4647): drawstep 2
11-13 15:47:53.255: E/Media(4647): load Frame2460
(10)1280 x 720

11-13 15:47:53.255: E/Media(4647): load Framestep 1
11-13 15:47:53.255: E/Media(4647): load Framestep 2
11-13 15:47:53.255: E/Media(4647): load Framestep 3
11-13 15:47:53.255: E/Media(4647): drawstep 3

11-13 15:47:53.275: E/Video Media(4647): on Draw Called
11-13 15:47:53.285: E/Media(4647): drawstep 2
11-13 15:47:53.585: E/Media(

[android-developers] navigation bar in icrecream emulator

2011-11-15 Thread rukiman
How come the hw.mainKeys setting has no effect in the AVD for
WVGA800 ?
Is there any way to force the navigation bar to appear?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] MediaMetadataRetriever does this work PLEASE Help?

2011-11-15 Thread New Developer

Horay ! ! ! !
funny that just
retrieve.getFrameAtTime(frame);vs  retrieve.getFrameAtTime(frame * 
1000);

can make such a HUGE difference, now  If I can just make it smoother

Thanks all


On 11/14/2011 01:34 PM, New Developer wrote:
No matter what I pass as a value to getFrameAtTime()  always displays 
the first frame
If I  keep a copy of the past frames and compare them they are not the 
same neither is the pixel array from getPixels

So the bitmap must be updating but just not displaying on screen.

I have tried setting the layer type  to  Hardware accelerated  will 
not work
isHardwareAccelerated   returns false  even after  
layout.setLayerType(View.LAYER_TYPE_HARDWARE,  null);



tried to use runOnUiThread
   mActivity.runOnUiThread(new Runnable() {
public void run() {
mBitmap.prepareToDraw();
ImageDisplay.imageView.setImageBitmap(mBitmap);
ImageDisplay.imageView.invalidate();
}
});

No Joy

Please any advice on how to get these bitmaps to show ? ? ?

Main Activity   has  a FrameLayout
the FrameLayout is fille with a call to a Fragment  inflate
The fragment extends an ImageView Type
Works great with jpg  and png will not work with  3gp

Thanks again



On 11/13/2011 07:41 PM, New Developer wrote:

No matter what value is passed to
  pict = retrieve.getFrameAtTime(frame);
You always have the first frame never anything else ?
Why ?



On 11/13/2011 04:04 PM, New Developer wrote:

Called from a class that implements  ImageView

@Override protected void onDraw(Canvas canvas) {
Log.e("Video Media" , "on Draw Called");
super.onDraw(canvas);
Log.e("Media", "drawstep 2");
if (isPlaying)  loadFrame();
Log.e("Media", "drawstep 3");
}

private void loadFrame() {
if (isPlaying) {
frames.incrementProgressBy(11-playSpeed);
if (frame == duration)  {
isPlaying = false;
frame = 0;
frames.setProgress(0);
frames.setEnabled(true);
speed.setEnabled(true);

play.setBackgroundDrawable(getResources().getDrawable(R.drawable.play));

}
pict.recycle(); mBitmap.recycle();
   
retrieve.getFrameAtTime(frame);retrieve.getFrameAtTime(frame);retrieve.getFrameAtTime(frame);retrieve.getFrameAtTime(frame);
mBitmap  = Bitmap.createBitmap(pict, 0, 0, 
pict.getWidth(),pict.getHeight(), matrix, true);
Log.e("Media", "load Frame" + frame + "("+ 
(11-playSpeed) +")" + pict.getWidth() + " x " + 
pict.getHeight() );

Log.e("Media", "load Framestep 1   ");
super.setImageBitmap(mBitmap);
Log.e("Media", "load Framestep 2   ");
super.invalidate();
Log.e("Media", "load Framestep 3   ");
}
}


frame get inremented in steps of 10  , thus  pict = 
retrieve.getFrameAtTime(frame);  loads every 10 frames

mBitmap as you can see is set to update the super.setImageBitmap()

resulting in the following logcat

11-13 15:47:52.605: E/Video Media(4647): on Draw Called
11-13 15:47:52.615: E/Media(4647): drawstep 2
11-13 15:47:52.915: E/Media(4647): load Frame2450
(10)1280 x 720

11-13 15:47:52.915: E/Media(4647): load Framestep 1
11-13 15:47:52.915: E/Media(4647): load Framestep 2
11-13 15:47:52.915: E/Media(4647): load Framestep 3
11-13 15:47:52.915: E/Media(4647): drawstep 3

11-13 15:47:52.935: E/Video Media(4647): on Draw Called
11-13 15:47:52.945: E/Media(4647): drawstep 2
11-13 15:47:53.255: E/Media(4647): load Frame2460
(10)1280 x 720

11-13 15:47:53.255: E/Media(4647): load Framestep 1
11-13 15:47:53.255: E/Media(4647): load Framestep 2
11-13 15:47:53.255: E/Media(4647): load Framestep 3
11-13 15:47:53.255: E/Media(4647): drawstep 3

11-13 15:47:53.275: E/Video Media(4647): on Draw Called
11-13 15:47:53.285: E/Media(4647): drawstep 2
11-13 15:47:53.585: E/Media(4647): load Frame2470
(10)1280 x 720

11-13 15:47:53.585: E/Media(4647): load Framestep 1
11-13 15:47:53.585: E/Media(4647): load Framestep 2
11-13 15:47:53.585: E/Media(4647): load Framestep 3
11-13 15:47:53.585: E/Media(4647): drawstep 3

11-13 15:47:53.605: E/Video Media(4647): on Draw Called
11-13 15:47:53.615: E/Media(4647): drawstep 2
11-13 15:47:53.925: E/Media(4647): load Frame2480
(10)1280 x 720

11-13 15:47:53.925: E/Media(4647): load Framestep 1
11-13 15:47:53.925: E/Media(4647): load Framestep 2
11-13 15:47:53.925: E/Media(4647): load Framestep 3
11-13 15:47:53.925: E/Media(4647): drawstep 3

11-13 15:47:53.945: E/Video Media(4647): on Draw Called
11-13 15:47:53.955: E/Media(4647): drawstep 2
11-13 15:47:54.255: E/Media(4647): load Frame2490
(10)1280 x 720

11-

[android-developers] Re: 1024x1024 texture drops framerate dramatically

2011-11-15 Thread Jonathan
It's only 3 years old, but I suppose that anything older than 6 months
in the smartphone industry is considered to be "ancient hardware".
Anyway, I don't use it as a phone; I use it as a development tool.

On Nov 14, 8:15 pm, niko20  wrote:
> Wow, a G1? You my friend have a piece of ancient hardware.
>
> On Nov 14, 4:09 pm, Jonathan  wrote:
>
>
>
>
>
>
>
> > When I use a1024x1024texture atlas, my framerate is miserable (less
> > than 10fps rendering a few simple sprites). If I use a 512x512 texture
> > atlas instead, my framerate is normal. I am testing on a G1. Has
> > anyone had similar experiences? I thought a G1 should be able to
> > handle1024x1024. Is there something else that I could be doing wrong?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Call tab_indicator.xml from styles.xml

2011-11-15 Thread Ivan Soto
Hello,

I'm trying to create a custom theme without relying in classes. Something 
that is easy enough to plug into an app. My problem is that the TabWidget 
in styles.xml doesn't reference tab_indicator.xml anywhere so I can't see a 
way of using a custom style unless I call the style from the layout file or 
the activity using the tab widget.

This is the only reference I see in styles.xml


@style/TextAppearance.Widget.TabWidget
marquee
true


Any ideas?

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

[android-developers] SharedPreferences question

2011-11-15 Thread Larry/MavrickProductions
I have a need to store a single value - the year - so that it can be
called from any activity in my app. Shared Preferences seems to be the
easiest but I've got myself coded into a wall and could use a spot of
advice.

I think the problem is in my XML, but I'm not sure. Here's the
pertinent snip of the java. It should be calling the "setyear"
variable from the settings.xml file:

SharedPreferences myPrefs = getSharedPreferences("settings",
MODE_PRIVATE);
final SharedPreferences.Editor prefsEditor = 
myPrefs.edit();

int checkme = myPrefs.getInt("setyear", 0);
if (checkme < 2011)
{
prefsEditor.putInt("setyear", 2011);
prefsEditor.commit();
}

and the XML:


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

android:key="setyear"
android:defaultValue="2011"


android:key="currlist"
android:defaultValue="99"



Suggestions? Did I totally hose myself?

Best, -Larry

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Help with GPS Provider Switch

2011-11-15 Thread Tommy Hartz
 

Hey,

 

Right now when trying to get a user location I start with the GPS Provider.
I have a timer set for 30 seconds, If a location is not found in 30 seconds
the timer goes off and stops that location request. When that happens I move
to the Passive Provider. After 30 seconds if a location is not found I stop
the location request and move to the Network Provider.

 

My issue is that when the network provider gets called it never does
anything. If I start with the network provider it goes off just fine and
returns a location back to me. Below is the code I am trying to use:

 

gpsTimer.schedule(new TimerTask(){

  @Override

  public void run() {



startPassive();





  }

}, 3);



currentTimer = "GPS";

 
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,
locationListener);

 

private void startPassive(){



locationManager.removeUpdates(locationListener);



//Now we want to try for a Passive Fix

currentTimer = "Passive";

passiveTimer.schedule(new TimerTask(){

 

  @Override

  public void run() {

startNetwork();

  }

  

}, 3);

Looper.prepare();

Looper.myLooper().quit();

 
locationManager.requestLocationUpdates(LocationManager.PASSIVE_PROVIDER, 0,
0, locationListener);

 

private void startNetwork(){

locationManager.removeUpdates(locationListener);

currentTimer = "Network";

Looper.prepare();

Looper.myLooper().quit();

 
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0,
0, locationListener);

 

any help or suggestions would be greatly appreciated. Thank so much 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

Re: [android-developers] Help need on face book integration

2011-11-15 Thread TreKing
On Tue, Nov 15, 2011 at 9:01 AM, chowdary nani wrote:

> I need help on integrating face book into my android application and
> creating developers id in face book.
> Please help me on this.
>

Please try a simple Google search - this has been asked (and solved) about
a billion times now.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: DatePicker in a fragment

2011-11-15 Thread kbeal10
The solution I came up with was to subclass DialogFragment, returning
a DatePickerDialog in onCreate()

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {

return new DatePickerDialog(sContext, dateSetListener,
sDate.get(Calendar.YEAR), sDate.get(Calendar.MONTH),
sDate.get(Calendar.DAY_OF_MONTH));

}

I implement DatePickerDialog.OnDateSetListener.onDateSet() in my
DateDialogFragment.

private DatePickerDialog.OnDateSetListener dateSetListener =
new DatePickerDialog.OnDateSetListener() {

@Override
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {

Calendar newDate = Calendar.getInstance();
newDate.set(year, monthOfYear, dayOfMonth);
//call back to the DateDialogFragment listener
sListener.dateDialogFragmentDateSet(newDate);

}
};


I also define a listener interface in my DateDialogFragment for the
calling Activity/Fragment to implement.

public interface DateDialogFragmentListener{
public void dateDialogFragmentDateSet(Calendar date);
}

As you can see above, I fire my DateDialogFragmentListener from the
DatePickerDialog's listener.

I wrote about it in more detail with entire source here:
http://www.kylebeal.com/2011/11/android-datepickerdialog-and-the-dialogfragment/

On Nov 11, 1:55 pm, Kyle  wrote:
> I am attempting to use a datepicker dialog based on the example 
> athttp://developer.android.com/resources/tutorials/views/hello-datepick
> This is obviously for an activity, but I'm trying to implement the
> same functionality in a fragment.  Using the code from the example
> won't work.  By this, I mean the following code snippet does not
> actually open the dialog:
>
> ...
> mPickDate = (Button) mRootView.findViewById(R.id.button_leave_date);
>
> // add a click listener to the button
> mPickDate.setOnClickListener(new View.OnClickListener() {
>        public void onClick(View v) {
>                 mActivity.showDialog(DATE_DIALOG_ID);
>        }});
>
> ...
>
> After reading various sources online, I know "showDialog" is
> deprecated and the recommendation is to use the DialogFragment.
> However, is there an option to generate a date picker dialog with this
> implementation?  I've been unable to find any good examples of anyone
> trying this - so if there are resources available to merge the
> (deprecated) example on the Android Developer web site with an actual
> DialogFragment implementation, I would really appreciate it.

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


[android-developers] Re: Remote control of apps

2011-11-15 Thread BelvCompSvs
Android Debug Bridge:

stop

Stops execution of an emulator/device instance

On Nov 15, 12:53 pm, kypriakos  wrote:
> Hi all,
>
> I remember that you can launch apps remotely on a phone using:
>
> adb shell am start -n ...
>
> I never looked for one that would terminate the app remotely. Is there
> one? May be I can write scripts that can grep the ps on the device
> and send a remote kill but (i) that is not possible on devices that
> are not rooted and (ii) may be not a good idea. So most likely I will
> have to write a receptor on an app that when a term app commands
> comes in over a socket it can then schedule itself with Android
> for termination.
>
> Has anyone tried this before?
>
> 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: registering the same BroadcastReceiver multiple times with the same intentFilter

2011-11-15 Thread BelvCompSvs
my experience in this situation is to write some one-off and run it
and see what it does as that will tell you more -- just be sure to
wrap it as tight as you can for testing then run it hard and see what
it does

otherwise one may propagate mythology ... not good in real world

On Nov 15, 7:38 pm, Philippe Laporte  wrote:
> Hi,
>
> This is allowed, right?
>
> Also, doing that, we only need one unregister call to remove the whole
> thing - or rather - the sole effectively-registered receiver, right?
>
> Thanks,
> Philippe Laporte

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: audio record emulator : setAudioSource failed

2011-11-15 Thread Eric
add permission for media recorder:)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] registering the same BroadcastReceiver multiple times with the same intentFilter

2011-11-15 Thread Philippe Laporte

Hi,

This is allowed, right?

Also, doing that, we only need one unregister call to remove the whole 
thing - or rather - the sole effectively-registered receiver, right?


Thanks,
Philippe Laporte

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 2.3 pauses my application

2011-11-15 Thread gjs
Hi,

Is TimerTask running from the Activity or an (Android) Service ?

Sound like you need to use a Service with a Wake Lock to keep cpu
running after you press Power button.

Regards

On Nov 15, 8:34 pm, kazuya  wrote:
> I have an application that takes pictures and upload them to server.
> Also I use TimerTask that sends these pictures to server.
> I follow these steps:
>
> 1. Take pictures
> 2. Click Home button and power
> 3. Wait for TimerTask to upload the picture
>
> This successfully runs on Motorola XT800 android 2.1. But when I
> install this in HTC A510e android 2.3, the application somehow paused.
> It resume after I turned it on using the power button.
> In cat log, I can also verify that in need there is a pause.
>
> What I want is to TimerTask(every 1 minute) to run always on both
> phones.
>
> Also I found this in the cat log:
> GC_CONCURRENT freed 434K, 52% free 3624K/7495K, external 0K/2028K,
> paused 10ms+25ms
>
> Please help

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


Re: [android-developers] Re: Multiple Apps and Content Providers, How to ?

2011-11-15 Thread Mark Murphy
On Tue, Nov 15, 2011 at 7:24 PM, swebb99  wrote:
> the problem with this is
> you need to make sure that the customer always purchases the app with
> the provider first!!!

Correct. Content providers for inter-app data sharing can work well
when there is a clear hierarchy (e.g., app plus plugins, where the
plugins have no meaning outside the app), or where the content
provider is not essential (so if the provider does not exist, an app
still has utility, just lacking some optional feature(s)).

> Do all devices have external storage for instance

Yes. It is occasionally unavailable on Android 1.x and 2.x -- if it is
mounted as a drive on a host PC, it is unavailable to apps. This is
not a problem on Android 3.x and 4.x, due to some changes in the way
devices share files with the host PC.

http://developer.android.com/guide/topics/data/data-storage.html#filesExternal

> also
> can databases be created and managed in external storage?

Yes. I have not tried accessing the same SQLite database from multiple
processes via external storage. In principle it should work, as Rails
uses SQLite across processes that way, though I don't know if the
peculiarities of external storage (e.g., FAT32 on Android 1.x and 2.x)
will pose any problems.

However, as Kristopher suggested, it is unclear whether it is in your
best interests to make this be multiple apps. For example, if your
objective is to get paid multiple times, have one app and use in-app
purchasing to unlock the additional features.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.1
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] Re: Multiple Apps and Content Providers, How to ?

2011-11-15 Thread swebb99
Thanks for the reply Mark. As you say contacts is part of the eco
system and hence I can see the benefit of a provider. But I'm failing
to see how providers created by normals developers like myself are
actually that useful unless you have one app that provides the
provider and then the others make use of it, the problem with this is
you need to make sure that the customer always purchases the app with
the provider first!!!

So from what you say using external storage is a possibility. What are
the pitfalls of this, I must admit I don't know anything about the
relationship between android and external storage and the pro's and
con's of this. Do all devices have external storage for instance also
can databases be created and managed in external storage?

Thanks

Steve

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 read data off a website into an Android app

2011-11-15 Thread mellery451
well, you're not going to be able to (easily) read Excel files on
android (xls, or whatever they are called these days), but csv will
probably work - perhaps that's what you were thinking of anyhow. Have
a look at 
http://groups.google.com/group/android-developers/browse_thread/thread/cec5eb668e3293fe
for discussion about loading csv. Once you've fetched the file using
the http client, opencsv should be able to parse/load it.

-Mike

On Nov 15, 3:50 pm, Jungle Jim  wrote:
>
> One more question: I also want to be able to put some data (perhaps in
> Excel spreadsheet format, but not restricted to that) somewhere on the
> web and have my app read that data. This way I can periodically revise
> the data that shows on the apps that my customers have installed on
> their phones.
>
> Any ideas on the best way to do that?
>
> On Nov 15, 3:44 pm, mellery451  wrote:
>
>
>
>
>
>
>
> > well, I think you'd want to start with an HttpClient (http://
> > developer.android.com/reference/android/net/http/
> > AndroidHttpClient.html) to make the request and download the
> > resource(s). Then you would need to extract the information you need
> > from the content. This is commonly called "scraping" since you are
> > trying to extract data from presentation views. It's hairy, and likely
> > to involve any number of parsers or (gads!) regular expressions to
> > accomplish the task. I'd avoid this route if at all possible.
>
> > If the service you are accessing actually intends for other
> > applications to consume it, perhaps there is already a public API
> > (e.g. twitter, facebook, etc. all have http APIs you can use). At the
> > very least, perhaps the site supports alternative formats for the
> > content - like xml or json. If requesting a different format is an
> > option, you'll have a much easier time extracting the data since you
> > can use a standard parser.
>
> > -Mike

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] obtain information from "My Profile"

2011-11-15 Thread TreKing
On Tue, Nov 15, 2011 at 2:33 AM, jose  wrote:

> Hello, I want to obtain information from Contacts "My Profile", to know
> the cell phone owner's name. thanks
>

What are you talking about?

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] I need SQLite example with external database file

2011-11-15 Thread TreKing
On Mon, Nov 14, 2011 at 8:19 PM, andronagarjuna wrote:

> I need good example for CRUD operations using SQLite in my android quiz
> application using database file ,


Read the documentation.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] shifting the center position of an image in gallery

2011-11-15 Thread TreKing
On Mon, Nov 14, 2011 at 10:31 PM, Dev  wrote:

> the distance of the first image from left and the distance of last image
> from right end are not equal
>

That's not exactly clear.

can any one tell me how to fix that
>

Not based on the non-existent information you posted.


> its urgent Please!!
>

No it's not.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: Multiple Apps and Content Providers, How to ?

2011-11-15 Thread Mark Murphy
On Tue, Nov 15, 2011 at 6:45 PM, swebb99  wrote:
> On that basis anything that needed contacts should be in the same
> app!

Contacts is part of the operating system. Your apps are not, unless
you roll your own firmware and put your apps in it.

Outside of putting content on external storage (which wouldn't need a
content provider), you cannot readily share information between
multiple apps such that any of those apps could be removed without
issue. You could arrange for *all* the apps to each have their own
copy of the data, I suppose, though that would require N times the
storage space for N apps.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.1
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] Re: How to read data off a website into an Android app

2011-11-15 Thread Jungle Jim
Thanks Alexander and Mike.

One more question: I also want to be able to put some data (perhaps in
Excel spreadsheet format, but not restricted to that) somewhere on the
web and have my app read that data. This way I can periodically revise
the data that shows on the apps that my customers have installed on
their phones.

Any ideas on the best way to do that?

On Nov 15, 3:44 pm, mellery451  wrote:
> well, I think you'd want to start with an HttpClient (http://
> developer.android.com/reference/android/net/http/
> AndroidHttpClient.html) to make the request and download the
> resource(s). Then you would need to extract the information you need
> from the content. This is commonly called "scraping" since you are
> trying to extract data from presentation views. It's hairy, and likely
> to involve any number of parsers or (gads!) regular expressions to
> accomplish the task. I'd avoid this route if at all possible.
>
> If the service you are accessing actually intends for other
> applications to consume it, perhaps there is already a public API
> (e.g. twitter, facebook, etc. all have http APIs you can use). At the
> very least, perhaps the site supports alternative formats for the
> content - like xml or json. If requesting a different format is an
> option, you'll have a much easier time extracting the data since you
> can use a standard parser.
>
> -Mike

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 Apps and Content Providers, How to ?

2011-11-15 Thread swebb99
On that basis anything that needed contacts should be in the same
app!

On Nov 15, 2:45 pm, Kristopher Micinski 
wrote:
> The typical answer is that if you have something like this then you
> shouldn't have separate apps in the first place.
>
> kris
>
>
>
>
>
>
>
> On Tue, Nov 15, 2011 at 8:11 AM, swebb99  wrote:
> > Hi,
>
> > Newbie here.
>
> > If I want to create several apps which all allow a user to created,
> > read, update and delete related data so a content provider would seem
> > to be the way to go. However I don't know which app a customer would
> > buy first, second and so on. So how do I make sure that:
>
> > 1) The first app creates and registers the provider.
> > 2) Subsequent apps only make use of the provider and don't recreate.
> > 3) Make sure the provider gets upgraded if a new app is bought, but
> > also is not downgraded if an older app is bought after a new one.
>
> > From reading the docs on content providers I just can see how any of
> > this is possible. The definition of providers doesn't seem flexible
> > enough to allow this kind of thing. If it isn't possible what is the
> > strategy because it looks like content providers are the only
> > mechanism for applications to share data.
>
> > Thanks
>
> > Steve
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > 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: getResourceAsStream and resource matching.

2011-11-15 Thread Dianne Hackborn
Oh wait, you are using the Java resource stuff?  Don't.  You must always
use Android's APIs (in particular android.content.res.Resources) to access
Android resources.

On Mon, Nov 14, 2011 at 5:43 AM, port443  wrote:

> I tried (I'm just playing with a black box here):
>
>Class pc = caller.getClass();
>String imgName;
>InputStream is;
>
>imgName = "drawable/" + buttonImgName;
>is = pc.getResourceAsStream(imgName);
>
>imgName = "/drawable/" + buttonImgName;
>is = pc.getResourceAsStream(imgName);
>
>imgName = "res/drawable/" + buttonImgName;
>is = pc.getResourceAsStream(imgName);
>
>imgName = "/res/drawable/" + buttonImgName;
>is = pc.getResourceAsStream(imgName);
>
>imgName = "drawable/" + buttonImgName + ".png";
>is = pc.getResourceAsStream(imgName);
>
>imgName = "/drawable/" + buttonImgName + ".png";
>is = pc.getResourceAsStream(imgName);
>
>imgName = "res/drawable/" + buttonImgName + ".png";
>is = pc.getResourceAsStream(imgName);
>
>imgName = "/res/drawable/" + buttonImgName + ".png";
>is = pc.getResourceAsStream(imgName);
>
>imgName = "drawable-mdpi/" + buttonImgName;
>is = pc.getResourceAsStream(imgName);
>
>imgName = "/drawable-mdpi/" + buttonImgName;
>is = pc.getResourceAsStream(imgName);
>
>imgName = "res/drawable-mdpi/" + buttonImgName;
>is = pc.getResourceAsStream(imgName);
>
>imgName = "/res/drawable-mdpi/" + buttonImgName;
>is = pc.getResourceAsStream(imgName);
>
>imgName = "/res/drawable-mdpi/" + buttonImgName +
> ".png";
>is = pc.getResourceAsStream(imgName);
>
> Last case is the only one where I receive non-null stream :(
> What am I doing wrong?
>
>
> Andrew.
>
>
> On Nov 11, 3:09 pm, Dianne Hackborn  wrote:
> > This uses the same resource matching as all other resources.  The only
> > difference is that it can't of course scale your stream to adjust for
> > differences in density.
> >
> > On Fri, Nov 11, 2011 at 7:35 AM, port443  wrote:
> > > Hi, I'm trying to use Class.getResourceAsStream for an APK which I
> > > loaded myself via DexClassLoader.
> >
> > > I can load an image if I specify it in full (e.g. "/res/drawable-mdpi/
> > > myimage.png"); this works.
> >
> > > I wonder if there's a way to employ resource matching function of
> > > Android
> > > (see
> > >http://developer.android.com/guide/topics/resources/providing-resourc.
> ..
> > > )
> > > to make image specification like "drawable/myimage" similar to what we
> > > use in XML layouts?
> >
> > > Reimplementing working mechanism doesn't look the right way :(
> >
> > > Thanks.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see
> and
> > answer them.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

[android-developers] Re: Camera access

2011-11-15 Thread kypriakos

Right on Mark, One of the reasons I found out was a lingering process
that was locked it.
I killed that process and the camera service responds fine now.

The second time it did this I found out that after the camera goes
into preview, an image
is snapped (this is the app I am testing that takes pictures
automatically every few
seconds) but right after the first picture is snapped on this phone
the Camera service dies.
This is still puzzling cause like I said earlier this app works fine
on an identical phone.
I will check to see if I am setting the resolution of the preview or
the picture to be something
outside what this camera can handle? Also I saw messages that the
Rolloff feature is not
supported, no idea what that is.
When I set the autofocus in the manifest the phone (again running 2.2)
said that this feature
is not available, which makes no sense since 2.2 does support
autofocus.


On Nov 15, 5:53 pm, Mark Murphy  wrote:
> It seems like the CameraService thinks that the camera is in use. Only
> one application can use the camera at a time. And if an application
> leaks the camera (by not closing it), it might be tied up until the
> process gets terminated or you reboot the phone.
>
>
>
>
>
>
>
>
>
> On Tue, Nov 15, 2011 at 5:17 PM, kypriakos  wrote:
>
> > Hi all,
>
> > I have been running an activity that access the phone's camera (on
> > Froyo), puts it
> > in preview mode and then snaps and stores a picture. This has been
> > working fine
> > on one phone but on a second phone with the same OS and specs I get
> > the following:
>
> > I/#LGIME  ( 1481):  onStartInput: restarting=false, fieldId=-1
> > I/System.out( 6895): surface created - calling picture ...
> > E/CameraService( 1291): CameraService::connect X (pid 6895, new client
> > 0x1bfc8) rejected. (old pid 5261, old client 0x22798)
> > E/CameraService( 1291): forcefully terminating old client.. ref count
>
> > Has anyone seen this before? What would cause the camera service to
> > reject connections to
> > it since the Manifest for the app is the same as on the other phone
> > and it does allow Camera
> > access. Any ideas would be appreciated.
>
> > 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
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|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


Re: [android-developers] Re: Android Development Environment?

2011-11-15 Thread Marcelo Henrique
Eclipse + ADT .,. or MotoDEV(ECLIPSE) !

2011/11/15 joebowbeer 

> The NetBeans plugin (nbandroid.org) has the most stable support for
> the new Android SDK Tools (r14+). The support is a fairly thin wrapper
> on the Ant build script and properties files, but it seems to work,
> which is more than I can say for the current state of Eclipse with ADT
> 15.
>
> IntelliJ IDEA is not yet supporting the newest Android SDK Tools.
>
> On Nov 11, 1:56 pm, Jones  wrote:
> > What development environments are most Android developers using
> > (Eclipse, IntelliJ, etc)?
> >
> > What development platform is most prevalent (Windows, OSX, Linux)?
> >
> > Thanks!
> > Jones/
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> 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
>



-- 
  - Marcelo Henrique -
  "Se não puder se destacar pelo talento, vença pelo esforço." (Dave
Weinbaum)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Camera access

2011-11-15 Thread Mark Murphy
It seems like the CameraService thinks that the camera is in use. Only
one application can use the camera at a time. And if an application
leaks the camera (by not closing it), it might be tied up until the
process gets terminated or you reboot the phone.

On Tue, Nov 15, 2011 at 5:17 PM, kypriakos  wrote:
>
> Hi all,
>
> I have been running an activity that access the phone's camera (on
> Froyo), puts it
> in preview mode and then snaps and stores a picture. This has been
> working fine
> on one phone but on a second phone with the same OS and specs I get
> the following:
>
> I/#LGIME  ( 1481):  onStartInput: restarting=false, fieldId=-1
> I/System.out( 6895): surface created - calling picture ...
> E/CameraService( 1291): CameraService::connect X (pid 6895, new client
> 0x1bfc8) rejected. (old pid 5261, old client 0x22798)
> E/CameraService( 1291): forcefully terminating old client.. ref count
>
> Has anyone seen this before? What would cause the camera service to
> reject connections to
> it since the Manifest for the app is the same as on the other phone
> and it does allow Camera
> access. Any ideas would be appreciated.
>
> 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
>



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | 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: Android Development Environment?

2011-11-15 Thread joebowbeer
The NetBeans plugin (nbandroid.org) has the most stable support for
the new Android SDK Tools (r14+). The support is a fairly thin wrapper
on the Ant build script and properties files, but it seems to work,
which is more than I can say for the current state of Eclipse with ADT
15.

IntelliJ IDEA is not yet supporting the newest Android SDK Tools.

On Nov 11, 1:56 pm, Jones  wrote:
> What development environments are most Android developers using
> (Eclipse, IntelliJ, etc)?
>
> What development platform is most prevalent (Windows, OSX, Linux)?
>
> Thanks!
> Jones/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Cross-posting BUG

2011-11-15 Thread BelvCompSvs
I had dozens of those -- I ( originally ) thought it was a site that
showed up offering to let me get an app up using their GUI
thingamabobwhichii but now I am ( very seriously ) thinking things too
bad to post in open discussion fora

my "spam folder" - what ever that is supposed to be from a GUI - now
looks like ${next419}

somebody has busted something some where ...

a lot of that stuff in those groups does not really bother me but like
i have to keep my clients isolated from that as they have no idea how
to avoid them - and they should not be penetrating this group that
easily 

[moderators:]what gives?...

On Nov 15, 7:00 am, Tomasz Gawel  wrote:
> There is strange bug, whenever I send a post to Android Developers
> Group it happens to be crossposted to "exotic" groups like "fametest"
> "No 1" or "flutuberwachung" which I have nothing to do with.
> When I send post to other groups ont google the proble does not occur.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Intensity of vibration in Xperia arc

2011-11-15 Thread durer jatri
Thanks a lot!
-ab

On Nov 12, 1:09 am, "Danny.Zubiate"  wrote:
> Weird, works if I type it in the browser but not if I click the link.
> Try this 
> one:http://www2.immersion.com/developers/index.php?option=com_content&vie...
>
> Also, Dianne is correct that the particular hardware used to create
> vibration varies between devices and so the same vibration call may
> feel quite different on different devices.
>
> Danny Zubiate
> Developer Support Engineer
> Sony Ericsson Mobile Communications
>
> On Nov 10, 5:06 pm, Zsolt Vasvari  wrote:
>
>
>
>
>
>
>
> > > You can find it at:www.immersion.com/MOTIVandroid
>
> > Error 404

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] VideoView Volume

2011-11-15 Thread Anm

Is there a way to control the volume of a VideoView's sound playback.
More specifically, I want to control the volume of one of two video
views, independently.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Camera access

2011-11-15 Thread kypriakos

Hi all,

I have been running an activity that access the phone's camera (on
Froyo), puts it
in preview mode and then snaps and stores a picture. This has been
working fine
on one phone but on a second phone with the same OS and specs I get
the following:

I/#LGIME  ( 1481):  onStartInput: restarting=false, fieldId=-1
I/System.out( 6895): surface created - calling picture ...
E/CameraService( 1291): CameraService::connect X (pid 6895, new client
0x1bfc8) rejected. (old pid 5261, old client 0x22798)
E/CameraService( 1291): forcefully terminating old client.. ref count

Has anyone seen this before? What would cause the camera service to
reject connections to
it since the Manifest for the app is the same as on the other phone
and it does allow Camera
access. Any ideas would be appreciated.

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: How to read data off a website into an Android app

2011-11-15 Thread mellery451

well, I think you'd want to start with an HttpClient (http://
developer.android.com/reference/android/net/http/
AndroidHttpClient.html) to make the request and download the
resource(s). Then you would need to extract the information you need
from the content. This is commonly called "scraping" since you are
trying to extract data from presentation views. It's hairy, and likely
to involve any number of parsers or (gads!) regular expressions to
accomplish the task. I'd avoid this route if at all possible.

If the service you are accessing actually intends for other
applications to consume it, perhaps there is already a public API
(e.g. twitter, facebook, etc. all have http APIs you can use). At the
very least, perhaps the site supports alternative formats for the
content - like xml or json. If requesting a different format is an
option, you'll have a much easier time extracting the data since you
can use a standard parser.

-Mike

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 transform a openGL object into a bitmap?

2011-11-15 Thread Streets Of Boston
Just try it out!
Use (x,y) and (w,h) to render only a portion of your screen into a bitmap.



-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Announcement: Android MIT Kerberos Port with CyaSSL Embedded SSL

2011-11-15 Thread Chris C.
 

Hi,

yaSSL would like to announce the availability of the MIT Kerberos libraries 
on Android and get feedback from the android-developers group.  Previously, 
the Android platform has been void of Kerberos support - forcing Android 
developers who are either creating new applications or porting existing 
projects to either modify existing code or exclude Kerberos functionality 
from their apps and libraries.

yaSSL has taken the first steps in bringing Kerberos to the Android 
platform.  The native MIT Kerberos libraries have been cross-compiled for 
Android and are now able to be used natively with the Android NDK.  yaSSL 
has added the CyaSSL embedded SSL library's cryptography library 
(CTaoCrypt) as a crypto implementation for Kerberos, allowing embedded 
projects to use CyaSSL's lightweight and fully functional crypto backend on 
Android.

In addition to the cross-compiled MIT Kerberos libraries, yaSSL has created 
a sample Android NDK application wrapping the functionality of kinit, 
klist, kvno, and kdestroy with a simple GUI front-end.  We hope this 
application provides a starting place for application developers interested 
in using Kerberos on Android.

The MIT Kerberos libraries and sample application are distributed under the 
MIT license (using CyaSSL's FLOSS exception) and the code will be in the 
MIT Kerberos code repository in the near future.  Until it has been merged 
into the MIT repositories, you can find the sample application on GitHub at 
the following URL.  The sample application includes cross-compiled Kerberos 
and CyaSSL libraries.  Instructions on cross compiling MIT Kerberos 
yourself will be released in the near future.

https://github.com/cconlon/kerberos-android-ndk

Our next step is to work on adding Java bindings for the native Kerberos 
GSS-API library on Android.  As we have looked into several methods of 
accomplishing this, we would like to hear what the community would like to 
see in the Java bindings.  Also, we would like to explore if there are any 
existing solutions which could be of use.  The options we have looked at 
thus far include:


   - Porting over an existing org.ietf.jgss Java package to Android and 
   tying that into the native GSS-API library through JNI.
   - Using SWIG to generate Java wrappers to the native GSS-API.

Are you interested in using Kerberos on Android?  What do you think the 
best path would be for adding Java bindings?  Do you have any suggestions 
about the direction of the project so far?  If so, please let us know your 
thoughts at info (at) yassl.com.

Thanks!

Team yaSSL

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] AsyncTask must be invoked on the UI thread

2011-11-15 Thread BelvCompSvs
given what I have read so far it is much simpler for me to base-class
on AsyncTask and do the threading from my sources but docs state
constructor "Runs on the UI thread before doInBackground(Params...)."

I can figure out the Handler(s) to process messages delivered from the
UI thread ~ since I do not have access to a reference compliant
sources there is no way for me to know using only the docs at /
reference/android/os/AsyncTask if I need to call super.onPreExecute()
from an override to arrive at stable application state across most
vendor platforms

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Help with GPS Provider Switch

2011-11-15 Thread Tommy Hartz
Hey,

 

Right now when trying to get a user location I start with the GPS Provider.
I have a timer set for 30 seconds, If a location is not found in 30 seconds
the timer goes off and stops that location request. When that happens I move
to the Passive Provider. After 30 seconds if a location is not found I stop
the location request and move to the Network Provider.

 

My issue is that when the network provider gets called it never does
anything. If I start with the network provider it goes off just fine and
returns a location back to me. Below is the code I am trying to use:

 

gpsTimer.schedule(new TimerTask(){

  @Override

  public void run() {



startPassive();





  }

}, 3);



currentTimer = "GPS";

 
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,
locationListener);

 

private void startPassive(){



locationManager.removeUpdates(locationListener);



//Now we want to try for a Passive Fix

currentTimer = "Passive";

passiveTimer.schedule(new TimerTask(){

 

  @Override

  public void run() {

startNetwork();

  }

  

}, 3);

Looper.prepare();

Looper.myLooper().quit();

 
locationManager.requestLocationUpdates(LocationManager.PASSIVE_PROVIDER, 0,
0, locationListener);

 

private void startNetwork(){

locationManager.removeUpdates(locationListener);

currentTimer = "Network";

Looper.prepare();

Looper.myLooper().quit();

 
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0,
0, locationListener);

 

any help or suggestions would be greatly appreciated. Thank so much 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: NDK GetMethodID problem

2011-11-15 Thread a1
Signature should be "(II)Landroid/graphics/Bitmap;" colon is used as class 
name string terminator not as type list separator (types in signatures are 
single uppercase letters, except of classes which are represented by 
L; where colon is terminator)

--
a1

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: getResourceAsStream and resource matching.

2011-11-15 Thread port443
Looks like I need android.content.res.AssetManager and
android.content.res.Resources instances to make this work in full.
>From what I see in sources, this is not available :(

On Nov 14, 8:43 am, port443  wrote:
> I tried (I'm just playing with a black box here):
>
>                         Class pc = caller.getClass();
>                         String imgName;
>                         InputStream is;
>
>                         imgName = "drawable/" + buttonImgName;
>                         is = pc.getResourceAsStream(imgName);
>
>                         imgName = "/drawable/" + buttonImgName;
>                         is = pc.getResourceAsStream(imgName);
>
>                         imgName = "res/drawable/" + buttonImgName;
>                         is = pc.getResourceAsStream(imgName);
>
>                         imgName = "/res/drawable/" + buttonImgName;
>                         is = pc.getResourceAsStream(imgName);
>
>                         imgName = "drawable/" + buttonImgName + ".png";
>                         is = pc.getResourceAsStream(imgName);
>
>                         imgName = "/drawable/" + buttonImgName + ".png";
>                         is = pc.getResourceAsStream(imgName);
>
>                         imgName = "res/drawable/" + buttonImgName + ".png";
>                         is = pc.getResourceAsStream(imgName);
>
>                         imgName = "/res/drawable/" + buttonImgName + ".png";
>                         is = pc.getResourceAsStream(imgName);
>
>                         imgName = "drawable-mdpi/" + buttonImgName;
>                         is = pc.getResourceAsStream(imgName);
>
>                         imgName = "/drawable-mdpi/" + buttonImgName;
>                         is = pc.getResourceAsStream(imgName);
>
>                         imgName = "res/drawable-mdpi/" + buttonImgName;
>                         is = pc.getResourceAsStream(imgName);
>
>                         imgName = "/res/drawable-mdpi/" + buttonImgName;
>                         is = pc.getResourceAsStream(imgName);
>
>                         imgName = "/res/drawable-mdpi/" + buttonImgName + 
> ".png";
>                         is = pc.getResourceAsStream(imgName);
>
> Last case is the only one where I receive non-null stream :(
> What am I doing wrong?
>
> Andrew.
>
> On Nov 11, 3:09 pm, Dianne Hackborn  wrote:
>
>
>
>
>
>
>
> > This uses the same resource matching as all other resources.  The only
> > difference is that it can't of course scale your stream to adjust for
> > differences in density.
>
> > On Fri, Nov 11, 2011 at 7:35 AM, port443  wrote:
> > > Hi, I'm trying to use Class.getResourceAsStream for an APK which I
> > > loaded myself via DexClassLoader.
>
> > > I can load an image if I specify it in full (e.g. "/res/drawable-mdpi/
> > > myimage.png"); this works.
>
> > > I wonder if there's a way to employ resource matching function of
> > > Android
> > > (see
> > >http://developer.android.com/guide/topics/resources/providing-resourc...
> > > )
> > > to make image specification like "drawable/myimage" similar to what we
> > > use in XML layouts?
>
> > > Reimplementing working mechanism doesn't look the right way :(
>
> > > Thanks.
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
>
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see and
> > answer them.

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


[android-developers] TabWidget NullPointerException in pre-Froyo

2011-11-15 Thread Pinheiro
Hi!
I've done a simple TabActivity that loads several Intents into the
tabs. It works fine in Froyo or later but gives this error on older
versions:

E/AndroidRuntime( 1958): java.lang.NullPointerException
E/AndroidRuntime( 1958):at
android.widget.TabWidget.dispatchDraw(TabWidget.java:173)

This happens even with an empty OnCreate method:

public class MyTabHost extends TabActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.mycustomtab);
   }

mycustomtab.xml:
---

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






---

I did a quick search and found other developers with the same problem
but it seems no-one has found a solution to this problem (possible bug
in Android?).
Can anyone help? 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: How to read data off a website into an Android app

2011-11-15 Thread Alexander Turda
Well I think an xml parser would work for 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] Re: onConfigurationChanged call back is not getting called?

2011-11-15 Thread Shri
If you are running on Honeycomb, you need to also include "screenSize" 
(which was introduced in Honeycomb) along with "orientation". See 
http://developer.android.com/guide/topics/manifest/activity-element.html#config
.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: onConfigurationChanged not getting called.

2011-11-15 Thread Shri
The solution is that you need to also include "screenSize" (which was 
introduced in Honeycomb) along with "orientation". See 
http://developer.android.com/guide/topics/manifest/activity-element.html#config
.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 control of apps

2011-11-15 Thread kypriakos

Hi all,

I remember that you can launch apps remotely on a phone using:

adb shell am start -n ...

I never looked for one that would terminate the app remotely. Is there
one? May be I can write scripts that can grep the ps on the device
and send a remote kill but (i) that is not possible on devices that
are not rooted and (ii) may be not a good idea. So most likely I will
have to write a receptor on an app that when a term app commands
comes in over a socket it can then schedule itself with Android
for termination.

Has anyone tried this before?

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] PopupWindow with custom view for Spinner breaks touch events?

2011-11-15 Thread Jona
I'm not understanding what exactly is the issue with my custom
PopupWindow. I have a ListView as my content view and each item in the
list contains a button or Spinner.

When I place a spinner with a custom layout for its list items none of
the buttons or Spinners work, nothing happens when pressed, on my
content view list... But if I leave the default android layout for the
spinner there is no problem...

What exactly could I be missing?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] get and set data from autocomplete

2011-11-15 Thread Nicolás Mariano Obregón
I dont's know if that's possible but I would advise you to create a
Map and when the user clicks on an
item from the dropdown list you look for it in your map. In order to do
this you should implement OnItemClickedListener for your
AutoCompleteTextView.

Hope this works for you...

Saludos.-
__
Nicolás Mariano Obregón
nmobre...@gmail.com
   
 




2011/11/15 hendra uswandy 

> Hi,
> i have a problem with AutocompletetextView
>
> i want to get id value from autocomplete that get data from sqlite
> first i get data from sqlite and then i put the data to autocomplete
>
> get data from db :
> [code]
>
>
>cursor = this.dbh.getallData("driver",
>"driveridnya as _id,drivername as
> _username",
>"driverstatus='0' and area='" + area + "'
> order by drivername");
>int totalDriverCursor = cursor.getCount();
>
> [/code]
>
> put the data from db into  autocomplete
> [code]
>
>output = (TextView) findViewById(R.id.test);
>output1 = (TextView) findViewById(R.id.test1);
>
>// AutoComplete clockIn
>acdata1 = (AutoCompleteTextView)
> findViewById(R.id.completeClockIn);
>if (totalDriverCursor != 0) {
>
>cursor.moveToFirst();
>String[] acContent = new String[totalDriverCursor];
>int nilai = 0;
>do {
>String id = cursor.getString(0);
>String drivername = cursor.getString(1);
>acContent[nilai] = drivername;
>nilai++;
>
>} while (cursor.moveToNext());
>dataAdapter = new ArrayAdapter(this,
>
>  android.R.layout.simple_dropdown_item_1line, acContent);
>
>acdata1.setAdapter(dataAdapter);
>
>}
>
> [/code]
>
> how to set id database and drivername database into autocomplete value
> and get id from autocomplete when user click selected item ?
>
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] calviling webservice

2011-11-15 Thread Nicolás Mariano Obregón
Hi jaggu, first of all, to consume a WebService you need the *Ksoap2 *library.
After you get it just check for a simple tutorial on how to use it and
that's it. It's quite easy.

A personal recommendation, use serialization tools like *xstream *to send
and receive java objects serialized as xml instead of using KVMSerializable
interface because it sucks!

I hope this works for you.


Saludos.-
__
Nicolás Mariano Obregón
nmobre...@gmail.com
  
 




2011/11/15 jaggu 

> Hi
> how to call webservece in android inside the activity when on click
> listener
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> 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] NDK GetMethodID problem

2011-11-15 Thread Peter Staab
Hello,

I am getting the following error:
>11-15 19:31:57.898: D/dalvikvm(5046): GetMethodID: method not found: 
>;.createBitmapRGBA:(I;I)Landroid/graphics/Bitmap;

with this code:
java:
public Bitmap createBitmapRGBA(int w, int h) {
return Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_);
}

cpp:
msgId = env->GetMethodID(clazz, "createBitmapRGBA", "(I;I)Landroid/
graphics/Bitmap;");

When I replace the arguements of "createBitmapRGBA", for instance to:
java:
public Bitmap createBitmapRGBA(String dummy) {
return null;
}

cpp:
msgId = env->GetMethodID(clazz, "createBitmapRGBA", "(Ljava/lang/
String;)Landroid/graphics/Bitmap;");

then everything works fine. So, I suspect that there is something
wrong with "int w, int h" resp. "(I;I"), but what's wrong with this?

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: SDK 4, R15, where is the navigation button?

2011-11-15 Thread sblantipodi
bump.

On Nov 9, 12:12 am, sblantipodi  wrote:
> I mean the three button we see in ICS, the back, the home and the
> recent.
>
> On Nov 8, 10:08 pm, Chris Stewart  wrote:
>
>
>
>
>
>
>
> > I suspect you mean the menu button.  I believe, and could be very wrong,
> > but if you're using Android 4.0 and on a display of 720p or better (e.g.,
> > Galaxy Nexus), you won't see that button.
>
> > --
> > Chris Stewarthttp://chriswstewart.com
>
> > On Tue, Nov 8, 2011 at 1:56 PM, Kumar Bibek  wrote:
> > > What do you mean by the navigation button?
>
> > > On Nov 8, 11:54 pm, sblantipodi  wrote:
> > > > bump
>
> > > > On Nov 1, 3:17 pm, sblantipodi  wrote:
>
> > > > > Bumping the question until I'll get an answer.
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > 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: How to read data off a website into an Android app

2011-11-15 Thread Jungle Jim
Thanks, Brion. Specifically what I need to do is read some of the data
that is displayed on a webp0age and load it into variables in my
program. Do you know of any samples programs that will lead me in the
right direction?

On Nov 12, 10:09 am, Brion Emde  wrote:
> Take a look at the WebView sample 
> here:http://developer.android.com/resources/tutorials/views/index.html
>
> On Nov 11, 6:06 am, Jungle Jim  wrote:
>
>
>
> > I need to write an android app that will read data off a webpage and
> > then display it in an activity in my app. Unfortunately, I am fairly
> > new to both android and java.
>
> > Does anyone know of a sample program that can get me started?
>
> > 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


Re: [android-developers] how can i relocation this home button?

2011-11-15 Thread Mark Murphy
This is part of the firmware. This list does not relate to the
firmware. Try http://source.android.com for your firmware development
questions.

On Tue, Nov 15, 2011 at 7:18 AM, Greg Jeong  wrote:
>
> Let's see my device capture image...
> My device's default orientation is landscape mode and I wanna relocation
> home button in AllApps Screen.
> how can i relocation that button?
> first of all I have been modify all_apps_2d.xml file.
> help me~!!!
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



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

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

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


[android-developers] calviling webservice

2011-11-15 Thread jaggu
Hi
how to call webservece in android inside the activity when on click listener

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Honeycomb: disabled menu items look

2011-11-15 Thread port443
OK, I ended up generating "disabled" looking images for Honeycomb
myself on the fly.  Not a best solution, but it works.

On Nov 15, 10:13 am, port443  wrote:
> I'm loading images myself from an APK loaded via ClassLoader, so I
> seem not having access to Resources class.
>
> So, I tried building StateListDrawable on the fly: this seems to work
> (two files instead of three!).
>
> Yes, icons required for different menu styles should be different, but
> our graphics designer made 32x32px images which look good on both old-
> style and new-style menus (Moto XOOM; mdpi).
>
> On Nov 14, 12:06 pm, Kostya Vasilyev  wrote:
>
>
>
>
>
>
>
> > I just tried it out on 3.2 with same results: the action bar item text
> > gets automatically grayed out, the icon does not.
>
> > You could put the new state-list drawables in res/drawable-v11, but yes,
> > I agree it's a pain... But you know, those icons now have very different
> > sizes from before anyway...
>
> > -- Kostya
>
> > 14.11.2011 20:51, port443 :
>
> > > Yeah, this may be a way out.  But I don't like it: classic menus work
> > > proving that the "graying" code is already there; making three files
> > > for every toolbar image is pain :( it also makes old/new styles
> > > incompatible.
>
> > > On Nov 14, 11:37 am, Kostya Vasilyev  wrote:
> > >> Perhaps you need a good and proper state list drawable with
> > >> state_enabeld=false?
>
> > >> ( wherease the old-style menus automatically produce disable images as
> > >> needed )
>
> > >> -- Kostya
>
> > >> 2011/11/14 port443
>
> > >>> Yes, this is what I have to do for ActionBar to get refreshed.
> > >>> I have menu empty initially and then load my items with a call to
> > >>> Activity.invalidateOptionsMenu(); so I definitely know this works.
> > >>> I have one of menu items disabled (tapping on it does not produce any
> > >>> effect), but it looks as enabled so there's no user feedback (i.e.
> > >>> user has to tap on it to find out it is disabled); same code works on
> > >>> same device with classic menus and makes menu items look disabled (if
> > >>> I just change target platform 11 ->  10).
> > >>> On Nov 14, 10:46 am, Kostya Vasilyev  wrote:
> >  Have you tried invalidateOptionsMenu? (iirc)
> >  --
> >  Kostya Vasilyev
> >  14.11.2011 18:58 "port443"   :
> > > I'm having trouble making an ActionBar's menu item look disabled.
> > > This works well for pre-Honeycomb (popup) menus correctly, but doesn't
> > > work on new menus.
> > > I'm making items appearing on ActionBar itself (which looks like a
> > > toolbar); disabled items cannot be pressed, yes, but they are not
> > > grayed out as on older popup menus.
> > > @Override
> > > public boolean onPrepareOptionsMenu(Menu menu)
> > > {
> > >         menu.clear();
> > >         for (ToolbarButton b : _current.getButtons())
> > >         {
> > >                 MenuItem mi = menu.add(b.title);
> > >                 mi.setEnabled(b.enabled);  //<-- this doesn't change
> > >>> image
> > > color
> > >                 mi.setIcon(b.image.mutate());
> > >                 mi.setOnMenuItemClickListener(b);
> > >                 if (android.os.Build.VERSION.SDK_INT>  10)
> > >>>   mi.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
> > >         }
> > > }
> > > Any way to make it working?  Or Honeycomb UI supposes that such items
> > > should merely disappear?
> > > 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
> > >>> --
> > >>> You received this message because you are subscribed to the Google
> > >>> Groups "Android Developers" group.
> > >>> 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
>
> > --
> > Kostya Vasilyev

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: determine finish of the process addView (View child)

2011-11-15 Thread Anil from the Alps
> So now my question:
> Is there a Method to determine if a spinner is fully added to the
> screen (or to a view)?
> Or in other words:
> Is there a Method to determine if the layout-process of a View is
> fully finished?

I found a workaround.
1. Be sure that when you create the spinners dynamically (not by xml,
but by code), that you assign an ID to the spinner.
2. Set a Global Variable in your class:
private HashSet spinnersEnabledForOnItemSelected = new
HashSet();

3. Whenn you create your Spinners overwrite the Method onClick
Spinner spinner = new Spinner(parentActivity){
  @Override
  public void onClick(DialogInterface dialog, int which) {
  // This Method is only called, when the Spinner is "open",
  // I mean when you see all the Items of the spinner, after clicking
  // on an Item
spinnersEnabledForOnItemSelected.add(this.getId());
super.onClick(dialog, which);
  }
};


4. inside the OnItemSelectedListener inside the Method onItemSelected
you check if minimum one click happened
onItemSelected(AdapterView arg0, View aSelectedTextView, int
position, long idOfTheSelectedTextView) {
  Spinner spinner = (Spinner)arg0;
  int id = spinner.getId();
  if (! spinnersEnabledForOnItemSelected.contains(id)){
return;
  }
  // additional code here...
}

5. before you add a spinner to your parentview or linearlayout

spinnersEnabledForOnItemSelected.remove(aSpinner.getId());
yourParentLinearLayout.addView(aSpinner);

--> now it is guaranteed that the procedures inside the Method
onItemSelected are getting only processed after the first click or
touch by the user

I am happy when I get some other or better solutions to clean up my
brain :-)
Regards from Austria
Anil

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 C2DM question

2011-11-15 Thread Neilz
Hi all, I'm currently weighing up the options for push notifications
in my app.

1) Polling. I could use a boot receiver / alarm manager combination to
fire off a process which checks our server periodically, say every 15
minutes, and then immediately terminates. First question is, is this
resource hungry? I can't believe it would make any noticeable
difference...

2) Urban Airship. I'm put off using this as their site says it doesn't
work if the app is mounted on the external storage. As our app is
likely to contain significant (many megabytes of) assets, this
probably isn't the best option.

3) C2DM. Can anyone confirm if this works when the app is stored on
the SD Card? I'm just curious, as even though Urban Airship uses the
C2DM protocol to send the notifications, it isn't able to in this
instance.

Thanks for any advice.

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


[android-developers] Re: More traditional Android menu

2011-11-15 Thread alexb
First, zip files are harmless, unless you automatically invoke some
executables from it, which I think developers do not do.
The link points to the complete Eclipse project with two classes,
MenuDialog - the menu itself and MenuDialogDmo - the main activity
one.
MenuDialog allows you to access menu as a list, each item can have an
icon and there can be a picture for the whole menu, like a logo.
You may want to take a look here: 
http://solutionsinhand.com/android/MenuDialogSnapshot.png

On Nov 14, 12:05 pm, TreKing  wrote:
> On Fri, Nov 11, 2011 at 9:11 PM, alexb  wrote:
> > Somehow I feel that Android menus do not look good and are not convenient
> > for both users and developers.
> > Here I placed my humble attempt to improve this feature:
> >http://solutionsinhand.com/android/MenuDialogDemo.zip
> > MenuDialog class is flexible to be used for both main and context menus.
>
> You might want explain what's in there, how it's better, and maybe post
> some screenshots. Few people are going to download a zip file on the
> internet that carries no explanation.
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] image size

2011-11-15 Thread richa jha
hi
recently i started working on android..My boss wants to know the size of
kernel and the whole honeycomb image size..I m trying to search on
internet,but not getting it.
please tell me,if anybody has any idea

Richa Jha

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

[android-developers] get and set data from autocomplete

2011-11-15 Thread hendra uswandy
Hi,
i have a problem with AutocompletetextView

i want to get id value from autocomplete that get data from sqlite
first i get data from sqlite and then i put the data to autocomplete

get data from db :
[code]


cursor = this.dbh.getallData("driver",
"driveridnya as _id,drivername as _username",
"driverstatus='0' and area='" + area + "' order 
by drivername");
int totalDriverCursor = cursor.getCount();

[/code]

put the data from db into  autocomplete
[code]

output = (TextView) findViewById(R.id.test);
output1 = (TextView) findViewById(R.id.test1);

// AutoComplete clockIn
acdata1 = (AutoCompleteTextView) 
findViewById(R.id.completeClockIn);
if (totalDriverCursor != 0) {

cursor.moveToFirst();
String[] acContent = new String[totalDriverCursor];
int nilai = 0;
do {
String id = cursor.getString(0);
String drivername = cursor.getString(1);
acContent[nilai] = drivername;
nilai++;

} while (cursor.moveToNext());
dataAdapter = new ArrayAdapter(this,

android.R.layout.simple_dropdown_item_1line, acContent);

acdata1.setAdapter(dataAdapter);

}

[/code]

how to set id database and drivername database into autocomplete value
and get id from autocomplete when user click selected item ?


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] Difference between signed and unsigned response in in-app purchase

2011-11-15 Thread santhosh kumar
Hi,

I am getting unencrypted JSON string and signature as response from
Market after purchased product. But I am unable to understand
difference between signed and unsigned response. But in the in-app
documentation they mentioned for developer account without drafting
application in market, we will get signed data as response.

Table 1. Conditions under which static responses are signed.
"http://developer.android.com/guide/market/billing/
billing_testing.html"

But in my case I am always getting unencrypted JSON string and
signature.

Could any body help me for understanding signed and unsigned response.

Thanks,
Santhosh

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] determine finish of the process addView (View child)

2011-11-15 Thread Anil from the Alps
I have a LinearLayout, lets call it LL; in my code I dynamically
create spinners and and/remove them from LL; every Spinner has a
AdapterView.OnItemSelectedListener with the Method onItemSelected;
when you add a Spinner dynamically then the Method "onItemSelected" is
called automatically; this behavior is not programmed by me, it's
automatically invoked 1 time; when the view is restored from a State
before, it seems to get invoked 2 times before the user has done
anything;

inside the Method "onItemSelected" I have to take care if the
selection comes from the User or if it comes from initialization (or
adding) the spinner on the screen; now I played a little bit with the
method

LinearLayout.addView(mySpinner)

# My Idea was the following:

boolean ignoreNextSelections = true;
LinearLayout.addView(mySpinner)
ignoreNextSelections = false;

The boolean Variable ignoreNextSelections I could check inside the
Method onItemSelected. But this idea doesn't work because the Method
LinearLayout.addView(View child) seems to be nonblocking, it seems to
be a Thread or something similar in the background.

So now my question:
Is there a Method to determine if a spinner is fully added to the
screen (or to a view)?
Or in other words:
Is there a Method to determine if the layout-process of a View is
fully finished?
Thanks for Help
Anil



-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 is the activity being destroyed/recreated (NOT a configuration change)?

2011-11-15 Thread dwass
Sometimes we are seeing the following behaviour:

- Activity A is launched
- Activity A starts Activity B
- Activity B is used for a while, it can be a few minutes or a few
hours
- Activity B finishes
- Activity A is then destroyed and recreated

Why is Activity A being destroyed and recreated, instead of just being
restarted (call to onRestart(), onStart(), onResume())? I could
understand it if ActivityA had been destroyed some time ago, but what
we see from the logs is that AFTER ActivityB.onPause() gets called,
ActivityA.onDestroy() is called and then a new instance of ActivityA
is created.

This isn't due to an device orientation change, as the manifest for
both activities contains android:screenOrientation="nosensor" and we
can't reproduce the behaviour by changing the device orientation.

The problem isn't reproducible, but we get logs from users where we
can see this behaviour, so we know it is happening.

Anyone have an idea why this is happening? This doesn't happen all the
time, just occasionally. The usual behaviour is the expected behaviour
(ActivityA just gets resumed).

Thanks,
-DWass

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 make voice record during the conversation?

2011-11-15 Thread Oli Wright
You see that box up there?  The one that reads "Search for groups or 
messages"?  Try putting these words into it:

android record voice

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 transform a openGL object into a bitmap?

2011-11-15 Thread saex
Please, can you tell me wich parameters i have to pass to your
function?

int x, int y, int w, int h  wich parameters i have tu put there?¿

Thanks

On Nov 15, 3:05 pm, Streets Of Boston  wrote:
> Maybe you could use 
> this:https://groups.google.com/d/msg/android-developers/OGuoxpX20Ag/pr2FSe...

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: error after Install Repo Source Android

2011-11-15 Thread Oli Wright
http://source.android.com/ -> Community

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Honeycomb: disabled menu items look

2011-11-15 Thread port443
I'm loading images myself from an APK loaded via ClassLoader, so I
seem not having access to Resources class.

So, I tried building StateListDrawable on the fly: this seems to work
(two files instead of three!).

Yes, icons required for different menu styles should be different, but
our graphics designer made 32x32px images which look good on both old-
style and new-style menus (Moto XOOM; mdpi).



On Nov 14, 12:06 pm, Kostya Vasilyev  wrote:
> I just tried it out on 3.2 with same results: the action bar item text
> gets automatically grayed out, the icon does not.
>
> You could put the new state-list drawables in res/drawable-v11, but yes,
> I agree it's a pain... But you know, those icons now have very different
> sizes from before anyway...
>
> -- Kostya
>
> 14.11.2011 20:51, port443 :
>
>
>
>
>
>
>
>
>
> > Yeah, this may be a way out.  But I don't like it: classic menus work
> > proving that the "graying" code is already there; making three files
> > for every toolbar image is pain :( it also makes old/new styles
> > incompatible.
>
> > On Nov 14, 11:37 am, Kostya Vasilyev  wrote:
> >> Perhaps you need a good and proper state list drawable with
> >> state_enabeld=false?
>
> >> ( wherease the old-style menus automatically produce disable images as
> >> needed )
>
> >> -- Kostya
>
> >> 2011/11/14 port443
>
> >>> Yes, this is what I have to do for ActionBar to get refreshed.
> >>> I have menu empty initially and then load my items with a call to
> >>> Activity.invalidateOptionsMenu(); so I definitely know this works.
> >>> I have one of menu items disabled (tapping on it does not produce any
> >>> effect), but it looks as enabled so there's no user feedback (i.e.
> >>> user has to tap on it to find out it is disabled); same code works on
> >>> same device with classic menus and makes menu items look disabled (if
> >>> I just change target platform 11 ->  10).
> >>> On Nov 14, 10:46 am, Kostya Vasilyev  wrote:
>  Have you tried invalidateOptionsMenu? (iirc)
>  --
>  Kostya Vasilyev
>  14.11.2011 18:58 "port443"   :
> > I'm having trouble making an ActionBar's menu item look disabled.
> > This works well for pre-Honeycomb (popup) menus correctly, but doesn't
> > work on new menus.
> > I'm making items appearing on ActionBar itself (which looks like a
> > toolbar); disabled items cannot be pressed, yes, but they are not
> > grayed out as on older popup menus.
> > @Override
> > public boolean onPrepareOptionsMenu(Menu menu)
> > {
> >         menu.clear();
> >         for (ToolbarButton b : _current.getButtons())
> >         {
> >                 MenuItem mi = menu.add(b.title);
> >                 mi.setEnabled(b.enabled);  //<-- this doesn't change
> >>> image
> > color
> >                 mi.setIcon(b.image.mutate());
> >                 mi.setOnMenuItemClickListener(b);
> >                 if (android.os.Build.VERSION.SDK_INT>  10)
> >>>   mi.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
> >         }
> > }
> > Any way to make it working?  Or Honeycomb UI supposes that such items
> > should merely disappear?
> > 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
> >>> --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "Android Developers" group.
> >>> 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
>
> --
> Kostya Vasilyev

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 Development Environment?

2011-11-15 Thread Oli Wright
Eclipse.  Multiple platforms depending on machine / mood / location.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] MediaRecorder send video over TCP socket

2011-11-15 Thread muhammad.ume...@hotmail.com
hi,
 Please please help me. i have found 2 method for android video
camera recording to pc  but i m stuck to create a file on server side.
these 2 methods are

1) Mediarecorder
 parcelFileDescriptor fromSocket
that perfect to record video on sd card but when i send it to socket,
it doesn't receive on server side and not create a video file.How can
i receive this video on server side, is it possible?


2) OnperviewFrame(byte[] data, Camera camera)
i am succeed to send this byte array in a file on server side that
is not a playable. I want to create a video file that is in a correct
format and playable.


I really need your help because  i am a student and i m doing my
project.

thanks and Regards

sahil

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Help need on face book integration

2011-11-15 Thread chowdary nani
Hi All,

I need help on integrating face book into my android application and
creating developers id in face book.
Please help me on this.

Thanks in advance.


Thanks
Naveen

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] empty Cursor after Context.deleteDatabase and data re-added

2011-11-15 Thread Hank
I implemented a logout function in my application that removes the
user's account, shared preferences, and deletes the database using
context.deleteDatabase(). But after I re-login, and the data is re-
added, when I go into one of my activities using a
SimpleCursorAdapter, I notice that the list is not being populated. I
check the cursor being returned in that class and it has a count of 0,
so no rows are being returned. I also checked in my onPerformSync()
function in my SyncAdapter(), where the data is being re-added, and
the data seems to be re-added to the database. What could be the
problem?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Multiple Apps and Content Providers, How to ?

2011-11-15 Thread Kristopher Micinski
The typical answer is that if you have something like this then you
shouldn't have separate apps in the first place.

kris

On Tue, Nov 15, 2011 at 8:11 AM, swebb99  wrote:
> Hi,
>
> Newbie here.
>
> If I want to create several apps which all allow a user to created,
> read, update and delete related data so a content provider would seem
> to be the way to go. However I don't know which app a customer would
> buy first, second and so on. So how do I make sure that:
>
> 1) The first app creates and registers the provider.
> 2) Subsequent apps only make use of the provider and don't recreate.
> 3) Make sure the provider gets upgraded if a new app is bought, but
> also is not downgraded if an older app is bought after a new one.
>
> From reading the docs on content providers I just can see how any of
> this is possible. The definition of providers doesn't seem flexible
> enough to allow this kind of thing. If it isn't possible what is the
> strategy because it looks like content providers are the only
> mechanism for applications to share data.
>
> Thanks
>
> Steve
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> 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: Holding call programmatically

2011-11-15 Thread Kristopher Micinski
Not in the SDK, official or unofficial ...

kris

On Tue, Nov 15, 2011 at 7:01 AM, Kamil  wrote:
> So maybe some unofficial ways?
>
> On 14 Lis, 22:18, Mark Murphy  wrote:
>> AFAIK, there are no APIs for this in the Android SDK, sorry.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Mon, Nov 14, 2011 at 3:13 PM, Kamil  wrote:
>> > Hi all,
>> > I'm developing VoIP application. I'd like to ask if there is some way
>> > to hold active GSM call programmatically? It's very important case in
>> > my app to hold gsm call when VoIP call is comming. Is it possible?
>>
>> > 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
>>
>> --
>> Mark Murphy (a Commons 
>> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>>
>> _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.1
>> 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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Gravity "virtual" sensor source code

2011-11-15 Thread markus
Hi all!

Now that Ice Cream Sandwich is out, I thought I'd have a look at how
the "virtual" sensors have their data calculated, in particular
TYPE_GRAVITY. Of course it will involve data from some or all of the
real sensors (accelerometer, gyroscope, and magnetic field), but I've
read somewhere (can't find where just now) that from Android 4 ICS,
the virtual sensors, and TYPE_GRAVITY in particular, will be more
accurate, because they involve the gyroscope, if it's available in the
phone.

I've got the Android 4 source code downloaded, but I can't find the
place where this data is calculated. It's not in the Java code, as far
as I can tell, so it must be in native code somewhere. I'm new to
looking at the Android source code, so maybe someone could point me in
the right direction?

Thank you very much!

Regards,
Markus

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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:button click listener

2011-11-15 Thread jaggu
how to call webservice in android useing onclicklistener

webservice call i have implemented another mainactviy and with
defaulthandler and with sites list iam able to get response ,and iam
calling that actvity in onclicklistener
even that parseing data i have been  saveing that data in sqlite
public void onClick(View v) {
// TODO Auto-generated method stub
location=(Button)findViewById(R.id.CurrentLocation);
location.setOnClickListener(new OnClickListener() {

public void onClick(View arg0) {

 startactvity(mainactivity);

  }

});

event is not fireing when click on the button
please guide me in the right direction

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Home screen bottom bar(dock bar)

2011-11-15 Thread swami
Noted. Thanks. Swami.

On Nov 15, 4:50 pm, Mark Murphy  wrote:
> Step #1: Visithttp://source.android.com
>
> Step #2: Click on the Community tab
>
> Step #3: Find a Google Group that pertains to the Android source code
> (as this group does not)
>
> Step #4: Ask your questions regarding the Android source code on that group
>
>
>
>
>
>
>
>
>
> On Tue, Nov 15, 2011 at 2:14 AM, swami  wrote:
> > Hi,
>
> > I am trying to get rid of the bar at the bottom of the home
> > screen(that contains phone, shortcut to apps etc) I guess its also
> > called the Dock bar. Where in the source would I find code related to
> > this? Thanks.
>
> > -Swami.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > 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
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android 3.2 Programming 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] Re: How to transform a openGL object into a bitmap?

2011-11-15 Thread Streets Of Boston
Maybe you could use this:
https://groups.google.com/d/msg/android-developers/OGuoxpX20Ag/pr2FSeDYfigJ

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] What is the proper way to change look of MapView zoom controls in Android?

2011-11-15 Thread Alexey Zakharov
I just like this style and want to reproduce this in my app. 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] What is the proper way to change look of MapView zoom controls in Android?

2011-11-15 Thread TreKing
On Tue, Nov 15, 2011 at 2:47 AM, Alexey Zakharov  wrote:

> What is the proper way to change look of MapView zoom controls in Android?


Disable the default ones and replace with your own.

I want to repoduce zoom button from new google maps.


Why? They'll just change again down the line at some point, so you're
giving yourself more maintenance work, if your plan is to be consistent
with that app. Personally I hate the "flat" style they're going with in
Maps and all the Google products now. You should aim for consistency within
your own application.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Build Android Source..

2011-11-15 Thread Mark Murphy
Step #1: Visit http://source.android.com

Step #2: Click on the Community tab

Step #3: Visit a Google Group that is relevant to your question, as
this group is for developing apps with the Android SDK

Step #4: Ask your questions there

On Tue, Nov 15, 2011 at 8:34 AM,   wrote:
> Hello
>
> I have android source 2.3.3 , Now i want to build it in such a way when i
> port it to device it will copy bootanimation.zip to /data/local folder
> automatically.
>
> So what changes should i do in android source or how should i achieve it..
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



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

Android 3.2 Programming 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] webcall service

2011-11-15 Thread jaggu
hi
 inside the button  how to call my actvity its webservice how to call


public void onClick(View v) {
// TODO Auto-generated method stub
location=(Button)findViewById(R.id.CurrentLocation);
location.setOnClickListener(new OnClickListener() {

public void onClick(View arg0) {

//mainactvity();

  }

});

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Build Android Source..

2011-11-15 Thread kapnkore
Hello

I have android source 2.3.3 , Now i want to build it in such a way when i
port it to device it will copy bootanimation.zip to /data/local folder
automatically.

So what changes should i do in android source or how should i achieve it..

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

[android-developers] How to transform a openGL object into a bitmap?

2011-11-15 Thread saex
Actually i have a GLSurfaceView witha square that can be rotated and
zoomed, and this square haves a texture.

I need that a function to transform the current square into a bitmap.
For example, if the square is rotated, the bitmap must be the square
rotated as the user can see it on the screen

it is possible?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Multiple Apps and Content Providers, How to ?

2011-11-15 Thread swebb99
Hi,

Newbie here.

If I want to create several apps which all allow a user to created,
read, update and delete related data so a content provider would seem
to be the way to go. However I don't know which app a customer would
buy first, second and so on. So how do I make sure that:

1) The first app creates and registers the provider.
2) Subsequent apps only make use of the provider and don't recreate.
3) Make sure the provider gets upgraded if a new app is bought, but
also is not downgraded if an older app is bought after a new one.

>From reading the docs on content providers I just can see how any of
this is possible. The definition of providers doesn't seem flexible
enough to allow this kind of thing. If it isn't possible what is the
strategy because it looks like content providers are the only
mechanism for applications to share data.

Thanks

Steve

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Cross-posting BUG

2011-11-15 Thread Tomasz Gawel
There is strange bug, whenever I send a post to Android Developers
Group it happens to be crossposted to "exotic" groups like "fametest"
"No 1" or "flutuberwachung" which I have nothing to do with.
When I send post to other groups ont google the proble does not occur.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 include the Digital Clock below the Analog Clock(as a Single Widget)

2011-11-15 Thread Mark Murphy
On Tue, Nov 15, 2011 at 7:54 AM, Abhishek Kumar Gupta
 wrote:
> Sir, Thanks for reply.
> Actually I want to include "Digital minutes" inside the dial of the analog
> clock in the Analog Clock Widget. I have to use whole assembly as a App.
> Widget, is it possible?

Only if you write your own firmware. You cannot use custom widgets in
app widgets.

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

Android 3.2 Programming 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] Re: How to include the Digital Clock below the Analog Clock(as a Single Widget)

2011-11-15 Thread Abhishek Kumar Gupta
Sir, Thanks for reply.
Actually I want to include "Digital minutes" inside the dial of the analog 
clock in the Analog Clock Widget. I have to use whole assembly as a App. 
Widget, is it possible?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Camera Error 100, ICamera died

2011-11-15 Thread saex
When i make a photo, after the photo is stored, i want that the camera
preview is still on the screen, but something is going wrong, because
after making a photo the camera preview frozens and i get this error:
Camera Error 100, ICamera died

I checked some stackoverflow questions about this error but none of
them help me, i dont know what i am doing bad.

this is the code of my custom camera view class:

public class CustomCameraView extends SurfaceView
{
static final int FOTO_MODE = 0;
SurfaceHolder previewHolder;
Camera camera;
Context myContext;
boolean mPreviewRunning = false;
public CustomCameraView(Context ctx)
{
   super(ctx);
   myContext=ctx;
   previewHolder = this.getHolder();
 
previewHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
   previewHolder.addCallback(surfaceHolderListener);
   this.requestFocus(); //necessary to manage camera button
events
   this.setFocusableInTouchMode(true); //necessary to manage
camera button events
}
SurfaceHolder.Callback surfaceHolderListener = new
SurfaceHolder.Callback()
{
public void surfaceCreated(SurfaceHolder holder)
{
camera=Camera.open();
try {
camera.setPreviewDisplay(previewHolder);
}catch (Exception E ){ }
}
public void surfaceChanged(SurfaceHolder holder, int format, int
w, int h) {
if (mPreviewRunning) { //stopPreview() will crash if 
preview is
not running
camera.stopPreview();
}
Camera.Parameters p = camera.getParameters();
p.setPreviewSize(w, h);
//p.setPictureSize(1024, 768);
camera.setParameters(p);
try {
camera.setPreviewDisplay(holder);
} catch (IOException e) {e.printStackTrace();}
camera.startPreview();
mPreviewRunning = true;
}
public void surfaceDestroyed(SurfaceHolder holder) {
camera.stopPreview();
mPreviewRunning = false;
camera.setPreviewCallback(null);
camera.release();
camera=null;
}
};

Camera.PictureCallback mPictureCallback = new
Camera.PictureCallback() {
public void onPictureTaken(byte[] imageData, Camera c) {
if (imageData != null) {
StoreByteImage(myContext, imageData, 50, 
"ImageName");
camera.startPreview();
}
}
};

public static boolean StoreByteImage(Context mContext, byte[]
imageData, int quality, String expName) {
File sdImageMainDirectory = new File("/sdcard");
FileOutputStream fileOutputStream = null;
//String nameFile;
try{
BitmapFactory.Options options=new 
BitmapFactory.Options();
options.inSampleSize = 1;//reduce el tamaño de la foto
Bitmap myImage = 
BitmapFactory.decodeByteArray(imageData, 0,
imageData.length,options);
fileOutputStream = new
FileOutputStream(sdImageMainDirectory.toString() +"/image.jpg");
BufferedOutputStream bos = new
BufferedOutputStream(fileOutputStream);
myImage.compress(CompressFormat.JPEG, quality, bos);
bos.flush();
bos.close();
}catch (FileNotFoundException e) {e.printStackTrace();} catch
(IOException e) {e.printStackTrace();}
return true;
}
public void takePicture()
{
camera.takePicture(null, mPictureCallback, mPictureCallback);
}
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 with ScaleType.FIT_XY programmatically

2011-11-15 Thread B.Arunkumar
Hi,

I have a problem. I have created a relativelayout with imageview
in my code like this:-

RelativeLayout relativelayout1 = new RelativeLayout(this);
RelativeLayout.LayoutParams r1 = new
RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT);
relativelayout1.setLayoutParams(r1);

ImageView view = new ImageView (this);
view.setScaleType(ScaleType.FIT_XY);

BItmap bitmap =
BitmapFactory.decodeResource(getResources(),R.drawable.texture);

RelativeLayout.LayoutParams r6 = new
RelativeLayout.LayoutParams(640,640);
r6.setMargins(0, 160, 0, 0);
view.setLayoutParams(r6);
view.setImageBitmap(bitmap);

But the imageview simply does not extend beyond the screen dimensions
of 320 * 480. Why is this happening and how can I solve this problem?
I want the imageview width and height extended beyond the screen
dimensions. How do I do it programmatically?

Thank you,
B.Arunkumar

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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   >