[android-developers] Re: what is wrong with eclair SDK mapsview ..

2009-12-04 Thread Dan Raaka
got it .. had inadvertently added maps.jar via external jars to
eclipse.

On Dec 4, 10:29 pm, Dan Raaka  wrote:
> I have mapstest app ..
>
> ---AndroidManifest.xml
> 
> http://schemas.android.com/apk/res/android";
>       package="com.dan.maptest"
>       android:versionCode="1"
>       android:versionName="1.0">
>     
>                            android:label="@string/app_name">
>             
>                 
>                  android:name="android.intent.category.LAUNCHER" />
>             
>         
>
>      android:required="true">
> 
>     
>
>  android:name="android.permission.ACCESS_COARSE_LOCATION"> permission>
>  android:name="android.permission.ACCESS_FINE_LOCATION"> permission>
>  permission>
> 
>
> The activity itself is fairly simple
>
> public class maptest extends MapActivity {
> //bunch of stuff
>
> }
>
> Then when I try to run my app on the emulator
>
> I/ActivityManager(   60): Start proc com.dan.maptest for activity
> com.dan.maptest/.maptest: pid=221 uid=10025 gids={3003}
> D/NetworkLocationProvider(   60): onDataConnectionStateChanged 0
> D/dalvikvm(  198): LinearAlloc 0x0 used 634508 of 5242880 (12%)
> D/ddm-heap(  163): Got feature list request
> D/ddm-heap(  206): Got feature list request
> D/        (  206): unable to unlink '/data/data/com.android.alarmclock/
> shared_prefs/AlarmClock.xml.bak': No such file or directory (errno=2)
> D/ddm-heap(  221): Got feature list request
> I/ARMAssembler(   60): generated
> scanline__0177:03515104_0001_ [ 73 ipp] (95 ins) at
> [0x3925b8:0x392734] in 870781 ns
> I/ARMAssembler(   60): generated
> scanline__0077:03010104_0004_ [ 22 ipp] (41 ins) at
> [0x393f70:0x394014] in 1371962 ns
> W/BackupManagerService(   60): dataChanged but no participant
> pkg='com.android.providers.settings' uid=10014
> W/dalvikvm(  221): Class resolved by unexpected DEX: Lcom/dan/maptest/
> maptest;(0x43ab5d48):0x11e578 ref [Lcom/google/android/maps/
> MapActivity;] Lcom/google/an
> droid/maps/MapActivity;(0x43ab5d48):0x11da08
> W/dalvikvm(  221): (Lcom/dan/maptest/maptest; had used a different
> Lcom/google/android/maps/MapActivity; during pre-verification)
> W/dalvikvm(  221): Unable to resolve superclass of Lcom/dan/maptest/
> maptest; (38)
> W/dalvikvm(  221): Link of class 'Lcom/dan/maptest/maptest;' failed
> D/AndroidRuntime(  221): Shutting down VM
> W/dalvikvm(  221): threadid=3: thread exiting with uncaught exception
> (group=0x4001b188)
> E/AndroidRuntime(  221): Uncaught handler: thread main exiting due to
> uncaught exception
> E/AndroidRuntime(  221): java.lang.IllegalAccessError: Class ref in
> pre-verified class resolved to unexpected implementation
> E/AndroidRuntime(  221):        at dalvik.system.DexFile.defineClass
> (Native Method)
> E/AndroidRuntime(  221):        at
> dalvik.system.DexFile.loadClassBinaryName(DexFile.java:209)
> E/AndroidRuntime(  221):        at
> dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203)
> E/AndroidRuntime(  221):        at java.lang.ClassLoader.loadClass
> (ClassLoader.java:573)
> E/AndroidRuntime(  221):        at java.lang.ClassLoader.loadClass
> (ClassLoader.java:532)
> E/AndroidRuntime(  221):        at
> android.app.Instrumentation.newActivity(Instrumentation.java:1021)
> E/AndroidRuntime(  221):        at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> 2367)
> E/AndroidRuntime(  221):        at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
> 2470)
> E/AndroidRuntime(  221):        at android.app.ActivityThread.access
> $2200(ActivityThread.java:119)
> E/AndroidRuntime(  221):        at android.app.ActivityThread
> $H.handleMessage(ActivityThread.java:1821)
> E/AndroidRuntime(  221):        at android.os.Handler.dispatchMessage
> (Handler.java:99)
> E/AndroidRuntime(  221):        at android.os.Looper.loop(Looper.java:
> 123)
> E/AndroidRuntime(  221):        at android.app.ActivityThread.main
> (ActivityThread.java:4310)
> E/AndroidRuntime(  221):        at
> java.lang.reflect.Method.invokeNative(NativeMethod)
> E/AndroidRuntime(  221):        at java.lang.reflect.Method.invoke
> (Method.java:521)
> E/AndroidRuntime(  221):        at com.android.internal.os.ZygoteInit
> $MethodAndArgsCaller.run(ZygoteInit.java:860)
> E/AndroidRuntime(  221):        at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
> E/AndroidRuntime(  221):        at dalvik.system.NativeStart.main
> (Native Method)
> W/BackupManagerService(   60): dataChanged but no participant
> pkg='com.android.providers.settings' uid=10014
>
> what am I missing here .. the same on donut emulator and an 1.5 device.

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

[android-developers] what is wrong with eclair SDK mapsview ..

2009-12-04 Thread Dan Raaka
I have mapstest app ..

---AndroidManifest.xml

http://schemas.android.com/apk/res/android";
  package="com.dan.maptest"
  android:versionCode="1"
  android:versionName="1.0">


















The activity itself is fairly simple

public class maptest extends MapActivity {
//bunch of stuff

}


Then when I try to run my app on the emulator

I/ActivityManager(   60): Start proc com.dan.maptest for activity
com.dan.maptest/.maptest: pid=221 uid=10025 gids={3003}
D/NetworkLocationProvider(   60): onDataConnectionStateChanged 0
D/dalvikvm(  198): LinearAlloc 0x0 used 634508 of 5242880 (12%)
D/ddm-heap(  163): Got feature list request
D/ddm-heap(  206): Got feature list request
D/(  206): unable to unlink '/data/data/com.android.alarmclock/
shared_prefs/AlarmClock.xml.bak': No such file or directory (errno=2)
D/ddm-heap(  221): Got feature list request
I/ARMAssembler(   60): generated
scanline__0177:03515104_0001_ [ 73 ipp] (95 ins) at
[0x3925b8:0x392734] in 870781 ns
I/ARMAssembler(   60): generated
scanline__0077:03010104_0004_ [ 22 ipp] (41 ins) at
[0x393f70:0x394014] in 1371962 ns
W/BackupManagerService(   60): dataChanged but no participant
pkg='com.android.providers.settings' uid=10014
W/dalvikvm(  221): Class resolved by unexpected DEX: Lcom/dan/maptest/
maptest;(0x43ab5d48):0x11e578 ref [Lcom/google/android/maps/
MapActivity;] Lcom/google/an
droid/maps/MapActivity;(0x43ab5d48):0x11da08
W/dalvikvm(  221): (Lcom/dan/maptest/maptest; had used a different
Lcom/google/android/maps/MapActivity; during pre-verification)
W/dalvikvm(  221): Unable to resolve superclass of Lcom/dan/maptest/
maptest; (38)
W/dalvikvm(  221): Link of class 'Lcom/dan/maptest/maptest;' failed
D/AndroidRuntime(  221): Shutting down VM
W/dalvikvm(  221): threadid=3: thread exiting with uncaught exception
(group=0x4001b188)
E/AndroidRuntime(  221): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(  221): java.lang.IllegalAccessError: Class ref in
pre-verified class resolved to unexpected implementation
E/AndroidRuntime(  221):at dalvik.system.DexFile.defineClass
(Native Method)
E/AndroidRuntime(  221):at
dalvik.system.DexFile.loadClassBinaryName(DexFile.java:209)
E/AndroidRuntime(  221):at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203)
E/AndroidRuntime(  221):at java.lang.ClassLoader.loadClass
(ClassLoader.java:573)
E/AndroidRuntime(  221):at java.lang.ClassLoader.loadClass
(ClassLoader.java:532)
E/AndroidRuntime(  221):at
android.app.Instrumentation.newActivity(Instrumentation.java:1021)
E/AndroidRuntime(  221):at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2367)
E/AndroidRuntime(  221):at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2470)
E/AndroidRuntime(  221):at android.app.ActivityThread.access
$2200(ActivityThread.java:119)
E/AndroidRuntime(  221):at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:1821)
E/AndroidRuntime(  221):at android.os.Handler.dispatchMessage
(Handler.java:99)
E/AndroidRuntime(  221):at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime(  221):at android.app.ActivityThread.main
(ActivityThread.java:4310)
E/AndroidRuntime(  221):at
java.lang.reflect.Method.invokeNative(NativeMethod)
E/AndroidRuntime(  221):at java.lang.reflect.Method.invoke
(Method.java:521)
E/AndroidRuntime(  221):at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime(  221):at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime(  221):at dalvik.system.NativeStart.main
(Native Method)
W/BackupManagerService(   60): dataChanged but no participant
pkg='com.android.providers.settings' uid=10014

what am I missing here .. the same on donut emulator and an 1.5 device.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 does Email app switch its 'main' activity

2009-12-04 Thread Farproc
I have an idea: check whether account has been steup in onResume() of
your main activity if not start the wizard activity.

On Dec 5, 9:58 am, hap 497  wrote:
> Hi,
>
> In android Email app, when I first launch it, it will shows me the
> 'account setup wizard' activity.
> But when I launch the Email app(after the account is set) again, it
> wont' show the 'account setup wizard' activity, it will show the
> 'Folder list activity ' instead.
>
> How can it does the main activity switch (depends on the email account setup)?
>
> Thank you.

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


[android-developers] Re: WifiManager.getScanResults() reports out-fo-date values after AP settings changed.

2009-12-04 Thread Farproc
Thank u very much.
I do not think rebooting Wi-Fi device is a must-have to recognize an
AP. My PC network adapter has no problem with recognizing and
connecting to the AP after settings of AP changed.
After all it is too terrible to have to reboot your device fater every
single setting modification of the wireless
router!!
It is very easy to verify this bug. Open the built in Setting app and
make sure your wireless router is in the list of APs, then change the
SSID fo your router, happily you'll have no chance(even after
completely rebooting your router or disabling/enabling Wi-Fi of your
phone) to see the new SSID in the list of Wi-Fi settings before
REBOOTing your phone. Rebooting a smart phone like android takes up
not a short period of time!!


On Dec 4, 4:22 pm, hongki park  wrote:
> I just guess, your changes need reboot.
>
> or, partially restart the modem side.
>
> 2009/12/4 Farproc 
>
>
>
> > Nobody care?
>
> > On Dec 4, 8:28 am, Farproc  wrote:
> > > After changing the settings of the wireless router(SSID, frequency,
> > > securities) Android won't report the correct values until you reboot
> > > your android device!!
>
> > >http://code.google.com/p/android/issues/detail?id=5178&can=4&colspec=...
>
> > > Does anyone know any workarounds of this???
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@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: Alternatives to using 'createScaledBitmap' when adding 3D

2009-12-04 Thread TAKEphONE
Hi,

Thanks !

I think I cant use Canvas.scale() cause every image needs a different
size,
but Canvas.drawBitmap seems ok. I considered it, but thought these
rects
are clipping rects and not resizing.

Will try that.

Shimon

On Dec 4, 7:29 pm, Romain Guy  wrote:
> Your current solution is a terrible performance hog. On every frame
> drawn you create (and allocate) a new Bitmap! Instead of calling
> createScaledBitmap() you should just change the scale factor of the
> Canvas (Canvas.scale()) or use a variation of drawBitmap() that takes
> a size (for instance, Canvas.drawBitmap(Bitmap, Rect source, Rect
> destination, Paint)).
>
>
>
>
>
> On Fri, Dec 4, 2009 at 8:20 AM, TAKEphONE  wrote:
> > Hi,
>
> > I have a problem - I am writing an application that displays up to 12
> > images on screen, and moves them around, plus reads touch events. I am
> > using a sample code I found, and it works great. Now I need adding 3D
> > - meaning emulating the objects moving in the Z axis, too (in/out of
> > screen).
>
> > To do this, I need to resize the images as they move.
>
> > To test this, I changed the following line in my onDraw (Panel) code:
>
> > canvas.drawBitmap(bitmap, coords.getX(), coords.getY(), null);
>
> > to:
>
> > Bitmap bmpScaled = Bitmap.createScaledBitmap(bitmap, 112, 112, false);
> > canvas.drawBitmap(bmpScaled, coords.getX(), coords.getY(), null);
>
> > Which works, BUT - movement on screen, plus response to touch events
> > becomes real Jiggly.
>
> > Checking the log I see that every call to createScaledBitmap causes
> > garbage collection of around 90mS, which causes the total app to
> > respond jiggly.
>
> > Tried preparing 20 sized bitmaps beforehand, but since that moves the
> > calls to those createScaledBitmap to the beginning of the app - it
> > takes forever to load...
>
> > Can you think of any workaround or other way to achieve the scaling
> > effect ?
>
> > TIA
>
> > Shimon
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them

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


Re: [android-developers] Re: Samsung Behold II Info

2009-12-04 Thread dan raaka
It returns "Behold II"
-Dan


On Fri, Dec 4, 2009 at 7:20 AM, Greivin Lopez wrote:

> By reading this thread I suspect it currently running Android 1.5.
>
>
> http://forums.t-mobile.com/t5/Samsung-Behold-2/1-6-or-2-0-Upgrade-in-the-Works/m-p/263944
>
> But I'm not sure.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] how to get source for videoplayer........

2009-12-04 Thread abi
my program is executing
but i don't know how to give input source to the videoplayer..
pls help me..

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


Re: [android-developers] Where to get a Samsung Moment for development

2009-12-04 Thread dan raaka
where are you located?
-Dan


On Wed, Dec 2, 2009 at 9:28 PM, SoftwareForMe.com
wrote:

> Hi,
>
> We have a G1, MyTouch, Hero and Droid. However, we've been getting odd
> reports from our Moment customers, and it's time we get one.
>
> Anybody know where to do this, and whether there are any issues getting the
> thing acitvated without a phone plan to go with it?
>
> SoftwareForMe.com
> Makers of PhoneMyPC
> & Imagine Multi-touch
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] XML Parsing is Slow

2009-12-04 Thread Desu Vinod Kumar
HI

Which Parsing Method u were usike
for example like Sax or dom or any other parsing 

better i suggest u to use Sax parse
execution speed is good

On Sat, Dec 5, 2009 at 11:12 AM, Sasikumar.S wrote:

> Hi,
>
> I like to parse a XML file in android.
> It is taking too much time to parse a xml in android.
> what is the reason?..
> It is taking more than 5 minutes also to parse a file.
>
> The same thing will continue in phone?...
>
> Any one know baout this?..
>
> Thanks in advance..
>
> --
> Thanks & Regards
> Sasikumar.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




-- 
Regards
---
Desu Vinod Kumar
vinny.s...@gmail.com
09176147148

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] XML Parsing is Slow

2009-12-04 Thread Sasikumar.S
Hi,

I like to parse a XML file in android.
It is taking too much time to parse a xml in android.
what is the reason?..
It is taking more than 5 minutes also to parse a file.

The same thing will continue in phone?...

Any one know baout this?..

Thanks in advance..

-- 
Thanks & Regards
Sasikumar.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

Re: [android-developers] Re: Updates to the Android SDK

2009-12-04 Thread Raphael
Grrr I have yet another issue of the block on my home XP machine.
Using the standalone sdk manager, it keeps telling something is
locking the tools dir so it can't install tools r4. But I killed adb,
closed Eclipse, all Explorers... still won't work. Process Explorer
can't find anything using that handle. Frustrating :-(

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: The GPS Shutdown Thing

2009-12-04 Thread Alex
This same code works fine on a G1 (1.5/1.6), Magic, Droid, Cliq,
Samsung Behold and Moment.  I was previously using a 10 minute update
interval.

I think it was the firmware update Sprint/HTC applied recently.  While
it fixed many of the gigantic bugs with the Hero, it introduced this
one.

I confirmed it with this test code:


public class GPSBugActivity extends Activity implements
LocationListener
{
private static final int MIN_TIME = 6; // 1 minute
private static final int MIN_DISTANCE = 1000; // 1 kilometer

private LocationManager locationManager = null;

@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

locationManager = (LocationManager) getSystemService
(Context.LOCATION_SERVICE);

locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,
MIN_TIME, MIN_DISTANCE, this);
}

@Override
protected void onDestroy()
{
super.onDestroy();

locationManager.removeUpdates(this);
}

@Override
public void onLocationChanged(Location arg0)
{
}

@Override
public void onProviderDisabled(String arg0)
{
}

@Override
public void onProviderEnabled(String arg0)
{
}

@Override
public void onStatusChanged(String arg0, int arg1, Bundle arg2)
{
}
}

The log had the fact that it was removing the listener...but it
doesn't seem to matter...

12-05 00:20:46.008: DEBUG/LocationManager(1941): removeUpdates:
listener = com.gpsbug.gpsbugactiv...@4348f94012-05 00:20:50.201: DEBUG/
LocationManagerService(70): CdmaPollingThread exiting

I'm still not sure if it's actually running the GPS or just flashing
the icon, but either way it looks bad to the end user.

-Alex


On Dec 5, 12:04 am, Mark Wyszomierski  wrote:
> Alex, have you tried a simple test of just registering, then
> deregistering the listeners in an otherwise empty project? On my
> G1/1.5, I don't get this behavior, the GPS icon goes away shortly
> after a deregister. If it's a quirk on that device, that is worrisome.
> In that case, many apps will burn out the user's battery?
>
> Mark
>
> On Dec 4, 11:57 pm, Alex  wrote:
>
>
>
> > I can confirm that an update interval of greater than 35 seconds
> > causes theGPSstatus icon to blink on an Sprint HTC Hero (Firmware
> > 1.56.651.2).  It does not ever go away, it will blink all day long.
> > You can run and exit Google Maps and it goes away.
>
> > So now I get to decide whether to have this "bug" or run my location
> > listeners at a much faster rate than I normally would.
>
> > From the docs for requestLocationUpdates:
> > Background services should be careful about setting a sufficiently
> > high minTime so that the device doesn't consume too much power by
> > keeping theGPSor wireless radios on all the time. In particular,
> > values under 6ms are not recommended.
>
> > -Alex
>
> > On Dec 2, 7:54 pm, Ken H  wrote:
>
> > > 1 minute seems long to me too, 5-10 sec is a good generic interval if
> > > you just want it to turn off quicker. Also remember that theGPSneeds
> > > a time *and* distance update interval.
>
> > > But my question is this, have you sat down and watched to see if the
> > > little satellite dish disappears after a minute? My guess is it
> > > should. Also remember your app is usually just suspended when you
> > > first turn it off (so it can be booted up quicker). If android needs
> > > the memory it will kill it.
>
> > > Ken
>
> > > On Dec 2, 11:24 am, Mark Wyszomierski  wrote:
>
> > > > I've been working with the location providers lately, I haven't seen
> > > > this behavior. When I deregister my listeners, theGPSicon goes away,
> > > > I haven't seen it stick around.
>
> > > > Even one minute intervals forGPSseems like a lot for me - I'm
> > > > guessing users won't be able to move fast enough in one minute to make
> > > > any real difference in location. All depends on the app though.
>
> > > > On Nov 19, 6:33 pm, jtoolsdev  wrote:
>
> > > > > I'm looking to a solution using the MyLocationOverlay library where
> > > > > one can use runOnFirstFix which can launch the thread (which I already
> > > > > have) when the current location is found.  Once it is found I can shut
> > > > > down the location stuff as I only need it at the start of the program.
>
> > > > > On Nov 19, 3:20 pm, Nathan  wrote:
>
> > > > > > On Nov 19, 12:09 pm, jtoolsdev  wrote:
>
> > > > > > > The recommendation of
> > > > > > > the SDK is for setting up the location listener is to set time at
> > > > > > > 6ms or 1 minute.  
>
> > > > > > Really? Does Google Maps follow that guideline?
>
> > > > > > > My tests show if you use that number when
> > > > > > > exiting the app it may not shutdownGPS.  
>
> > > > > > Sounds bad.I hope th

Re: [android-developers] Re: Updates to the Android SDK

2009-12-04 Thread Raphael
Sorry for the frustration.
You should get the exact same updates whether you are using the https
or the http link.
R/

On Fri, Dec 4, 2009 at 4:17 PM, Sekhar  wrote:
> Not working for me. The standalone manager won't connect to the SSL
> url (https://dl-ssl.google.com/android/repository/repository.xml); and
> if I make it http, it won't find compatible updates. This is really
> frustrating, can't believe such a basic install issue managed to slip
> through the cracks.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: The GPS Shutdown Thing

2009-12-04 Thread Mark Wyszomierski
Alex, have you tried a simple test of just registering, then
deregistering the listeners in an otherwise empty project? On my
G1/1.5, I don't get this behavior, the GPS icon goes away shortly
after a deregister. If it's a quirk on that device, that is worrisome.
In that case, many apps will burn out the user's battery?

Mark

On Dec 4, 11:57 pm, Alex  wrote:
> I can confirm that an update interval of greater than 35 seconds
> causes theGPSstatus icon to blink on an Sprint HTC Hero (Firmware
> 1.56.651.2).  It does not ever go away, it will blink all day long.
> You can run and exit Google Maps and it goes away.
>
> So now I get to decide whether to have this "bug" or run my location
> listeners at a much faster rate than I normally would.
>
> From the docs for requestLocationUpdates:
> Background services should be careful about setting a sufficiently
> high minTime so that the device doesn't consume too much power by
> keeping theGPSor wireless radios on all the time. In particular,
> values under 6ms are not recommended.
>
> -Alex
>
> On Dec 2, 7:54 pm, Ken H  wrote:
>
> > 1 minute seems long to me too, 5-10 sec is a good generic interval if
> > you just want it to turn off quicker. Also remember that theGPSneeds
> > a time *and* distance update interval.
>
> > But my question is this, have you sat down and watched to see if the
> > little satellite dish disappears after a minute? My guess is it
> > should. Also remember your app is usually just suspended when you
> > first turn it off (so it can be booted up quicker). If android needs
> > the memory it will kill it.
>
> > Ken
>
> > On Dec 2, 11:24 am, Mark Wyszomierski  wrote:
>
> > > I've been working with the location providers lately, I haven't seen
> > > this behavior. When I deregister my listeners, theGPSicon goes away,
> > > I haven't seen it stick around.
>
> > > Even one minute intervals forGPSseems like a lot for me - I'm
> > > guessing users won't be able to move fast enough in one minute to make
> > > any real difference in location. All depends on the app though.
>
> > > On Nov 19, 6:33 pm, jtoolsdev  wrote:
>
> > > > I'm looking to a solution using the MyLocationOverlay library where
> > > > one can use runOnFirstFix which can launch the thread (which I already
> > > > have) when the current location is found.  Once it is found I can shut
> > > > down the location stuff as I only need it at the start of the program.
>
> > > > On Nov 19, 3:20 pm, Nathan  wrote:
>
> > > > > On Nov 19, 12:09 pm, jtoolsdev  wrote:
>
> > > > > > The recommendation of
> > > > > > the SDK is for setting up the location listener is to set time at
> > > > > > 6ms or 1 minute.  
>
> > > > > Really? Does Google Maps follow that guideline?
>
> > > > > > My tests show if you use that number when
> > > > > > exiting the app it may not shutdownGPS.  
>
> > > > > Sounds bad.I hope there is an answer for that.
>
> > > > > Nathan
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: The GPS Shutdown Thing

2009-12-04 Thread Alex
I can confirm that an update interval of greater than 35 seconds
causes the GPS status icon to blink on an Sprint HTC Hero (Firmware
1.56.651.2).  It does not ever go away, it will blink all day long.
You can run and exit Google Maps and it goes away.

So now I get to decide whether to have this "bug" or run my location
listeners at a much faster rate than I normally would.

>From the docs for requestLocationUpdates:
Background services should be careful about setting a sufficiently
high minTime so that the device doesn't consume too much power by
keeping the GPS or wireless radios on all the time. In particular,
values under 6ms are not recommended.


-Alex


On Dec 2, 7:54 pm, Ken H  wrote:
> 1 minute seems long to me too, 5-10 sec is a good generic interval if
> you just want it to turn off quicker. Also remember that theGPSneeds
> a time *and* distance update interval.
>
> But my question is this, have you sat down and watched to see if the
> little satellite dish disappears after a minute? My guess is it
> should. Also remember your app is usually just suspended when you
> first turn it off (so it can be booted up quicker). If android needs
> the memory it will kill it.
>
> Ken
>
> On Dec 2, 11:24 am, Mark Wyszomierski  wrote:
>
>
>
> > I've been working with the location providers lately, I haven't seen
> > this behavior. When I deregister my listeners, theGPSicon goes away,
> > I haven't seen it stick around.
>
> > Even one minute intervals forGPSseems like a lot for me - I'm
> > guessing users won't be able to move fast enough in one minute to make
> > any real difference in location. All depends on the app though.
>
> > On Nov 19, 6:33 pm, jtoolsdev  wrote:
>
> > > I'm looking to a solution using the MyLocationOverlay library where
> > > one can use runOnFirstFix which can launch the thread (which I already
> > > have) when the current location is found.  Once it is found I can shut
> > > down the location stuff as I only need it at the start of the program.
>
> > > On Nov 19, 3:20 pm, Nathan  wrote:
>
> > > > On Nov 19, 12:09 pm, jtoolsdev  wrote:
>
> > > > > The recommendation of
> > > > > the SDK is for setting up the location listener is to set time at
> > > > > 6ms or 1 minute.  
>
> > > > Really? Does Google Maps follow that guideline?
>
> > > > > My tests show if you use that number when
> > > > > exiting the app it may not shutdownGPS.  
>
> > > > Sounds bad.I hope there is an answer for that.
>
> > > > Nathan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 Callbacks & Activitys

2009-12-04 Thread Loki117
Hey guys,

I need some guidance here. I am using the camera to take some photos
in app and setting the 3 specific call back functions for the
different levels of photo completion. Now when the last functions is
called jpegCallBack I would like to start a new activity however this
does not work! I am creating a new activity and calling start activity
as shown below but nothing happens!

Intent startImage = new Intent
(CameraActivity.this,SubmitForm.class);
startImage.putExtra("image", image);
startActivity(startImage);

Does anyone have any insight into why nothing happens? It's driving me
up the wall. I even tried setting up a broadcast receiver and calling
a it in the on receive method but still no dice. It just does nothing
no error just nothing.

Any help greatly appreciated.

Tom

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Eclair install choked with errors about locks and died horribly leaving corrupted install

2009-12-04 Thread havexz
Downloading Android SDK Tools, revision 4
Installing Android SDK Tools, revision 4
Failed to rename directory E:\android-sdk\tools to E:\android-sdk\temp
\ToolPackage.old01
-= Warning ! =-
A folder failed to be renamed or moved. On Windows this typically
means that a program is using that folder (for example Windows
Explorer.) Please close all running programs that may be locking the
directory 'E:\android-sdk\tools' and try again.

Still getting this error. Its really ANNOYING

On Nov 27, 9:36 am, Nature Boy  wrote:
> "A folder failed to be renamed or moved. On Windows this typically
> means that a program is using that folder (for example Windows
> Explorer.) Please close all running programs that may be locking the
> directory"
>
> I was having the same problem and disabling Norton Internet Security
> solved it for me.
>
> See "http://groups.google.co.uk/group/android-developers/browse_thread/
> thread/f22059d0885db766"
>
> On 11月5日, 午前4:07, ekwang  wrote:
>
> > When I try to upgrade Android SDK Tools, revision 3, by SDK Setup.exe
> > I meet same problem.
> > I think it has obvious problem.
> > Because SDK Setup.exe running with some files on /tools. (maybe
> > android.bat and some lib files)
> > So When SDK Setup try to rename old tools folder name after download
> > complete, this issue is happen.
> > Actually I checked java process handling /tools folder when SDK Setup
> > running.
>
> > On Oct 28, 6:31 am, Jim Showalter  wrote:
>
> > > Followed the instructions 
> > > inhttp://developer.android.com/sdk/adding-components.htmlforadding2.0 as
> > > components to an existing 1.6 SDK, from within Eclipse.
>
> > > It didn't work. Not by a long shot. Instead, it got partway through and 
> > > then
> > > said that C:\android-sdk-windows-1.6_r1\
> > > temp\DocPackage.new01 couldn't be copied because of a lock, and similarly
> > > for PlatformPackage.new01.
>
> > > It said to shut down running programs, but the only program running was
> > > Eclipse, which was needed to do the upgrade.
>
> > > The cancel button was disabled, and the close box didn't work. Shutting 
> > > down
> > > Eclipse killed it, but left C:\android-sdk-windows-1.6_r1 in a corrupted
> > > state. Restarting Eclipse showed the Android projects with errors, no SDK,
> > > and a disabled Android SDK and AVD Manager (which means no ability to 
> > > rerun
> > > the install).
>
> > > Shutting down Eclipse, renaming the corrupted SDK directory, unzipping 1.6
> > > again into C:, and restarting Eclipse made it as if nothing had ever
> > > happened, which is good. But it is not possible to complete the install 
> > > from
> > > Eclipse, which is bad.
>
> > > The dialog says:
>
> > > Failed to rename directory
> > > C:\android-sdk-windows-1.6_r1\temp\DocPackage.new01 to
> > > C:\android-sdk-windows-1.6_r1\docs
> > > -= Warning ! =-
> > > A folder failed to be renamed or moved. On Windows this typically means 
> > > that
> > > a program is using that folder (for example Windows Explorer.) Please 
> > > close
> > > all running programs that may be locking the directory
> > > 'C:\android-sdk-windows-1.6_r1\temp\DocPackage.new01' and try again.
>
> > > Failed to rename directory
> > > C:\android-sdk-windows-1.6_r1\temp\DocPackage.new01 to
> > > C:\android-sdk-windows-1.6_r1\docs
> > > -= Warning ! =-
> > > A folder failed to be renamed or moved. On Windows this typically means 
> > > that
> > > a program is using that folder (for example Windows Explorer.) Please 
> > > close
> > > all running programs that may be locking the directory
> > > 'C:\android-sdk-windows-1.6_r1\temp\DocPackage.new01' and try again.
> > > Installed: SDK Platform Android 2.0, API 5 (tools rev: 3)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Whenever i move out from an activity, which is in a task of singleTask, activtiy is being cleared up to root of the stack

2009-12-04 Thread Mark Wyszomierski
Hi Dianne,

To follow up on this, the package installer seems to launch apps in a
similar way Eclipse does, so, the same thing happens here as launching
from Eclipse:


// From eclipse:
Starting activity: Intent { flags=0x1000 comp={com.test.testapp/
com.test.testapp.ActivityMain} }

// From package installer (installing APK from the web browser):
Starting activity: Intent { action=android.intent.action.MAIN
flags=0x1000 comp={com.test.testapp/
com.test.testapp.ActivityMain} }

In both cases, I see:

 1) App gets started (running entry-point Activity A)
 2) App can launch a second activity (Activity B).
 3) Hit the home screen key.
 4) Return to app via app tray icon (expect to come back to Activity
B).
 5) Instead of resuming already running app, seems like a new one is
started (now showing Activity A)
 6) Hit the back key, oddly enough return to ActivityB - back key
again goes again to original Activity A).

There's got to be a way to stop this from happening? Users get
confused when launching from the package explorer. This isn't just my
app, this is happening with other 3rd party apps I've been trying out
to verify,

Thanks



On Dec 3, 12:04 am, Mark Wyszomierski  wrote:
> Oh I definitely wasn't precise about the launch method, sorry about
> that! I definitely didn't think the launch method could have anything
> to do with it, I was trying all sorts of launch modes, thinking maybe
> that's what the problem was,
>
> Thanks
>
> On Dec 2, 11:57 pm, Dianne Hackborn  wrote:
>
>
>
> > I would have mentioned this issue, but you seemed to be very clear that you
> > were launching from an icon in home both times. :}
>
> > Anyway, I am pretty sure this has been fixed in the tool, though I don't
> > know if that fix is in the current release.
>
> > On Wed, Dec 2, 2009 at 8:02 PM, Mark Wyszomierski  wrote:
> > > Actually, I'm probably experiencing this bug, my test app behaves
> > > exactly as described:
>
> > >http://code.google.com/p/android/issues/detail?id=2373#makechanges
>
> > > does anyone else see this behavior?
>
> > > Thanks
>
> > > On Dec 2, 8:16 pm, Mark Wyszomierski  wrote:
> > > > I may just be misinterpreting what I'm seeing through DDMS actually.
> > > > When I run my app, I have three activities, A, B, C. In the DDMS app
> > > > list, I see my app listed like:
>
> > > >   
> > > >   com.test.myapp
> > > >   
>
> > > > if I select it, and hit the Stop button, it will be killed, but then
> > > > replaced by a new instance of the application. Different results
> > > > depending on which activity I'm looking at. If I Stop when Activity A
> > > > is showing, A just keeps being restarted. If I kill when B is showing,
> > > > A is shown again. If I  kill when C is running, B shows itself.
>
> > > > So I'm guessing this is just the OS trying to restart from the last-
> > > > paused activity - and if on Activity A, there is no previous activity,
> > > > so it just gets restarted itself. Is this correct? Sorry for the
> > > > confusion,
>
> > > > Thanks
>
> > > > On Dec 2, 10:27 am, Mark Wyszomierski  wrote:
>
> > > > > I don't know if it's monkey or not - it looks like it's just this
> > > > > install (I'm sure it's the most recent SDK) - I can reproduce this odd
> > > > > behavior on there. On my other machine, and my test phone, looks like
> > > > > the default behavior is correct (with the same test apps and same SDK
> > > > > updates). Thanks for your help.
>
> > > > > On Dec 1, 8:38 pm, Dianne Hackborn  wrote:
>
> > > > > > Monkey may be doing odd things.  Tasks are matched by intent, so if
> > > you
> > > > > > build different intents you will be launching different tasks.
>
> > > > > > On Tue, Dec 1, 2009 at 5:33 PM, Mark Wyszomierski 
> > > wrote:
> > > > > > > Ok so the sample app code above should be producing the default
> > > > > > > behavior though, right? This is happening on a mac running 1.5. I
> > > did
> > > > > > > a fresh install of the SDK and the test app on a windows machine
> > > here,
> > > > > > > and it works as you described on that machine (always resumes
> > > instance
> > > > > > > if running in background instead of creating new instances).
>
> > > > > > > I'll also see multiple instances when running the monkey test app
> > > (on
> > > > > > > the problematic machine). In the DDMS process list, there will be
> > > one
> > > > > > > listing for the test app. I select it, hit the stop button. The
> > > list
> > > > > > > then shows another instance in its place (has a diff online value
> > > > > > > etc). It seems like the monkey test app has launched dozens of
> > > > > > > instances of the test app.
>
> > > > > > > On the windows machine, this does not happen, there is only one
> > > > > > > instance of my app after the monkey test app runs. When I select
> > > it,
> > > > > > > and hit stop - it's cleared from the list, and that's the only
> > > > > > > instance.
>
> > > > > > > I'm not sure what's going on, but if the sample app above is
> > > correct
> >

[android-developers] Re: getting Contact data into the Emulator

2009-12-04 Thread Beth
Update! The 2.0.1 emulator no longer crashes after pressing the menu
in "Contacts" and using the add account module.  However, the only
option available is to add an Exchange account.  Is there another way
to add contacts?
Does anybody know the import format if I want to copy a file to my
virtual sdcard and import from the sdcard?


I mean you Xavier!  F1! F1!  Help!  Help!


On Dec 3, 5:49 pm, Beth  wrote:
> Any suggestions for testing aContactapp on eclair?  I can't seem to
> putcontactdata into theemulator
>
> On Dec 1, 12:30 pm, Beth  wrote:
>
>
>
> > Do you have steps for me to pullContactdata off a phone and put it
> > into anemulatorfor test purposes?   The device has either the 1.5 or
> > 1.6 SDK.  An alternative datasource would a Gmail file export.
>
> > If I open the Contacts app and use the Accounts menu in a 2.0emulator
> > the acore process of theemulatorcrashes.  Both contacts andcontact
> > group data is needed since I do not have a 2.0 device and I have code
> > that needs the data to run. I thought somebody on this list might
> > easily answer.  Thanks in advance for any solution.
>
> > Regards,
> > Beth

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 does Email app switch its 'main' activity

2009-12-04 Thread hap 497
Hi,

In android Email app, when I first launch it, it will shows me the
'account setup wizard' activity.
But when I launch the Email app(after the account is set) again, it
wont' show the 'account setup wizard' activity, it will show the
'Folder list activity ' instead.

How can it does the main activity switch (depends on the email account setup)?

Thank you.

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


Re: [android-developers] Getting contact name from phone number in 1.5/1.6/2.0

2009-12-04 Thread Dmitri Plotnikov
The code looks fine to me (except for the cursor leak).

When you say "but not on 2.0", what exactly do you mean?  Does it not
return any data or throw an exception or what?

BTW, compatibility API will only give you access to the very first
Google account you add on the phone, so make sure the phone number you
are looking for is in that original account.  For the sake of testing,
you might want to use a phone with a single account.  Also, if you are
running this on the emulator, make sure you have the latest version of
the SDK (2.0.1).

Thank you,
- Dmitri

On Fri, Dec 4, 2009 at 3:37 PM, ghassett  wrote:
> Hi -- the semi-standard way of getting a contact name from a phone
> number is to use Contacts.Phones.CONTENT_FILTER_URL and append the
> phone number, as in the following sample code.  This works fine on
> Android 1.6, but not on 2.0 -- is there a way to perform this function
> that works in all versions of the Android API?
>
>
> private String getContactNameFromNumber(String number) {
>                // define the columns I want the query to return
>                String[] projection = new String[] {
>                                Contacts.Phones.DISPLAY_NAME,
>                                Contacts.Phones.NUMBER };
>
>                // encode the phone number and build the filter URI
>                Uri contactUri = Uri.withAppendedPath
> (Contacts.Phones.CONTENT_FILTER_URL, Uri.encode(number));
>
>                // query time
>                Cursor c = getContentResolver().query(contactUri, projection, 
> null,
>                                null, null);
>
>                // if the query returns 1 or more results
>                // return the first result
>                if (c.moveToFirst()) {
>                        String name = c.getString(c
>                                        
> .getColumnIndex(Contacts.Phones.DISPLAY_NAME));
>                        return name;
>                }
>
>                // return the original number if no match was found
>                return number;
>        }
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: ListView not responding to Click or KeyPress

2009-12-04 Thread n179911
Thank you.

On Fri, Dec 4, 2009 at 10:43 AM, Romain Guy  wrote:

> This is unnecessary. This problem will occur if your list item
> contains focusable children (like buttons, edittexts, etc.)
>
> On Thu, Dec 3, 2009 at 4:20 PM, hwii77  wrote:
> > maybe maybe try this: Add android:clickable="true"  (and
> > android:focusable="true")
> >
> > On Dec 2, 1:37 pm, n179911  wrote:
> >> Hi,
> >>
> >> I have a simple ListView in my layout.xml file.
> >>
> >>  >> android:layout_width="fill_parent"
> >> android:layout_height="wrap_content"
> >> />
> >>
> >> And in my javacode, I add a setOnItemClickListener() to my listview:
> >>
> >> listView.setOnItemClickListener(new OnItemClickListener() {
> >>
> >> public void onItemClick(AdapterView parent, View
> view,
> >> int position, long id) {
> >> System.out.println ("get onItem Click position=
> >> "+position);
> >>
> >> }
> >> });
> >>
> >> But when I run on G1. I don't see any print out when I click an item on
> the
> >> ListView on the phone.
> >> Or when I select an item using track ball and press CENTER.
> >>
> >> Can you please tell me why to resolve my problem?
> >>
> >> 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
> >
>
>
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: Updates to the Android SDK

2009-12-04 Thread adamphillips12
Sorry Dianne, my reply was intended for public, hit Reply to author by
accident:

"It was documented like so "The SDK version supported by the device,
for example v3. The Android 1.0 SDK is v1,  the 1.1 SDK is v2, and the
1.5 SDK is v3.", if that was supposed to imply that a device supported
its most recent sdk version and perhaps older versions (in terms of
the resource system), then the documentation itself could probably
have been made more clear. All the wording and the examples suggest
the implication that a device has one and only one SDK version it
identifies with, e.g. 1.5 identifies only with v3, if not present it
uses default (given no other qualifiers), otherwise it would of read
"The SDK versions...", the 's' has quite some significance. Obviously
the new "or higher" clause can not follow this single SDK definition,
it is a behavioural change, not merely a fix of the documented
functionality."

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 know if the device is to be powered off

2009-12-04 Thread Zhihong GUO
I don't think it is not good design. For example, a presence status updating
can be done by such design.

2009/12/5 jotobjects 

> Ultimately it is not a good design to require log off.  What if the
> user goes into a building where there is no reception and it is not
> possible to contact the server?
>
> On Dec 4, 12:33 am, Zhihong GUO  wrote:
> > Hi All,
> >
> > My application want to know the device is to be power off, so that it can
> > send out the logout message to the server.
> >
> > How to do that?
> >
> > Thanks a lot.
> >
> > James
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Android 2.0.1 emulator: Not able to get Proxy settings to work (tried -http-proxy and APN proxy)

2009-12-04 Thread David Turner
Try using the -http-proxy  option when starting the emulator.
This implements a transparent HTTP proxy that doesn't need modifying
settings in the emulated system at all.
It used to be buggy in previous releases of the emulator (mainly when used
with MS proxy servers) but this should
have been fixed in the latest SDK Tools release.

If this still doesn't work, try to use -debug-proxy as well, this will dump
the proxied traffic, and send it here so I can
have a look at it.

Also see -help-proxy for details about the  parameter.

Hope this helps.

On Fri, Dec 4, 2009 at 10:19 AM, Clark Hunter  wrote:

> This link has some suggestions for proxy setting for early (pre-1.5)
> and later (1.5 thru 1.6) Android emulators:
>
> http://www.coderanch.com/t/462906/Android/Mobile/connect-internet-behind-proxy
>
> Basically, the older emulator used a “com.android.provider.setting.db”
> database or -http-proxy command line switch to set proxy/port/userid/
> password.
>
> Android 1.5 and 1.6 used:  Home->Menu->Settings->WirelessControls-
> >MobileNetworks->Access Point Names to set multiple proxy/port/userid/
> password configurations.
> My 1.6 emulator is working behind our corporate firewall/proxy.
>
> Android 2.0 has some issue where the APN didn't display.
> I used sqlite3 /data/data/com.android.providers.telephony/databases/
> telephony.db to manually set fields and make the entries editable
> (current=1).
> I could access local servers, but not get thru the firewall?
>
> Android 2.0.1 shows the APN with a default 'TelKila' entry. I can add
> my proxy information, but still can't get past the firewall (shows Web
> page not 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] Re: International emergency number support

2009-12-04 Thread Eric Wong (hdmp4.com)
Why do you bother to find out when you can use 112?

See this for details
http://en.wikipedia.org/wiki/1-1-2

Btw, are you a programmer? we could collaborate if so.

Cheers
Eric

On Dec 4, 8:48 am, brucko  wrote:
> Does any one have any idea as to which countries Android supports
> interms of Emergency Number dialling. Is there a list of supported
> countries and emergency numbers? For example US has 911, Australia has
> 000 and there is also the international numbers 112.
>
> How can we find out which numbers/countries are supported for
> emergency dialling?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 capture key events with a window-less activity

2009-12-04 Thread bizack
I'm creating a Modal Dialog that accepts touch events outside of the
Dialog and can be positioned anywhere on the screen with any type of
animation.  Dialog does not allow this.  It's basically a combination
of a Toast and a Dialog with more options.  It's quite useful and has
a very specific use-case.  This is all implemented at the platform
level... this question just seemed more appropriate over here.
I don't know why getWindow() is returning null.  I could spend time
debugging, but I've marked this as resolved.
Thanks for taking the time to respond in detail.  Your feedback led to
the correct path.  You are correct in that I am doing something
'unusual,' but that's because this functionality currently doesn't
exist within the framework.


On Dec 4, 12:49 pm, Dianne Hackborn  wrote:
> On Fri, Dec 4, 2009 at 12:31 PM, bizack  wrote:
> > I would agree with you.  I think the problem (or misunderstanding on
> > my behalf) is that trying to call getWindowManager().addView outside
> > of onCreate orphans the Window (getWindow() returns null).
>
> No it definitely doesn't.  For example, dialogs and pop-up windows all use
> this, and they work fine if called in onCreate or elsewhere.  You must be
> doing something else to cause getWindow() to return null...  though I
> honestly can't imagine what, since mWindow (which Activity.getWindow()
> returns) is set in activity.attach() (which is called before onCreate()),
> and never set to null after that.
>
> Also I would strongly strongly recommend using Dialog instead of directly
> adding a view to the window manager, especially if this window is going to
> receive key events, because Dialog implements a lot of the common
> framework-side higher-level behavior for windows...  such as, for example,
> default key event handling.
>
> --
> 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] Re: [Android 2.0] Accessing contact's phone numbers

2009-12-04 Thread Dmitri Plotnikov
Hi Greg,

Take a look at the testPhonesFilterQuery unit test we have for
verifying the behavior in question:

http://android.git.kernel.org/?p=platform/packages/providers/ContactsProvider.git;a=blob;f=tests/src/com/android/providers/contacts/LegacyContactsProviderTest.java;hb=HEAD

Is what it's doing correct? Is it different from what you are doing?

Thank you,
- Dmitri


On Fri, Dec 4, 2009 at 4:00 PM, ghassett  wrote:
> Hi Dmitri -- I am not sure that the old API is still functional.  I am
> using what I think is the standard way of getting a display name from
> a phone number -- see the code below -- and it functions on a 1.6
> emulator but on on a 2.0 emulator.  Am I doing something wrong?  Is
> there an example somewhere of how to "get a contact name from a phone
> number" that will function in 1.5, 1.6, and 2.0?
>
> Here's the code -- it works when run in the 1.6 emulator, but not in
> the 2.0 emulator (Cursor comes back non-null, but there are no records
> so moveToFirst returns false):
>
>        public String getDisplayName (ContentResolver contentResolver)
>        {
>                String retval = mPhoneNumber;
>
>                Cursor cursor = contentResolver.query(
>                                Uri.withAppendedPath 
> (Contacts.Phones.CONTENT_FILTER_URL,
> Uri.encode(mPhoneNumber)),
>                                new String[] { Contacts.Phones.DISPLAY_NAME },
>                                null, null, null);
>
>                if (cursor != null  &&  cursor.moveToFirst())
>                {
>                        retval = cursor.getString(0);
>                }
>
>                return retval;
>        }
>
>
> // thanks // greg //
>
>
>
> On Oct 30, 3:05 pm, Dmitri Plotnikov  wrote:
>> It's deprecated, not removed.  The old API is still functional, but with
>> restrictions:
>>
>> 1. If your app was using something non-public, that part is likely to break.
>>  We tested a bunch of apps on the market against the legacy API - most
>> worked, but some did not.  Those were the cases when the app was using some
>> knowledge of the undocumented underlying database structure.
>> 2. Legacy API will only give you access to the "primary" account, i.e. the
>> first Google account you add to the phone.
>>
>> - Dmitri
>>
>> On Fri, Oct 30, 2009 at 11:40 AM, nEx.Software >
>> > wrote:
>>
>> > Hold up... I'm confused. Are you saying that Contacts portion of the
>> > SDK is deprecated? Whatever happened to "stick to the SDK because
>> > those are stable apis that won't break in future versions"? Very
>> > disappointing...
>>
>> > On Oct 30, 11:12 am, Jeff Sharkey  wrote:
>> > > Could you post the exact Uri you're passing to query()?  As the
>> > > javadoc describes, you need to append a filter string to the
>> > > CONTENT_FILTER_URI so it knows what to filter on.
>>
>> > > Uri lookupUri = Uri.withAppendedPath(PhoneLookup.CONTENT_URI,
>> > phoneNumber);
>>
>> > > Also, you might be able to skip your second step, since you can
>> > > directly ask for the PhoneLookup.DISPLAY_NAME column in the
>> > > projection.
>>
>> > > j
>>
>> > > On Fri, Oct 30, 2009 at 8:05 AM, agirardello
>>
>> > >  wrote:
>>
>> > > > Dear all,
>>
>> > > > I'm trying to adapt my application (Personalytics) for the brand new
>> > > > Android 2.0, however I'm facing an issue while accessing contacts'
>> > > > phone numbers...
>>
>> > > > What I need to do is to retrieve the name associated to a stored
>> > > > contact based on his/her phone number. At present I'm doing this in
>> > > > two steps:
>> > > > 1) from a phone number I get the corresponding ID of the stored
>> > > > contact (if present)
>> > > > 2) I retrieve the contact's name based on that ID
>>
>> > > > I managed to use the correct CONTENT_URI for reading contacts by using
>> > > > reflection to be fully compatible with Android 2.0
>> > > > (ContactsContract.Contacts.CONTENT_URI) and the previous versions
>> > > > (People.CONTENT_URI).
>>
>> > > > Now I'm trying to do the same for Phones.CONTENT_URI (Android <= 1.6)
>> > > > and ContactsContract.PhoneLookup.CONTENT_FILTER_URI (Android = 2.0)
>> > > > which is needed by step 2) mentioned above. But as soon as I try to
>> > > > get a contentResolver by using
>> > > > ContactsContract.PhoneLookup.CONTENT_FILTER_URI I get the following
>> > > > exception:
>>
>> > > > java.lang.IllegalArgumentException: Unknown URL
>> > content://com.android.contacts/phone_lookup
>>
>> > > > This looks really strange to me, since it should be correct (it is
>> > > > part of the official API)! Moreover, I tried to look at the "API
>> > > > Demos" project, in particular to the classes:
>>
>> > > > com.example.android.apis.view.List2
>> > > > com.example.android.apis.view.List3
>>
>> > > > which are still using the deprecated People.CONTENT_URI and
>> > > > Phones.CONTENT_URI and thus no data (i.e. contacts) is loaded (of
>> > > > course I have sample contacts in the emulator).
>>
>> > > > - Do you have any suggestion to solve this problem?

[android-developers] Re: Updates to the Android SDK

2009-12-04 Thread Sekhar
Not working for me. The standalone manager won't connect to the SSL
url (https://dl-ssl.google.com/android/repository/repository.xml); and
if I make it http, it won't find compatible updates. This is really
frustrating, can't believe such a basic install issue managed to slip
through the cracks.

On Dec 4, 3:10 pm, Raphael  wrote:
> For all of those who have the issue of 1.6_r2 not installing under
> Windows: that's because Eclipse is locking the folder. The solution is
> to close Eclipse and run the $SDK\tools\android.bat script directly.
> Then 1.6_r2 will install correctly.
>
> HTH
> R/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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.0] Accessing contact's phone numbers

2009-12-04 Thread ghassett
Hi Dmitri -- I am not sure that the old API is still functional.  I am
using what I think is the standard way of getting a display name from
a phone number -- see the code below -- and it functions on a 1.6
emulator but on on a 2.0 emulator.  Am I doing something wrong?  Is
there an example somewhere of how to "get a contact name from a phone
number" that will function in 1.5, 1.6, and 2.0?

Here's the code -- it works when run in the 1.6 emulator, but not in
the 2.0 emulator (Cursor comes back non-null, but there are no records
so moveToFirst returns false):

public String getDisplayName (ContentResolver contentResolver)
{
String retval = mPhoneNumber;

Cursor cursor = contentResolver.query(
Uri.withAppendedPath 
(Contacts.Phones.CONTENT_FILTER_URL,
Uri.encode(mPhoneNumber)),
new String[] { Contacts.Phones.DISPLAY_NAME },
null, null, null);

if (cursor != null  &&  cursor.moveToFirst())
{
retval = cursor.getString(0);
}

return retval;
}


// thanks // greg //



On Oct 30, 3:05 pm, Dmitri Plotnikov  wrote:
> It's deprecated, not removed.  The old API is still functional, but with
> restrictions:
>
> 1. If your app was using something non-public, that part is likely to break.
>  We tested a bunch of apps on the market against the legacy API - most
> worked, but some did not.  Those were the cases when the app was using some
> knowledge of the undocumented underlying database structure.
> 2. Legacy API will only give you access to the "primary" account, i.e. the
> first Google account you add to the phone.
>
> - Dmitri
>
> On Fri, Oct 30, 2009 at 11:40 AM, nEx.Software 
> > wrote:
>
> > Hold up... I'm confused. Are you saying that Contacts portion of the
> > SDK is deprecated? Whatever happened to "stick to the SDK because
> > those are stable apis that won't break in future versions"? Very
> > disappointing...
>
> > On Oct 30, 11:12 am, Jeff Sharkey  wrote:
> > > Could you post the exact Uri you're passing to query()?  As the
> > > javadoc describes, you need to append a filter string to the
> > > CONTENT_FILTER_URI so it knows what to filter on.
>
> > > Uri lookupUri = Uri.withAppendedPath(PhoneLookup.CONTENT_URI,
> > phoneNumber);
>
> > > Also, you might be able to skip your second step, since you can
> > > directly ask for the PhoneLookup.DISPLAY_NAME column in the
> > > projection.
>
> > > j
>
> > > On Fri, Oct 30, 2009 at 8:05 AM, agirardello
>
> > >  wrote:
>
> > > > Dear all,
>
> > > > I'm trying to adapt my application (Personalytics) for the brand new
> > > > Android 2.0, however I'm facing an issue while accessing contacts'
> > > > phone numbers...
>
> > > > What I need to do is to retrieve the name associated to a stored
> > > > contact based on his/her phone number. At present I'm doing this in
> > > > two steps:
> > > > 1) from a phone number I get the corresponding ID of the stored
> > > > contact (if present)
> > > > 2) I retrieve the contact's name based on that ID
>
> > > > I managed to use the correct CONTENT_URI for reading contacts by using
> > > > reflection to be fully compatible with Android 2.0
> > > > (ContactsContract.Contacts.CONTENT_URI) and the previous versions
> > > > (People.CONTENT_URI).
>
> > > > Now I'm trying to do the same for Phones.CONTENT_URI (Android <= 1.6)
> > > > and ContactsContract.PhoneLookup.CONTENT_FILTER_URI (Android = 2.0)
> > > > which is needed by step 2) mentioned above. But as soon as I try to
> > > > get a contentResolver by using
> > > > ContactsContract.PhoneLookup.CONTENT_FILTER_URI I get the following
> > > > exception:
>
> > > > java.lang.IllegalArgumentException: Unknown URL
> > content://com.android.contacts/phone_lookup
>
> > > > This looks really strange to me, since it should be correct (it is
> > > > part of the official API)! Moreover, I tried to look at the "API
> > > > Demos" project, in particular to the classes:
>
> > > > com.example.android.apis.view.List2
> > > > com.example.android.apis.view.List3
>
> > > > which are still using the deprecated People.CONTENT_URI and
> > > > Phones.CONTENT_URI and thus no data (i.e. contacts) is loaded (of
> > > > course I have sample contacts in the emulator).
>
> > > > - Do you have any suggestion to solve this problem?
> > > > - Or is there another approach I can use to get the name of a contact
> > > > based on one of his/her numbers? (This must work on all versions of
> > > > Android)
>
> > > > Thank you ;-)
>
> > > > Andrea
>
> > > --
> > > Jeff Sharkey
> > > jshar...@android.com
> > --~--~-~--~~~---~--~~
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this g

[android-developers] Getting contact name from phone number in 1.5/1.6/2.0

2009-12-04 Thread ghassett
Hi -- the semi-standard way of getting a contact name from a phone
number is to use Contacts.Phones.CONTENT_FILTER_URL and append the
phone number, as in the following sample code.  This works fine on
Android 1.6, but not on 2.0 -- is there a way to perform this function
that works in all versions of the Android API?


private String getContactNameFromNumber(String number) {
// define the columns I want the query to return
String[] projection = new String[] {
Contacts.Phones.DISPLAY_NAME,
Contacts.Phones.NUMBER };

// encode the phone number and build the filter URI
Uri contactUri = Uri.withAppendedPath
(Contacts.Phones.CONTENT_FILTER_URL, Uri.encode(number));

// query time
Cursor c = getContentResolver().query(contactUri, projection, 
null,
null, null);

// if the query returns 1 or more results
// return the first result
if (c.moveToFirst()) {
String name = c.getString(c

.getColumnIndex(Contacts.Phones.DISPLAY_NAME));
return name;
}

// return the original number if no match was found
return number;
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] postBuffer and memcpy

2009-12-04 Thread Dianne Hackborn
Please post non-SDK questions to android-porting, thanks.

On Fri, Dec 4, 2009 at 1:40 PM, android-newbie  wrote:

> Hi
>
> I have a question.  Hope someone can help me out.  In my Camera
> Preview Application, when I post preview buffer to Surface Flinger via
> mSurface->postBuffer, does this cause a memory copy of data from
> preview buffer to Camera SurfaceView's buffer?
>
> Thanks for your help,
> an
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

[android-developers] Re: How can I use org.apache.harmony.luni.platform.OSNewtorkSystem in Android SDK ?

2009-12-04 Thread Farproc
"Permission denied (maybe missing INTERNET permission)"
This is very clear: open AndroidManifest.xml and add that use-
permission.

On Dec 4, 5:47 pm, 상상, 그 이상의 상상  wrote:
> Title: How can I use org.apache.harmony.luni.platform.OSNewtorkSystem
> in Android SDK ?
>
> I'm working with Android SDK 1.5. And I'm programming a application
> running on Android Emulator.
>
> This application used a library for communication using TCP/IP.
>
> In debug mode, when create a instance of
> org.apache.harmony.nio.internal.PipeImpl class a message that is
> "Permission denied (maybe missing INTERNET permission)" is thrown.
>
> 
> public PipeImpl() throws IOException {
> super();
> try {
> sink = new SinkChannelImpl(SelectorProvider.provider
> ());<< Here !
> source = new SourceChannelImpl(SelectorProvider.provider
> ());
> sink.finishConnect();
> source.accept();
> source.closeServer();
> } catch(IOException ioe){
> reset();
> throw ioe;
> } catch(RuntimeException e){
> reset();
> throw e;
> }
> }
> 
>
> As a result, source that is a field of
> org.apache.harmony.nio.interjal.SelectorImpl and which type is
> Pipe.SourceChannel is null. Because in a constructor of SelectotrImpl,
> Pipe returns null and null is set to source.
> 
> public SelectorImpl(SelectorProvider selectorProvider) {
> super(selectorProvider);
> try {
> Pipe mockSelector = selectorProvider.openPipe();
> sink = mockSelector.sink();
> source = mockSelector.source();
> <<-  Here !
> sourcefd = ((FileDescriptorHandler)source).getFD();
> source.configureBlocking(false);
> } catch (IOException e) {
> // do nothing
> }
> }
> 
>
> Finally, in SelectorImpl.prepareChannels(), NullPointerException is
> thrown.
> 
> private void prepareChannels() {
> readableFDs.add(sourcefd);
> List readChannelList = new
> ArrayList();
> readChannelList.add(source.keyFor(this));
> < List writeChannelList = new
> ArrayList();
> synchronized (keysLock) {
> for (Iterator i = keys.iterator(); i.hasNext
> ();) {
> SelectionKeyImpl key = (SelectionKeyImpl) i.next();
> key.oldInterestOps = key.interestOps();
> boolean isReadableChannel = ((SelectionKey.OP_ACCEPT |
> SelectionKey.OP_READ) & key.oldInterestOps) != 0;
> boolean isWritableChannel = ((SelectionKey.OP_CONNECT
> | SelectionKey.OP_WRITE) & key.oldInterestOps) != 0;
> SelectableChannel channel = key.channel
> ();
> if (isReadableChannel) {
> readChannelList.add(channel.keyFor(this));
> readableFDs.add(((FileDescriptorHandler)
> channel).getFD());
> }
> if (isWritableChannel) {
> writeChannelList.add(channel.keyFor(this));
> writableFDs.add(((FileDescriptorHandler)
> channel).getFD());
> }
> }
> }
> readableChannels = readChannelList.toArray(new SelectionKey
> [0]);
> writableChannels = writeChannelList.toArray(new SelectionKey
> [0]);
> readable = readableFDs.toArray(new FileDescriptor[0]);
> writable = writableFDs.toArray(new FileDescriptor[0]);
> }
> 
>
> Please, Help me
>
> I really really thank you for your 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] Re: Updates to the Android SDK

2009-12-04 Thread Raphael
For all of those who have the issue of 1.6_r2 not installing under
Windows: that's because Eclipse is locking the folder. The solution is
to close Eclipse and run the $SDK\tools\android.bat script directly.
Then 1.6_r2 will install correctly.

HTH
R/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Using multiple layouts for different screens.

2009-12-04 Thread Chris
Now that makes perfect sense. I was able to get the second activity to
show up. I have a lot to learn...haven't programmed in Java for
sometime and the Android is new to me. So...large learning curve to
overcome. Thanks...

On Dec 4, 5:37 pm, justinh  wrote:
> Chris,
>
> PageToBeOpened.class is a java class that has extended the Activity
> class, or one of it's direct or indirect subclasses (ListActivity,
> PreferenceActivity, etc)
>
> For example if you wanted to start a PreferenceActivity from activity
> XYZ:
>
> startActivity(new Intent(mContext, SearchPreferences.class));
>
> given:
>
> public class SearchPreferences extends PreferenceActivity { ... }
>
> On Dec 4, 5:20 pm, Chris  wrote:
>
> > Thanks Jeffrey... This is a newbie question.. the view you referenced
> > in the example is the view of the current activity. I don't follow the
> > PageToBeOpened.class. I am not sure of the proper syntax for this
> > parameter.
>
> > On Dec 4, 4:32 pm, Jeffrey  wrote:
>
> > > Here is code that you can pretty much copy/paste to get working.
>
> > > Button Whatever = (Button) findViewById(R.id.ButtonWhatever);
> > >                 Whatever.setOnClickListener(new View.OnClickListener() {
> > >                         public void onClick(View view) {
>
> > >                                 Intent myIntent = new 
> > > Intent(view.getContext(),
> > > PageToBeOpened.class);
> > >                                 startActivityForResult(myIntent, 0);
> > >                         }
> > >                 });
>
> > > On Dec 4, 12:44 pm, Romain Guy  wrote:
>
> > > > Hi,
>
> > > > To start another activity you should look at the method called
> > > > startActivity(). This can be used to start an activity based on an
> > > > Intent or by specifying a package name and a class name, which is
> > > > exactly what you want in your case.
>
> > > > On Thu, Dec 3, 2009 at 4:49 PM, Chris  wrote:
> > > > > Hi All,
>
> > > > > I am getting my feet wet developing software for the Android. My test
> > > > > app will have multiple screens (each having their own layout file).
> > > > > The main screen will direct the user to view the other screens based
> > > > > on user input. I kinda see this as layers of cake. Bottom layer being
> > > > > main; then you add and remove layers as the user makes UI inputs. The
> > > > > crazy trouble is how to view a second layer. I have created a second
> > > > > class which has its own onCreate method, which has its on
> > > > > setContentView(R.layout.secondlayer). This class extends Activity much
> > > > > like my primary class does. I have a click event on a button within
> > > > > the main layout. This button will instantiate the new second layer
> > > > > class which I have done. And that is where my story ends...I don't
> > > > > know what to do from this point. This is surely a newbie question...
> > > > > If someone has an example that would be extremely helpful...teach me
> > > > > to fish and I will be on my way...
>
> > > > > Thanks in Advance,
>
> > > > > Chris
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "Android Developers" group.
> > > > > To post to this group, send email to 
> > > > > android-developers@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > > android-developers+unsubscr...@googlegroups.com
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/android-developers?hl=en
>
> > > > --
> > > > Romain Guy
> > > > Android framework engineer
> > > > romain...@android.com
>
> > > > Note: please don't send private questions to me, as I don't have time
> > > > to provide private support.  All such questions should be posted on
> > > > public forums, where I and others can see and answer them

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


[android-developers] Re: Updates to the Android SDK

2009-12-04 Thread Sekhar
Well, if I check the file location for the adb.exe program in Task
Manager, it's showing as from the 1.6 r1 tools/ directory (I have the
SDK set as 1.6 r1 in Eclipse, that's it's launching that - if I change
to 1.5, it loads the adb.exe from 1.5 tools/, but that doesn't help).
And yes, I do have the tools at r4 already and I did disable antivirus
(AVG). But I'm just not able to get past the error. :(

On Dec 4, 1:50 pm, Xavier Ducrohet  wrote:
> adb isn't run from the 1.6 folder so that should have no impact.
>
> If you're having problem, I would suggest updating to the tools r4 first (or
> ADT 0.9.5) and then try 1.6_R2. The new SDK Manager is a better at dealing
> with this.
>
> Also, if you have an anti-virus you should temporarily disable it as it will
> prevent installation by locking folder that needs to be removed.
>
> Xav
>
>
>
>
>
> On Thu, Dec 3, 2009 at 11:05 PM, Sekhar  wrote:
> > I'm not able to update 1.6 r1 to 1.6 r2 in Eclipse on Windows, it's
> > throwing an error "A folder failed to be renamed or moved." Looks like
> > adb.exe that's running is preventing a move to temp. Anyone else
> > having this problem?
>
> > On Dec 3, 3:38 pm, Jason Chen  wrote:
> > > Hey, folks.
>
> > > Earlier today, we released updates to several different components in
> > > the Android SDK. Xav announced these updates via the Android
> > > Developers blog:
> >http://android-developers.blogspot.com/2009/12/android-sdk-updates.html.
> > > If you want to follow the blog via Twitter, you can now do so viahttp://
> > twitter.com/androiddev.
>
> > > In addition to the new tools and platforms, there's one other
> > > important change that I wanted to point out. We've added additional
> > > clarification to the docs about android:maxSdkVersion and what effects
> > > it might have on your app if you use it. You can see these details
> > > here:
> >http://developer.android.com/guide/topics/manifest/uses-sdk-element.h...
>
> > > Best,
>
> > > -Jason
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Xavier Ducrohet
> Android SDK Tech Lead
> Google Inc.
>
> Please do not send me questions directly. 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: Using multiple layouts for different screens.

2009-12-04 Thread justinh
Chris,

PageToBeOpened.class is a java class that has extended the Activity
class, or one of it's direct or indirect subclasses (ListActivity,
PreferenceActivity, etc)

For example if you wanted to start a PreferenceActivity from activity
XYZ:

startActivity(new Intent(mContext, SearchPreferences.class));

given:

public class SearchPreferences extends PreferenceActivity { ... }


On Dec 4, 5:20 pm, Chris  wrote:
> Thanks Jeffrey... This is a newbie question.. the view you referenced
> in the example is the view of the current activity. I don't follow the
> PageToBeOpened.class. I am not sure of the proper syntax for this
> parameter.
>
> On Dec 4, 4:32 pm, Jeffrey  wrote:
>
> > Here is code that you can pretty much copy/paste to get working.
>
> > Button Whatever = (Button) findViewById(R.id.ButtonWhatever);
> >                 Whatever.setOnClickListener(new View.OnClickListener() {
> >                         public void onClick(View view) {
>
> >                                 Intent myIntent = new 
> > Intent(view.getContext(),
> > PageToBeOpened.class);
> >                                 startActivityForResult(myIntent, 0);
> >                         }
> >                 });
>
> > On Dec 4, 12:44 pm, Romain Guy  wrote:
>
> > > Hi,
>
> > > To start another activity you should look at the method called
> > > startActivity(). This can be used to start an activity based on an
> > > Intent or by specifying a package name and a class name, which is
> > > exactly what you want in your case.
>
> > > On Thu, Dec 3, 2009 at 4:49 PM, Chris  wrote:
> > > > Hi All,
>
> > > > I am getting my feet wet developing software for the Android. My test
> > > > app will have multiple screens (each having their own layout file).
> > > > The main screen will direct the user to view the other screens based
> > > > on user input. I kinda see this as layers of cake. Bottom layer being
> > > > main; then you add and remove layers as the user makes UI inputs. The
> > > > crazy trouble is how to view a second layer. I have created a second
> > > > class which has its own onCreate method, which has its on
> > > > setContentView(R.layout.secondlayer). This class extends Activity much
> > > > like my primary class does. I have a click event on a button within
> > > > the main layout. This button will instantiate the new second layer
> > > > class which I have done. And that is where my story ends...I don't
> > > > know what to do from this point. This is surely a newbie question...
> > > > If someone has an example that would be extremely helpful...teach me
> > > > to fish and I will be on my way...
>
> > > > Thanks in Advance,
>
> > > > Chris
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Romain Guy
> > > Android framework engineer
> > > romain...@android.com
>
> > > Note: please don't send private questions to me, as I don't have time
> > > to provide private support.  All such questions should be posted on
> > > public forums, where I and others can see and answer them

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


Re: [android-developers] Re: WifiManager.getScanResults() reports out-fo-date values after AP settings changed.

2009-12-04 Thread Kevin Yuan
Thank u for your attention.
The fact is that I change the settings of wireless router, and reboot it.
But android sitll recognizes it as uncganged and WifiManager always reports
the old properties. This is really really bad for app that displays detailed
info of APs and intends to help users to optimize there AP settings. My
'Wifi Analyzer' is getting low reatings just because of this!!

On Dec 5, 2009 2:44 AM, "hongki park"  wrote:

I just guess, your changes need reboot.

or, partially restart the modem side.

2009/12/4 Farproc 

> > Nobody care? > > On Dec 4, 8:28 am, Farproc  wrote: >
> After changing the s...

-- You received this message because you are subscribed to the Google Groups
"Android Developers...

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

[android-developers] Re: Using multiple layouts for different screens.

2009-12-04 Thread Chris
Thanks Jeffrey... This is a newbie question.. the view you referenced
in the example is the view of the current activity. I don't follow the
PageToBeOpened.class. I am not sure of the proper syntax for this
parameter.

On Dec 4, 4:32 pm, Jeffrey  wrote:
> Here is code that you can pretty much copy/paste to get working.
>
> Button Whatever = (Button) findViewById(R.id.ButtonWhatever);
>                 Whatever.setOnClickListener(new View.OnClickListener() {
>                         public void onClick(View view) {
>
>                                 Intent myIntent = new 
> Intent(view.getContext(),
> PageToBeOpened.class);
>                                 startActivityForResult(myIntent, 0);
>                         }
>                 });
>
> On Dec 4, 12:44 pm, Romain Guy  wrote:
>
> > Hi,
>
> > To start another activity you should look at the method called
> > startActivity(). This can be used to start an activity based on an
> > Intent or by specifying a package name and a class name, which is
> > exactly what you want in your case.
>
> > On Thu, Dec 3, 2009 at 4:49 PM, Chris  wrote:
> > > Hi All,
>
> > > I am getting my feet wet developing software for the Android. My test
> > > app will have multiple screens (each having their own layout file).
> > > The main screen will direct the user to view the other screens based
> > > on user input. I kinda see this as layers of cake. Bottom layer being
> > > main; then you add and remove layers as the user makes UI inputs. The
> > > crazy trouble is how to view a second layer. I have created a second
> > > class which has its own onCreate method, which has its on
> > > setContentView(R.layout.secondlayer). This class extends Activity much
> > > like my primary class does. I have a click event on a button within
> > > the main layout. This button will instantiate the new second layer
> > > class which I have done. And that is where my story ends...I don't
> > > know what to do from this point. This is surely a newbie question...
> > > If someone has an example that would be extremely helpful...teach me
> > > to fish and I will be on my way...
>
> > > Thanks in Advance,
>
> > > Chris
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > Romain Guy
> > Android framework engineer
> > romain...@android.com
>
> > Note: please don't send private questions to me, as I don't have time
> > to provide private support.  All such questions should be posted on
> > public forums, where I and others can see and answer them

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


Re: [android-developers] Re: Updates to the Android SDK

2009-12-04 Thread Xavier Ducrohet
adb isn't run from the 1.6 folder so that should have no impact.

If you're having problem, I would suggest updating to the tools r4 first (or
ADT 0.9.5) and then try 1.6_R2. The new SDK Manager is a better at dealing
with this.

Also, if you have an anti-virus you should temporarily disable it as it will
prevent installation by locking folder that needs to be removed.

Xav

On Thu, Dec 3, 2009 at 11:05 PM, Sekhar  wrote:

> I'm not able to update 1.6 r1 to 1.6 r2 in Eclipse on Windows, it's
> throwing an error "A folder failed to be renamed or moved." Looks like
> adb.exe that's running is preventing a move to temp. Anyone else
> having this problem?
>
> On Dec 3, 3:38 pm, Jason Chen  wrote:
> > Hey, folks.
> >
> > Earlier today, we released updates to several different components in
> > the Android SDK. Xav announced these updates via the Android
> > Developers blog:
> http://android-developers.blogspot.com/2009/12/android-sdk-updates.html.
> > If you want to follow the blog via Twitter, you can now do so viahttp://
> twitter.com/androiddev.
> >
> > In addition to the new tools and platforms, there's one other
> > important change that I wanted to point out. We've added additional
> > clarification to the docs about android:maxSdkVersion and what effects
> > it might have on your app if you use it. You can see these details
> > here:
> http://developer.android.com/guide/topics/manifest/uses-sdk-element.h...
> >
> > Best,
> >
> > -Jason
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

Please do not send me questions directly. 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: Help starting second activity from the main activity on button click

2009-12-04 Thread Chris
Thanks, I will review the text. I will also check out the source.
Thanks for the reply.

On Dec 4, 4:35 pm, justinh  wrote:
> It's a really good idea to read Application Fundamentals, where you
> would find:http://developer.android.com/guide/topics/fundamentals.html#acttask
>
> You can also see several examples of this being done in the Android
> source available here:http://android.git.kernel.org/
>
> On Dec 4, 4:10 pm, Chris  wrote:
>
> > Need an example of how to create/start a new activity from the main
> > activity. I have a button click event on the main layout. Originally I
> > just used setContentView(R.layout.secondactivity); which brings up the
> > layout but I don't think that is correct since the secondactivity
> > class is not instantiated at this point yet. I have looked for such an
> > example and can not find one.
>
> > Help please,
>
> > Thanks
>
> > Chris

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


[android-developers] Re: calling finish() on a subactivity

2009-12-04 Thread mrloz
If you start activity B with an intent like so:

Intent i=new Intent(ActivityA.this, ActivityB.class);
startActivity(i);

You should be able to simply put finish() after startActivity like so:

...
startActivity(i);
finish();

Should work exactly as you state.  The launch of activity B pauses A
and when B 'returns' it should continue where it left off.

On Dec 3, 8:08 pm, Ampereo  wrote:
> I don't know why this is becoming such a problem for me when it seems
> like it should be relatively easy.
> I have an activity A that starts a new activity B with startActivity.
> A has a process running while B is up and when that process is done I
> want A to call finish() on B. If anybody could help me out that would
> be great. 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] WebView.loadData(), encoding? missing chars?

2009-12-04 Thread Jeffrey Blattman
this code,
 ...
 s = "\u02c8\u0254\u0279\u0292\u0259";
 mWebView.loadDataWithBaseURL("fake://", s, "text/html", 
"utf-8", "about:blank");

results in garbage chars in the web view,



in the debugger. i actually read the string from somewhere else using 
utf-8 encoding, so it must be a utf-8 encoded string.

printed to the terminal, the string looks correct.



the string

\u00e6\u00f8\u00e5

passed to the webview renders the correctly. i'm pretty confused about 
what's going on. it appears that i am correctly passing the string to 
the webview as the second string renders correctly. could the engine 
behind the webview be missing a mapping for some utf-8 characters? i'm 
not even sure if that question makes sense.

and ideas are appreciated.

-- 

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

[android-developers] postBuffer and memcpy

2009-12-04 Thread android-newbie
Hi

I have a question.  Hope someone can help me out.  In my Camera
Preview Application, when I post preview buffer to Surface Flinger via
mSurface->postBuffer, does this cause a memory copy of data from
preview buffer to Camera SurfaceView's buffer?

Thanks for your help,
an

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Help starting second activity from the main activity on button click

2009-12-04 Thread justinh
It's a really good idea to read Application Fundamentals, where you
would find: http://developer.android.com/guide/topics/fundamentals.html#acttask

You can also see several examples of this being done in the Android
source available here: http://android.git.kernel.org/

On Dec 4, 4:10 pm, Chris  wrote:
> Need an example of how to create/start a new activity from the main
> activity. I have a button click event on the main layout. Originally I
> just used setContentView(R.layout.secondactivity); which brings up the
> layout but I don't think that is correct since the secondactivity
> class is not instantiated at this point yet. I have looked for such an
> example and can not find one.
>
> Help please,
>
> Thanks
>
> Chris

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


[android-developers] Re: Using multiple layouts for different screens.

2009-12-04 Thread Jeffrey
Here is code that you can pretty much copy/paste to get working.

Button Whatever = (Button) findViewById(R.id.ButtonWhatever);
Whatever.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {

Intent myIntent = new Intent(view.getContext(),
PageToBeOpened.class);
startActivityForResult(myIntent, 0);
}
});

On Dec 4, 12:44 pm, Romain Guy  wrote:
> Hi,
>
> To start another activity you should look at the method called
> startActivity(). This can be used to start an activity based on an
> Intent or by specifying a package name and a class name, which is
> exactly what you want in your case.
>
>
>
>
>
> On Thu, Dec 3, 2009 at 4:49 PM, Chris  wrote:
> > Hi All,
>
> > I am getting my feet wet developing software for the Android. My test
> > app will have multiple screens (each having their own layout file).
> > The main screen will direct the user to view the other screens based
> > on user input. I kinda see this as layers of cake. Bottom layer being
> > main; then you add and remove layers as the user makes UI inputs. The
> > crazy trouble is how to view a second layer. I have created a second
> > class which has its own onCreate method, which has its on
> > setContentView(R.layout.secondlayer). This class extends Activity much
> > like my primary class does. I have a click event on a button within
> > the main layout. This button will instantiate the new second layer
> > class which I have done. And that is where my story ends...I don't
> > know what to do from this point. This is surely a newbie question...
> > If someone has an example that would be extremely helpful...teach me
> > to fish and I will be on my way...
>
> > Thanks in Advance,
>
> > Chris
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them

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


[android-developers] Re: Upgradint ADT plugin in Eclipse problem

2009-12-04 Thread sbruno74
Sorry, I have Eclipse Galileo, not Ganymede.

On Dec 4, 10:04 am, sbruno74  wrote:
> Hello all,
>
> I have just updated my ADT plugin in Eclipse Ganymede to latest
> version of Android SDK. But, after having downloaded the updates,
> applied changes, restarted Eclipse, the Android SDK no longer loads.
> The Android project option in New Project disappeared. It is the
> second time that happens to me. Every time that I update the ADT
> plugin, it no longer loads in Eclipse.
>
> I also noticed the same issue after having tried to also install the
> plugin for Blackberry development. After the install, all Android
> related features disappear. When I try to reinstall the Android DDMS
> and Android development tools again, it says it is already installed.
>
> Is there an easy way to resolve the issue without having to reinstall
> everything again from scratch?
>
> I run Windows Vista Ultimate, Eclipse Ganymede, if that can help.
>
> Stépane

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: TabActivity crash

2009-12-04 Thread ben
I've also tried changing it to just a normal activity and implementing
the Hello, TabWidget example and doing nothing else other than return
the widget configuration result. And I still get the same crash. Could
it possibly have to do with using tabs in a widget configure activity.
I'm not sure why that would make much of a difference.



On Dec 4, 11:50 am, ben  wrote:
> I'm trying to create a tabbed view in my widget configure activity.
> I'm using a tab activity as my activity type and I have the following
> code.
>
>                 tabHost = getTabHost();
>                 tabHost.setup();
>
>                 this.setTitle(getString(R.string.configure_widget));
>
>                 tabHost.addTab(tabHost.newTabSpec("test")
>                                 .setIndicator("test")
>                                 .setContent(new Intent(this, 
> LocationListActivity.class)));*/
>                 TabHost.TabSpec locationTab = tabHost.newTabSpec(getString
> (R.string.widget_location));
>
>                 locationTab.setContent(new TabHost.TabContentFactory()
>                         {
>                                 public View createTabContent(String tag)
>                                 {
>                                         createLocationTab();
>                                         if( 
> !getIntent().getExtras().getBoolean( getString
> ( R.string.intent_extra_configure ) ) )
>                                         {
>                                                 createWidgetCreateControl();
>                                         }
>                                         return locationView;
>                                 }
>
>                         });
>                 locationTab.setIndicator(getString(R.string.widget_location));
>
>                 tabHost.addTab(locationTab);
>
> createLocationTab is a simple function that creates a basic scroll
> view with 1 text view and 1 button. Location view is a class member
> variable that holds the view that createLocationTabs creates. When I
> try to create a widget though it crashes periodically.
>
> The ddms log says it's a null pointer exception on line 292 of
> TabHost.java. I checked the android source and it seems that current
> view is null. Does anyone know what would cause this crash?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 starting second activity from the main activity on button click

2009-12-04 Thread Chris
Need an example of how to create/start a new activity from the main
activity. I have a button click event on the main layout. Originally I
just used setContentView(R.layout.secondactivity); which brings up the
layout but I don't think that is correct since the secondactivity
class is not instantiated at this point yet. I have looked for such an
example and can not find one.

Help please,

Thanks

Chris

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


[android-developers] Re: Best practice for P2P handset networking

2009-12-04 Thread Al
The developer of Light Racer 3D posted some interesting information on
his blog, that might be handy to look at:
http://www.rbgrn.net/content/293-light-racer-20-days-35-40-multiplayer-host-and-join

StevieT wrote:
> I've been scouring the web looking for information on setting up a
> peer-to-peer connection between Android handsets and so far have drawn
> a blank. The only thing I can definitively seem to work out is that it
> was made a whole lot more difficult when XMPP was removed from 1.0.
> Apart from that, I find a couple of threads on an OpenIntents board
> about porting an XMPP implementation to Android that were last posted
> nearly 2 years ago.
>
> Has anybody solved this problem effectively? What's the best way of
> doing it (from a games point of view)?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 capture key events with a window-less activity

2009-12-04 Thread Dianne Hackborn
On Fri, Dec 4, 2009 at 12:31 PM, bizack  wrote:

> I would agree with you.  I think the problem (or misunderstanding on
> my behalf) is that trying to call getWindowManager().addView outside
> of onCreate orphans the Window (getWindow() returns null).
>

No it definitely doesn't.  For example, dialogs and pop-up windows all use
this, and they work fine if called in onCreate or elsewhere.  You must be
doing something else to cause getWindow() to return null...  though I
honestly can't imagine what, since mWindow (which Activity.getWindow()
returns) is set in activity.attach() (which is called before onCreate()),
and never set to null after that.

Also I would strongly strongly recommend using Dialog instead of directly
adding a view to the window manager, especially if this window is going to
receive key events, because Dialog implements a lot of the common
framework-side higher-level behavior for windows...  such as, for example,
default key event handling.

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

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

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

[android-developers] Re: Can other applications use the share function of "Facebook for Android"?

2009-12-04 Thread theSmith
Unfortunately yes, it would be a huge pain to create your own client
to update a facebook status.
If you really wanted to you could ask the Bloo guys how they did it,
or try bugging the hell out of the official facebook team to give us
some Intents that work correctly.


On Dec 4, 12:07 pm, Wouter  wrote:
> All the other apps except of facebook and bloo (facebook) are working
> with my EXTRA_TEXT.
> Really sucks that this isn't working for facebook. And it's a lot of
> work to make facebook client to post status update?
>
> Wouter
>
> On Dec 4, 5:38 pm, theSmith  wrote:
>
> > Im using this
> >       chooseIntent.setType("text/*");
>
> > while this will cause the facebook app to show up (and bloo for that
> > matter), the apps dont respond to the EXTRA_TEXT the way they should.
> > Basicly the facebook app opens and tries to post, but fails.  Since I
> > can't find any documentation for the facebook app's intents I'm stuck
> > with a broken app at the moment.
>
> > On Dec 4, 11:05 am, Wouter  wrote:
>
> > > Ok I am using also the intentChooser like this
>
> > >                                 Intent t = new Intent(Intent.ACTION_SEND);
> > >                                 t.setType("text/plain");
> > >                                 t.putExtra(Intent.EXTRA_TEXT, "test");
> > >                 t.putExtra(Intent.EXTRA_SUBJECT,"found this great
> > > trip");
> > >                                 t.addCategory(Intent.CATEGORY_DEFAULT);
> > >                                 Intent share = 
> > > Intent.createChooser(t,"Share with others");
> > >                                 startActivity(share);
>
> > > It opens mail and messaging correcty with the text.
>
> > > What do you mean with implement it this way?
>
> > > On Dec 4, 4:51 pm, theSmith  wrote:
>
> > > > Im not using intents here actually, its the intent chooser with a type
> > > > of "text/*" that will display it in the chooser's menu.  But again it
> > > > doesn't work correctly so you really have to reason to implement it
> > > > this way.
>
> > > > On Dec 4, 10:48 am, Wouter  wrote:
>
> > > > > Could you tell me which intents you have used to share via facebook.
> > > > > i'm also looking for this and share via twitter, ...
>
> > > > > Thanks,
>
> > > > > Wouter
>
> > > > > On Nov 27, 7:43 am, theSmith  wrote:
>
> > > > > > My application is able to detect thefacebookapp (if its installed)
> > > > > > and will attempt toshareviafacebook.
> > > > > > But thats as far as I've gotten.  The mobile.facebook.com site opens
> > > > > > and tells me it couldn'tsharemy link.
>
> > > > > > Ultimately this is theFacebookapps problem, as far as I know there
> > > > > > is no documentation for its Intents and this is the limiting factor
> > > > > > for me.
>
> > > > > > -theSmith
>
> > > > > > On Oct 28, 6:08 am, feeling3_4  wrote:
>
> > > > > > > Hi, guys
>
> > > > > > > "Facebookfor Android" is great, but I just wonder that whether my
> > > > > > > application can use thesharefunction of it. Or, does the 
> > > > > > > ""Facebook
> > > > > > > for Android"" release some apis and let other applications use the
> > > > > > > built in functions like "share" or "feed"?
>
> > > > > > > Any advice is greatly 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


Re: [android-developers] Re: Saving service killing without "startForeground"

2009-12-04 Thread Nick Ladhani
Thanks Mark and Dianne for your inputs. I will keep that in mind.

~Nick

On Fri, Dec 4, 2009 at 2:12 PM, Dianne Hackborn  wrote:

> On Fri, Dec 4, 2009 at 9:45 AM, Nick  wrote:
>
>> I also wanted to start the same service once the package was
>> installed. I tried using the PACKAGE_ADDED, PACKAGE_CHANGED intents
>> but I guess the newly installed package does not receive these
>> intents. Can any one point to another strategy for starting up my
>> service after my package installation?
>
>
> No, you deliberately must wait for the user to launch your app.
>
>
>> An alternative would be to
>>
>> "force phone re-boot" after the package is installed (obviously after
>> giving the choice to the user if he wants to continue or not) but I
>> dont know how to force that either.
>>
>
> Good ghod, no.  Reason #78 why there should be no API for -that-. :p
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 capture key events with a window-less activity

2009-12-04 Thread bizack
I would agree with you.  I think the problem (or misunderstanding on
my behalf) is that trying to call getWindowManager().addView outside
of onCreate orphans the Window (getWindow() returns null).
setContentView is just a shortcut for getWindow().setContentView() as
you've mentioned.  I'd post the code, but for the time being, it's not
open to the public (or this forum at least).  Your Android team has my
code actually.  Feel free to review it with them if interested.
Thanks for the feedback.  Appreciate it.

On Dec 4, 12:06 pm, Dianne Hackborn  wrote:
> On Fri, Dec 4, 2009 at 11:44 AM, bizack  wrote:
> > So the solution (or the problem) is don't use getWindowManager
> > ().addView(view, params) if you want to capture key events.
> > Your Window will be null.  Your key events will go to Android Heaven.
> > I'd think this was a bug or undesired behavior, but that's just
> > personal opinion.
>
> I'm not sure where you get that.  This is how all windows get added to the
> window manager.  Whether they get key events depends on a lot of things --
> their flags, their z-order, their window type, etc.
>
> You can use "adb shell dumpsys window" to see the current state of the
> window manager, including which window has focus.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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


[android-developers] Re: wvga854 avd screen size problem?

2009-12-04 Thread Jeffrey
I am having the same issue, except that I can't get the proper
resolution to appear at all (image 2 I believe). And my changes aren't
being represented on the AVD unless I uninstall the app from it and
THEN run it on the emulator. Does anyone know how to fix this?

On Nov 27, 9:29 am, feeling3_4  wrote:
> Pieter, thank you for your reply.
>
> I am a little confused here. please see the two images below
>
> http://www.screencast.com/t/ZGZlZjVhO(this one iswvga854avd under
> Mac os + android skd 2.0)http://www.screencast.com/t/NTYzYmJh(this 
> iswvga854avd under
> Windows + android sdk 2.0)
>
> Why the density between the two avds are so different? and under the
> windows, the screen size is 480*854
>
> On Nov 27, 8:06 pm, Pieter  wrote:
>
>
>
> > You app probably runs in "compatibility mode", presenting a lower
> > "virtual" resolution and then scaling all graphics up to the actual
> > device resolution. For more information, see the "supports-screens"
> > manifest element:http://developer.android.com/sdk/android-1.6.html
> > and:http://developer.android.com/guide/topics/manifest/supports-screens-e...
>
> > The abundance of Android phones is something we (as Android
> > developers) have to live with. I think of it as a mixed blessing:
> > because of the many Android phones the target audience is much bigger
> > than would be the case with a single phone. Because of this the
> > Android platform has a fighting chance to become one of the dominant
> > mobile platforms. Only then Android can become a viable platform for
> > profitable software development.
>
> > On Nov 27, 7:21 am, feeling3_4  wrote:
>
> > > Hi, all
>
> > >   I have a problem with thewvga854avd screen size.  When my
> > > application running on this avd, it does not use the layout-hdpi-v6,
> > > but uses the layout-mdpi-v6.
>
> > >   To make it clearer, I add the below code. it prints that the screen
> > > size of thewvga854avd is 320x569 ! Why?
>
> > >                 Display display = ((WindowManager) getSystemService
> > > (Context.WINDOW_SERVICE)).getDefaultDisplay();
> > >                 int device_width = display.getWidth();
> > >                 int device_height = display.getHeight();
> > >                 Log.i("screen", "device width is " + device_width);
> > >                 Log.i("screen", "device height is " + device_height);
>
> > > My develop environment is Mac ox + android 2.0 sdk.
>
> > > I begin to suffer more and more pain of these problems... does it have
> > > to have so many different kinds of android phones on the world?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 know if the device is to be powered off

2009-12-04 Thread jotobjects
Or drops it in the swimming pool.  Or the Server crashes.  We could go
on...

On Dec 4, 12:07 pm, Dianne Hackborn  wrote:
> Or just pull out the battery!  This probably happens more than you would
> think.
>
>
>
> On Fri, Dec 4, 2009 at 11:48 AM, jotobjects  wrote:
> > Ultimately it is not a good design to require log off.  What if the
> > user goes into a building where there is no reception and it is not
> > possible to contact the server?
>
> > On Dec 4, 12:33 am, Zhihong GUO  wrote:
> > > Hi All,
>
> > > My application want to know the device is to be power off, so that it can
> > > send out the logout message to the server.
>
> > > How to do that?
>
> > > Thanks a lot.
>
> > > James
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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


Re: [android-developers] Re: Who do you consider as the Android mobile Apps developers Guru ?

2009-12-04 Thread Mark Murphy
> Hey, just because they have the most posts doesn't mean the
> information they provide is accurate. Quantity != Quality =)

I completely agree. I'm figuring that 2,000 of my posts are mindless drivel.

And, with this post, make that 2,001.

;-)

> Just kidding, really. I've read your posts many times and find them
> useful even when I don't respond, thanks a lot!

You're very welcome!

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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


Re: [android-developers] Re: Saving service killing without "startForeground"

2009-12-04 Thread Dianne Hackborn
On Fri, Dec 4, 2009 at 9:45 AM, Nick  wrote:

> I also wanted to start the same service once the package was
> installed. I tried using the PACKAGE_ADDED, PACKAGE_CHANGED intents
> but I guess the newly installed package does not receive these
> intents. Can any one point to another strategy for starting up my
> service after my package installation?


No, you deliberately must wait for the user to launch your app.


> An alternative would be to
> "force phone re-boot" after the package is installed (obviously after
> giving the choice to the user if he wants to continue or not) but I
> dont know how to force that either.
>

Good ghod, no.  Reason #78 why there should be no API for -that-. :p

-- 
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] Re: how to know if the device is to be powered off

2009-12-04 Thread Dianne Hackborn
Or just pull out the battery!  This probably happens more than you would
think.

On Fri, Dec 4, 2009 at 11:48 AM, jotobjects  wrote:

> Ultimately it is not a good design to require log off.  What if the
> user goes into a building where there is no reception and it is not
> possible to contact the server?
>
> On Dec 4, 12:33 am, Zhihong GUO  wrote:
> > Hi All,
> >
> > My application want to know the device is to be power off, so that it can
> > send out the logout message to the server.
> >
> > How to do that?
> >
> > Thanks a lot.
> >
> > James
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

[android-developers] Re: how to know if the device is to be powered off

2009-12-04 Thread justinh
http://developer.android.com/reference/android/content/Intent.html#ACTION_SHUTDOWN

Never used it though so I can't say anything more about it.

On Dec 4, 3:33 am, Zhihong GUO  wrote:
> Hi All,
>
> My application want to know the device is to be power off, so that it can
> send out the logout message to the server.
>
> How to do that?
>
> Thanks a lot.
>
> James

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


[android-developers] Re: Problem with new ADT Plugin

2009-12-04 Thread sbruno74
A system restart did not correct the problem for me. I still can't
create an Android project, let alone run an Android app. Help!!

On Dec 4, 12:36 am, "Dexter's Brain"  wrote:
> Never mind, A system re-start made my day ...
>
> On Dec 4, 10:18 am, "Dexter's Brain"  wrote:
>
>
>
> > Hi,
>
> > I just upgraded my plugin from 0.9.4 to 0.9.5 and restarted eclipse,
> > and none of the plugin views/icons or perspective are now here. It
> > seems, everything has been deleted.
>
> > There's not even an option to create a new Android Project. In the
> > preferences, there's nothing called Android.
> > I need help
>
> > :(
>
> > Kumar Bibekhttp://tech-droid.blogspot.com

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


Re: [android-developers] Re: how to capture key events with a window-less activity

2009-12-04 Thread Dianne Hackborn
On Fri, Dec 4, 2009 at 11:44 AM, bizack  wrote:

> So the solution (or the problem) is don't use getWindowManager
> ().addView(view, params) if you want to capture key events.
> Your Window will be null.  Your key events will go to Android Heaven.
> I'd think this was a bug or undesired behavior, but that's just
> personal opinion.
>

I'm not sure where you get that.  This is how all windows get added to the
window manager.  Whether they get key events depends on a lot of things --
their flags, their z-order, their window type, etc.

You can use "adb shell dumpsys window" to see the current state of the
window manager, including which window has focus.

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

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

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

[android-developers] Re: Who do you consider as the Android mobile Apps developers Guru ?

2009-12-04 Thread justinh
Hey, just because they have the most posts doesn't mean the
information they provide is accurate. Quantity != Quality =)

Just kidding, really. I've read your posts many times and find them
useful even when I don't respond, thanks a lot!

On Dec 4, 2:49 pm, "Mark Murphy"  wrote:
> > Go tohttp://groups.google.com/group/android-developers/about, it's
> > the top 2 most frequent poster Dianne Hackborn and Mark Murphy.
>
> Great googly moogly!
>
> I've never actually gone to that page before. This is my 3,236th post?
>
> > and the
> > other gets payed by us when you buy his very reasonably priced books
> > or digital subscription.
>
> Either that, or I moonlight as the president/CEO of the Green Bay Packers.
> Though that Mark Murphy has *much* better hair.
>
> > End plug.
>
> Thanks for the plug!
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html

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


[android-developers] Re: CDMA home carrier

2009-12-04 Thread gudujarlson
> But don't get me started on Android 2.0 and this CDMA stuff. Example:
> the CdmaCellLocation has two methods (getBaseStationLatitude() &
> getBaseStationLongitude()) which, judging from the name return the LAT/
> LON of the site. Great, I'm thinking until I look at the datatype and
> see that they are both INTs. Which, again, wouldn't be a problem if
> they said, "To get the decimal value divide by 1,000,000", but they
> don't. Another beautiful mystery is that onSignalStrengthChanged has
> been depracated, but they don't state what the replacement is.

Ya tell me about it. Signal strength is expressed in a made up unit
(ASU), stops updating when the screen turns off, and is artificially
capped at -63 dBm (at least on the G1). In the Android source code
there is a function for polling the signal strength, but it is not
exposed to the public. There is a open bug related to this:
http://code.google.com/p/android/issues/detail?id=700&q=RIL&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Who do you consider as the Android mobile Apps developers Guru ?

2009-12-04 Thread Mark Murphy
> Go to http://groups.google.com/group/android-developers/about, it's
> the top 2 most frequent poster Dianne Hackborn and Mark Murphy.

Great googly moogly!

I've never actually gone to that page before. This is my 3,236th post?

> and the
> other gets payed by us when you buy his very reasonably priced books
> or digital subscription.

Either that, or I moonlight as the president/CEO of the Green Bay Packers.
Though that Mark Murphy has *much* better hair.

> End plug.

Thanks for the plug!

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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


[android-developers] Re: how to know if the device is to be powered off

2009-12-04 Thread jotobjects
Ultimately it is not a good design to require log off.  What if the
user goes into a building where there is no reception and it is not
possible to contact the server?

On Dec 4, 12:33 am, Zhihong GUO  wrote:
> Hi All,
>
> My application want to know the device is to be power off, so that it can
> send out the logout message to the server.
>
> How to do that?
>
> Thanks a lot.
>
> James

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 capture key events with a window-less activity

2009-12-04 Thread bizack
So the solution (or the problem) is don't use getWindowManager
().addView(view, params) if you want to capture key events.
Your Window will be null.  Your key events will go to Android Heaven.
I'd think this was a bug or undesired behavior, but that's just
personal opinion.

On Dec 2, 11:12 pm, bizack  wrote:
> Is there a mechanism in place to basically force key events to a
> specific Activity?
>
> I think the problem is this Activity (it's actually at the platform
> level, but the question is relevant here) is modal, but not
> necessarily in focus.  This is by design.
>
> If the Application launched the Activity, who/what is receiving the
> key presses in this scenario?
>
> On Dec 2, 6:11 pm, Dianne Hackborn  wrote:
>
>
>
> > You can't forward events from one window to another.
>
> > On Wed, Dec 2, 2009 at 6:09 PM, bizack  wrote:
> > > Actually, I should clarify.
>
> > > I have an Activity, A.
> > > There's an Application, B, that is launched at any given point in
> > > time.
> > > Application B launches Activity C (on top of Activity A, but Activity
> > > C is flagged with FLAG_NOT_TOUCH_MODAL).
> > > The Application B is never visible, never in focus (and obviously has
> > > no onKeyUp or onKeyDown methods).
> > > I'm returning key events from Activity C via super.onKeyUp and
> > > super.onKeyDown.
> > > However, my Activity C is never receiving any key events (and
> > > apparently Activity A no longer receives key events when Application B
> > > is launched).
>
> > > I'm assuming the key events are getting thrown up into the system and
> > > landing... somewhere.
>
> > > So... how do I forward key events to Activity C from Activity A while
> > > an Application B is running?  I hope this isn't too confusing... but
> > > I'm assuming someone's run into this problem before.
>
> > > Thanks.
>
> > > On Dec 2, 4:44 pm, bizack  wrote:
> > > > I have an Activity which has no window (but it has a view).
>
> > > > I'm using:
> > > > getWindowManager().addView(view, params);
>
> > > > I've attempted to call takeKeyEvents(true), however I see that
> > > > takeKeyEvents first retrieves the Window and then calls takeKeyEvents
> > > > on that Window.  In my case, the Window is null.
>
> > > > What this means is that I never receive onKeyUp and onKeyDown calls,
> > > > which I need in order to intercept some key presses from external
> > > > input devices (similar to a handsfree set for example).
>
> > > > Any hints as to how I would accomplish this?
>
> > > > Thanks.
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com > >  cr...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
>
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see and
> > answer them.

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


[android-developers] Re: Memory usage problem - leak?

2009-12-04 Thread jotobjects


On Dec 4, 9:33 am, Romain Guy  wrote:
> From your observations it seems like the split() method works in a
> similar way and causes you to keep a reference to the original
> response data. You can try to fix this by replacing your fields[*]
> statements with new String(fields[*]). This will create copies that
> won't share the original response data.
>
There are two questions here - is the response object still referenced
somewhere (can't tell from the information provided) and is the
underlying character array still referenced by the sub String
objects.  The String class is pretty intelligent about lazy creation
of the underlying character array.  You might even have to do
something like new String(fields[x].toCharArray()).  This is going to
be expensive for both time and memory (duplicates the underlying
characters) so you would not normally do this.

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


[android-developers] Re: Who do you consider as the Android mobile Apps developers Guru ?

2009-12-04 Thread Matt Kanninen
Go to http://groups.google.com/group/android-developers/about, it's
the top 2 most frequent poster Dianne Hackborn and Mark Murphy.  The
both are rated 4 stars with over 200 ratings!

One gets paid by google to, among other things, Guru for us, and the
other gets payed by us when you buy his very reasonably priced books
or digital subscription.

End plug.


On Dec 4, 6:18 am, Ellimac  wrote:
> If you had to suggest 2 to 3 names of Android Gurus, who will you
> suggest?
> What lead you to these choices?
>
> Would you like to be able to chat with them?
>
> Ellimac

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: HTML sanitization

2009-12-04 Thread Matt Kanninen
http://d.android.com/reference/android/text/Html.html

This lets you put sanitized html content into a textview.  It's great
for clickable links or styled text with inline images if you aren't
too picky about where the image ends up.   It's going to basically
treat each image as a character in the textfield, in terms of how it
looks.

The sanitized html is returned as a Spanned:

http://d.android.com/reference/android/text/Spanned.html

which is a really useful class, and this is a good way to start using
it.  Often if I want to display simple stylized text the easiest way I
can find is to create some simple html, and use the above method.

It's weak on properly wrapping text around the images, you can have
one line of text to the left and or right of an image, but you can't
wrap multiple lines around, so a lot of white space will be created
with tall images.

-My 2 cents

On Dec 4, 1:02 am, Samuh  wrote:
> > The best way I can think of getting around this problem
> > would be showing your HTML content inside a WebView. :)
>
> Thanks for your reply Bibek. That is exactly what I am currently
> doing.
>
> However, I think a WebView would definitely be heavier than a
> TextView. Assuming, I receive say 20 items in the feed wouldn't
> creating 20 WebView instances affect the memory footprint of the
> module?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Privacy concerns using Android NETWORK_PROVIDER?

2009-12-04 Thread BillS
I know when Google's Maps for mobile with My Location came out that
Google was "secretly" obtaining the location of its users to create
its tower database. I'm wondering if that is still the case when using
Android's network location provider to obtain location information
when GPS is not available?

Thanks in advance!
BillS

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Saving service killing without "startForeground"

2009-12-04 Thread Mark Murphy
> I will try your suggestion.
> For second question, when my activity starts there is an involved process
> of
> initializing bunch of items which requires few seconds. Hence I wanted to
> initialize these via a service on BOOT_COMPLETE (working for me already)
> or
> on the package installation (which I am trying to figure out). This way
> when
> the activity is started by the user there wont be any wait.

Just show a ProgressDialog, ProgressBar, title bar progress indicator,
animated ImageView, or something, and do the initialization in the
activity. Or, find ways to initialize the items progressively, such that
you can start some the main functionality after a fraction of the
initialization time. Or, spend more time optimizing the initialization
process.

To put it another way: if you find a way to auto-start your application
without user involvement for the first run, that will probably be
considered a security hole. Android goes out of its way to make sure that
users run the app the first time, even if after that the app can arrange
for scheduled tasks and the like.

I am similarly concerned by your BOOT_COMPLETED strategy. Adding seconds
of time to the boot process is bad for Android, even if you think it may
be good for your app. Bear in mind that BOOT_COMPLETED is a slight
misnomer, and there is a bunch of other stuff going on then (e.g., home
screen launching, radios turning on), that your initialization logic will
be impeding.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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


Re: [android-developers] Re: Capture key events while in background

2009-12-04 Thread Mark Murphy

> Is there a list of these buttons somewhere?

The "media button" (on headsets) and the camera button are the only two
that send a broadcast Intent, according to the documentation on the Intent
class.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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


Re: [android-developers] Modify voice data before it's sent

2009-12-04 Thread Mark Murphy
> Is it possible to modify the voice data before it's sent to the radio?

Not from the SDK. Perhaps if you hack the firmware there is a way.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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


Re: [android-developers] Re: Saving service killing without "startForeground"

2009-12-04 Thread Nick Ladhani
Thanks Mark
Ok so for the first issue (stopping service) I will try your suggestion.
For second question, when my activity starts there is an involved process of
initializing bunch of items which requires few seconds. Hence I wanted to
initialize these via a service on BOOT_COMPLETE (working for me already) or
on the package installation (which I am trying to figure out). This way when
the activity is started by the user there wont be any wait.

~Nick

On Fri, Dec 4, 2009 at 12:50 PM, Mark Murphy wrote:

> > I had a similar issue. What I wanted to do was to run a short service
> > on boot up and initialize a few items and then stop the service. I
> > understand that its not a good idea to leave the service running for
> > the entire life-cycle of the phone. I was able to achieve this by
> > creating a broadcast receiver and starting my service (and do some
> > post delay items). I still need to figure out how to stop the service
> > part. Please chime in if any one has any comments on this.
>
> I do not know what you mean by "how to stop the service part". If a
> service wants to stop itself, it can call stopSelf().
>
> > Can any one point to another strategy for starting up my
> > service after my package installation?
>
> Let the user start it by launching your activity.
>
> > An alternative would be to
> > "force phone re-boot" after the package is installed (obviously after
> > giving the choice to the user if he wants to continue or not) but I
> > dont know how to force that either. Any ideas how to achieve that?
>
> You can't reboot the phone programmatically, unless you are part of the
> firmware, AFAIK.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com
> Android App Developer Books: http://commonsware.com/books.html
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] calling finish() on a subactivity

2009-12-04 Thread Mark Murphy
> I don't know why this is becoming such a problem for me when it seems
> like it should be relatively easy.
> I have an activity A that starts a new activity B with startActivity.
> A has a process running while B is up and when that process is done I
> want A to call finish() on B. If anybody could help me out that would
> be great.

Why have Activity B? Why not keep it all in Activity A?

For example, if you are trying to do a progress indicator, use a
ProgressDialog, or ProgressBar, or a progress indicator in the title bar,
or an animated ImageView, in Activity A.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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


Re: [android-developers] Re: Listview inside ScrollView doesn't expand

2009-12-04 Thread Romain Guy
You don't have to create a custom layout, you can just use a
LinearLayout. Or you can do something more efficient and keep the
ListView but get rid of the ScrollView instead.

On Fri, Dec 4, 2009 at 10:51 AM, Dustin  wrote:
> Thanks, Roman.  I've found similar posts, but wasn't sure why.  So,
> does this mean that I have to build a custom layout to effectively
> mimic an expanded ListView?  Or, what other kinda of widget can I
> utilize?
>
> Thanks,
> Dustin
>
> On Dec 4, 11:47 am, Romain Guy  wrote:
>> If you want a ListView to expand completely and you want it to not
>> have scrollbars, then you dont' want a ListView. ListView and
>> ScrollView cannot be used embedded within one another since they
>> compete for scrolling.
>>
>>
>>
>> On Fri, Dec 4, 2009 at 9:41 AM, Dustin  wrote:
>> > I have a layout that needs to scroll off the screen because it
>> > contains a lot of fields.  The top 1/2 of the screen will contain
>> > fixed-width and fixed-height TextViews.  However, the bottom 1/2 will
>> > contain two dynamically-sized widgets; a TextView and a ListView. The
>> > bottom TextView may be 1 line of text, or it may contain 15 lines of
>> > text.
>>
>> > However, the bottom ListView may end up with no space left over, those
>> > making it too tiny to even be useful.  What I would really like to do
>> > is have the entire ListView be expanded and the entire layout scroll
>> > up or down.
>>
>> > I can't seem to accomplish this, even wrapping the entire layout in a
>> > ScrollView.  Seems the ScrollView doesn't ever add scrollbars and the
>> > ListView is limited to just whatever is left over in the layout after
>> > the top elements have been drawn.
>>
>> > Is there a way to request that the ListView be expanded completely and
>> > NEVER have any scrollbars at all, so that the enclosing ScrollView
>> > will handle the scrolling?
>>
>> > Here's a mock-up of my current layout:
>>
>> > > > android:layout_height="fill_parent"
>> >        android:background="#" android:padding="5dp"
>> >        android:scrollbars="vertical" android:fillViewport="true"
>> > android:isScrollContainer="true"
>> > 
>> > ...
>> > several text views, layout_height="wrap_content"
>> > ...
>>
>> > > > android:layout_height="wrap_content".../>
>>
>> > 
>> > > > android:layout_width="fill_parent"
>> >        android:layout_height="wrap_content" android:minHeight="500dp"
>> >         android:layout_below="@id/line"
>> > />
>>
>> > 
>> > 
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-developers@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> >http://groups.google.com/group/android-developers?hl=en
>>
>> --
>> Romain Guy
>> Android framework engineer
>> romain...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time
>> to provide private support.  All such questions should be posted on
>> public forums, where I and others can see and answer them
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: open GL ES Games on Android

2009-12-04 Thread Ben Gotow
I agree. I think Android's complete lack of OpenGL documentation
(explaining the differences between phones, how to optimize, etc...)
shows that they really aren't dedicated to Android as a gaming
platform. The Droid's hardware supports OpenGL ES 2.0, and there's no
way to access it. What could have been an awesome gaming device was
stunted by the lack of lead time for developers and the lack of an API
to use the hardware. I mean, check out this 62 page PDF describing
best practices for OpenGL on the iPhone. I think developers really
need this sort of stuff to turn good games into great games!
http://developer.apple.com/iphone/library/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/OpenGLES_ProgrammingGuide.pdf

I've done some work with the NDK and I would highly recommend using it
if you need to render complex scenes. Since all the OpenGL calls in
the Android Java SDK are passed through to an underlying C library,
those calls (gl.glBindTexture..., etc) are _slower_ than most Java
function calls. The NDK will tear though OpenGL rendering code because
you're directly calling C functions. It's a great option - especially
if you're porting a game from another platform.

- Ben

On Dec 4, 3:47 am, Piotr  wrote:
> You got the fastest one.
>
> I really do not believe, that good 3d games on Android are possible.
> Java is too slow for that, especially that it has garbage collector,
> that can slow down your loop a few times in a second.
>
> To get decent framerate, you must use a lot of tricks, for example
> allocating everything before loop start.
>
> Imo it is not worth it. Besides, no one knows even one example of
> game, that makes money on market. You can't even get your money back
> for development time.
>
> Android is more business, than entertaining device. Graphics support
> in terms of features is strong, but performance is very low.
>
> For example. I have tested Canvas performance on WinMo lately to draw
> 2d polygons (C++) for GPS map view purposes.
>
> On Asus P535 I can get 5000 areas drawn / sec. Similar code on HTC
> Magic, and I barely get 10 / sec.
>
> If I'd like to create a game, then I could look for better platform
> for that: iPhone or Zune HD.
>
> On 4 Gru, 05:13, Ian Dunlop  wrote:
>
>
>
> > Can anyone offer 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: GSM Timing Advance in Android

2009-12-04 Thread Ken H
Not that I've seen. The API is frustratingly limited in the phone
parameters you can query. They seem to have held us to *basic* things
like data state, CGI, RSSI, and basic network info among others.

http://developer.android.com/intl/fr/reference/android/telephony/TelephonyManager.html

Ken

On Dec 4, 6:01 am, BillS  wrote:
> Are there any Android APIs that allow the application to retrieve the
> GSM Timing Advance?
>
> Thanks,
> BillS

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] External peripherals emulating keyboard input

2009-12-04 Thread Mark Murphy

> I am trying to develop a device which would attach to my Droid and
> send keystrokes to it, but I need help understanding how the USB OTG
> works. I have the basic pinout, but is there a reference and
> instruction set guide anywhere, preferably with example code? Has
> anyone had any luck developing similar peripherals?
>
> http://wiki.droid-devs.com/images/7/7b/Otg.png

You're not going to be able to do this at the SDK level. The folks over at
[android-porting] may be able to help you at the firmware level.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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


[android-developers] Re: Listview inside ScrollView doesn't expand

2009-12-04 Thread Dustin
Thanks, Roman.  I've found similar posts, but wasn't sure why.  So,
does this mean that I have to build a custom layout to effectively
mimic an expanded ListView?  Or, what other kinda of widget can I
utilize?

Thanks,
Dustin

On Dec 4, 11:47 am, Romain Guy  wrote:
> If you want a ListView to expand completely and you want it to not
> have scrollbars, then you dont' want a ListView. ListView and
> ScrollView cannot be used embedded within one another since they
> compete for scrolling.
>
>
>
> On Fri, Dec 4, 2009 at 9:41 AM, Dustin  wrote:
> > I have a layout that needs to scroll off the screen because it
> > contains a lot of fields.  The top 1/2 of the screen will contain
> > fixed-width and fixed-height TextViews.  However, the bottom 1/2 will
> > contain two dynamically-sized widgets; a TextView and a ListView. The
> > bottom TextView may be 1 line of text, or it may contain 15 lines of
> > text.
>
> > However, the bottom ListView may end up with no space left over, those
> > making it too tiny to even be useful.  What I would really like to do
> > is have the entire ListView be expanded and the entire layout scroll
> > up or down.
>
> > I can't seem to accomplish this, even wrapping the entire layout in a
> > ScrollView.  Seems the ScrollView doesn't ever add scrollbars and the
> > ListView is limited to just whatever is left over in the layout after
> > the top elements have been drawn.
>
> > Is there a way to request that the ListView be expanded completely and
> > NEVER have any scrollbars at all, so that the enclosing ScrollView
> > will handle the scrolling?
>
> > Here's a mock-up of my current layout:
>
> >  > android:layout_height="fill_parent"
> >        android:background="#" android:padding="5dp"
> >        android:scrollbars="vertical" android:fillViewport="true"
> > android:isScrollContainer="true"
> > 
> > ...
> > several text views, layout_height="wrap_content"
> > ...
>
> >  > android:layout_height="wrap_content".../>
>
> > 
> >  > android:layout_width="fill_parent"
> >        android:layout_height="wrap_content" android:minHeight="500dp"
> >         android:layout_below="@id/line"
> > />
>
> > 
> > 
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them

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


Re: [android-developers] Re: Saving service killing without "startForeground"

2009-12-04 Thread Mark Murphy
> I had a similar issue. What I wanted to do was to run a short service
> on boot up and initialize a few items and then stop the service. I
> understand that its not a good idea to leave the service running for
> the entire life-cycle of the phone. I was able to achieve this by
> creating a broadcast receiver and starting my service (and do some
> post delay items). I still need to figure out how to stop the service
> part. Please chime in if any one has any comments on this.

I do not know what you mean by "how to stop the service part". If a
service wants to stop itself, it can call stopSelf().

> Can any one point to another strategy for starting up my
> service after my package installation?

Let the user start it by launching your activity.

> An alternative would be to
> "force phone re-boot" after the package is installed (obviously after
> giving the choice to the user if he wants to continue or not) but I
> dont know how to force that either. Any ideas how to achieve that?

You can't reboot the phone programmatically, unless you are part of the
firmware, AFAIK.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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


[android-developers] Upgradint ADT plugin in Eclipse problem

2009-12-04 Thread sbruno74
Hello all,

I have just updated my ADT plugin in Eclipse Ganymede to latest
version of Android SDK. But, after having downloaded the updates,
applied changes, restarted Eclipse, the Android SDK no longer loads.
The Android project option in New Project disappeared. It is the
second time that happens to me. Every time that I update the ADT
plugin, it no longer loads in Eclipse.

I also noticed the same issue after having tried to also install the
plugin for Blackberry development. After the install, all Android
related features disappear. When I try to reinstall the Android DDMS
and Android development tools again, it says it is already installed.

Is there an easy way to resolve the issue without having to reinstall
everything again from scratch?

I run Windows Vista Ultimate, Eclipse Ganymede, if that can help.

Stépane

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Listview inside ScrollView doesn't expand

2009-12-04 Thread Romain Guy
If you want a ListView to expand completely and you want it to not
have scrollbars, then you dont' want a ListView. ListView and
ScrollView cannot be used embedded within one another since they
compete for scrolling.

On Fri, Dec 4, 2009 at 9:41 AM, Dustin  wrote:
> I have a layout that needs to scroll off the screen because it
> contains a lot of fields.  The top 1/2 of the screen will contain
> fixed-width and fixed-height TextViews.  However, the bottom 1/2 will
> contain two dynamically-sized widgets; a TextView and a ListView. The
> bottom TextView may be 1 line of text, or it may contain 15 lines of
> text.
>
> However, the bottom ListView may end up with no space left over, those
> making it too tiny to even be useful.  What I would really like to do
> is have the entire ListView be expanded and the entire layout scroll
> up or down.
>
> I can't seem to accomplish this, even wrapping the entire layout in a
> ScrollView.  Seems the ScrollView doesn't ever add scrollbars and the
> ListView is limited to just whatever is left over in the layout after
> the top elements have been drawn.
>
> Is there a way to request that the ListView be expanded completely and
> NEVER have any scrollbars at all, so that the enclosing ScrollView
> will handle the scrolling?
>
> Here's a mock-up of my current layout:
>
>  android:layout_height="fill_parent"
>        android:background="#" android:padding="5dp"
>        android:scrollbars="vertical" android:fillViewport="true"
> android:isScrollContainer="true"
> 
> ...
> several text views, layout_height="wrap_content"
> ...
>
>  android:layout_height="wrap_content".../>
>
> 
>  android:layout_width="fill_parent"
>        android:layout_height="wrap_content" android:minHeight="500dp"
>         android:layout_below="@id/line"
> />
>
> 
> 
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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


[android-developers] Re: Where are the HTC dev phone 1 image package links?

2009-12-04 Thread Dustin
I had the same issue a few days ago.  HTC support said they can't
help.

I went to http://cyanogenmod.com/irc and asked on the web-based IRC
channel and got a response within a few seconds.

Just be sure to md5sum anything you get against the sums listed on
htc's website!

The link to the 1.6 recovery image is here:
http://dl.dropbox.com/u/1143608/junk/htc-1.6_recovery.zip

-dustin

On Dec 3, 10:25 pm, Chris Sokol  wrote:
> The instructions for setting up the ADP1 direct me to the HTC
> Developer Center to download system images.  That page, 
> athttp://developer.htc.com/adp.html, does not have any links to system
> images - it says it does, but it does not.
>
> Does anyone know where I can find 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] Any thing like System Gestures exists??

2009-12-04 Thread Romain Guy
Hi,

Touch operations are not treated as gestures (in the sense of
android.gesture.) The Home screen for instance handles these
operations itself by implementing onInterceptTouchEvent/onTouchEvent.
The same goes for ListView, ScrollView, etc. These classes do get
support from VelocityTracker and Scroller though. You can also use the
GestureDetector class.

On Fri, Dec 4, 2009 at 3:50 AM, Saty  wrote:
> Hi,
>
> Need some information on Gestures. How does android treat Operations
> like Fling which are at device level? Are they treated as Gestures? I
> am not able to see any gesture listner code in Launcher (Home screen )
> application.  If i want to change ( add/remove/modify ) the behaviour
> of Fling operations where i should start looking in the android code
> base? Any help is highly appreciated.
>
> Best Regards
> Saty
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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


[android-developers] Android 2.0.1 emulator: Not able to get Proxy settings to work (tried -http-proxy and APN proxy)

2009-12-04 Thread Clark Hunter
This link has some suggestions for proxy setting for early (pre-1.5)
and later (1.5 thru 1.6) Android emulators:
http://www.coderanch.com/t/462906/Android/Mobile/connect-internet-behind-proxy

Basically, the older emulator used a “com.android.provider.setting.db”
database or -http-proxy command line switch to set proxy/port/userid/
password.

Android 1.5 and 1.6 used:  Home->Menu->Settings->WirelessControls-
>MobileNetworks->Access Point Names to set multiple proxy/port/userid/
password configurations.
My 1.6 emulator is working behind our corporate firewall/proxy.

Android 2.0 has some issue where the APN didn't display.
I used sqlite3 /data/data/com.android.providers.telephony/databases/
telephony.db to manually set fields and make the entries editable
(current=1).
I could access local servers, but not get thru the firewall?

Android 2.0.1 shows the APN with a default 'TelKila' entry. I can add
my proxy information, but still can't get past the firewall (shows Web
page not 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


RE: [android-developers] Google Finance doing "credit checks"?

2009-12-04 Thread Ryan Beesley
Well, my initial thought is that this isn't really android-developers related.  
I expect there are better forums to have this answered in.

/Ryan

-Original Message-
From: Courtney Dev [mailto:cba...@gmail.com] 
Sent: Thursday, December 03, 2009 7:11 AM
To: Android Developers
Subject: [android-developers] Google Finance doing "credit checks"?

For those who applied to get your payout limit removed, Google Finance
required personal information (like SSN) with the understanding that
they "may" be performing routine credit history verifications.

Does this concern you?  I understand each credit check run on you by
any institution (bank, mortgage, etc) lowers your credit score.  I
can't understand how (or why) Google finance needs to do this.

Also, does anyone know how often they do these credit checks?

Any insight or thoughts would be appreciated!

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

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


[android-developers] Re: CDMA home carrier

2009-12-04 Thread Ken H


On Dec 3, 9:57 am, gudujarlson  wrote:
> not the home operator. So for example, if I had a contract with AT&T
> and I was in Seattle, both the current cell site and the home operator
> are the same, but if I traveled to Vancouver, Canada the cell site
> would be owned by Rogers and those functions would return the MCC and
> MNC of Rogers, not AT&T.

Correct, which is what you would expect.

> The GSM API on Android, Windows Mobile, and
> Blackberry allow you to differentiate between the home and current
> operator...

I've never been roaming on my app so I'd be curious to know what it
did myself.

> I have not tested getNetworkOperatorName() in a roaming situation, but
> my assumption is that it returns the carrier that owns the current
> cell site.

getNetworkOperatorName() is all I use, although thinking about it I
could see why you would use the getSimOperator -- the sim has the
carrier info and that never changes. I guess this is the
differentiation you mentioned?

> ServiceState.getOperatorNumeric()
>     Returns the current operator (MCC + MNC). This is retrieved from
> the current cell site.

You can also get that from getNetworkOperator() and parse the string.
I wonder why they put that in so many places?


> TelephonyManager.getSimOperator()
>     In non "world phones", this returns the first 6 digits of the IMSI
> (e.g. 314). This is bogus, because CDMA IMSI's have 00 for the MNC
> which 2 digits not 3 and useless either way. The 4 on the end is
> actually the beginning of the subscriber ID. This is a bug in Android
> as far as I can tell. In world phones, it will probably return the MCC
> +MNC for an operator in Europe.
>
> ServiceState.getOperatorNumeric()
>     Returns the MCC + 00. This is mostly useless, because it does not
> identify the carrier.

Well, it wouldn't. That's why it's a country code and not a network
code.

But don't get me started on Android 2.0 and this CDMA stuff. Example:
the CdmaCellLocation has two methods (getBaseStationLatitude() &
getBaseStationLongitude()) which, judging from the name return the LAT/
LON of the site. Great, I'm thinking until I look at the datatype and
see that they are both INTs. Which, again, wouldn't be a problem if
they said, "To get the decimal value divide by 1,000,000", but they
don't. Another beautiful mystery is that onSignalStrengthChanged has
been depracated, but they don't state what the replacement is.

Ken

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Attention developers: Orange is looking for great Apps !

2009-12-04 Thread Ellimac
Orange is looking forward to talking to you at LeWeb (Paris, 9th and
10th of December) - showing you the new on-device App Shop client, and
hearing all about your apps. If you're in Paris next week, come and
see us.

Can't attend LeWeb? Come and talk to us now on the new Orange App Shop
Developer Community Platform...
http://appshopcommunity.orangepartner.com

All the questions you've always want to ask Orange are just a few
clicks away. Join us and also talk to a 100 other developers in the
platform.

See you online !

Camille Bosquet
(Orange Developer Platform Community Manager)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Listview inside ScrollView doesn't expand

2009-12-04 Thread Dustin
I have a layout that needs to scroll off the screen because it
contains a lot of fields.  The top 1/2 of the screen will contain
fixed-width and fixed-height TextViews.  However, the bottom 1/2 will
contain two dynamically-sized widgets; a TextView and a ListView. The
bottom TextView may be 1 line of text, or it may contain 15 lines of
text.

However, the bottom ListView may end up with no space left over, those
making it too tiny to even be useful.  What I would really like to do
is have the entire ListView be expanded and the entire layout scroll
up or down.

I can't seem to accomplish this, even wrapping the entire layout in a
ScrollView.  Seems the ScrollView doesn't ever add scrollbars and the
ListView is limited to just whatever is left over in the layout after
the top elements have been drawn.

Is there a way to request that the ListView be expanded completely and
NEVER have any scrollbars at all, so that the enclosing ScrollView
will handle the scrolling?

Here's a mock-up of my current layout:


...
several text views, layout_height="wrap_content"
...









-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Saving service killing without "startForeground"

2009-12-04 Thread Nick
Hi all,
I had a similar issue. What I wanted to do was to run a short service
on boot up and initialize a few items and then stop the service. I
understand that its not a good idea to leave the service running for
the entire life-cycle of the phone. I was able to achieve this by
creating a broadcast receiver and starting my service (and do some
post delay items). I still need to figure out how to stop the service
part. Please chime in if any one has any comments on this.

I also wanted to start the same service once the package was
installed. I tried using the PACKAGE_ADDED, PACKAGE_CHANGED intents
but I guess the newly installed package does not receive these
intents. Can any one point to another strategy for starting up my
service after my package installation? An alternative would be to
"force phone re-boot" after the package is installed (obviously after
giving the choice to the user if he wants to continue or not) but I
dont know how to force that either. Any ideas how to achieve that?

Thanks for the help in advance

Nick

On Nov 23, 11:11 pm, Ash  wrote:
> At last I could find and fix the problem.
>
> The problem was after installing my package through ADT plug-in from
> Eclipse, for testing BOOT_COMPLETED event I had to restart the
> emulator every time, and when I run it again from Eclipse, my package
> receives the BOOT_COMPLETED event and starts running, but in between
> the Eclipse(ADT) tries to install the package again, which terminates
> my service/process.
> After installation when I run the emulator from outside the Eclipse,
> it works great.
>
> It was a silly problem to be discussed and happened because of my
> novelty in using Eclipse with ADT.
> The good thing is that I learned a lot of new concepts and APIs in the
> process of fixing this problem.
>
> Thanks Everyone!!
> Ash
>
> On Nov 23, 7:19 pm, Ash  wrote:
>
> > Hi!!
>
> > First of all I am extremely sorry for not providing the logs. (Kindly
> > the find the logs below)
>
> > Let me provide some more information about the service. Initially my
> > test environment was full build, when I could successfully test the
> > functionality I switched to SDK.
> > The same software without a single line change works successfully
> > without process killing/service crashing etc.
>
> > I tried starting the service in a new thread as suggested but that
> > didn’t help. Also my service is not getting restarted.
>
> > I could not observe/find any Low Memory, ANR or Service crashing
> > traces, though one of the trace says
>
> > “Scheduling restart of crashed service
> > com.mycompany.voip/.service.VoIPManager in 5000ms”
>
> > Surprisingly, my service did not get killed and was alive life-long
> > after  I removed one of the permission “ACCESS_CHECKIN_PROPERTIES”
> > from AndroidManifest.xml but that is not the real fix because with
> > this fix I could not run it successfully next time.
>
> > I am now clueless about the crash. Kindly provide some directions.
>
> > Thanks in advance
> > Ash
>
> > Package Name: com.mycompany.voip
>
> > Logcat –b event:
> > ---­
> > I/boot_progress_start(  553): 4455
> > I/boot_progress_preload_start(  553): 5701
> > I/dvm_gc_info(  553):
> > [8825198673194435749,-9065622874527238670,-4134462757533256206,0]
> > I/dvm_gc_info(  553):
> > [8825198673194411075,-9144998817959537112,-4131929482742753752,0]
> > I/dvm_gc_info(  553):
> > [8825198673194419250,-9164702066329053645,-4128833257998707149,0]
> > I/dvm_gc_info(  553):
> > [8825198673194427506,-9093207422244374979,-4126018508231428547,0]
> > I/dvm_gc_info(  553):
> > [8825198673194489386,-9016083278087436653,-4101811659696093549,0]
> > I/dvm_gc_info(  553):
> > [8825198673194550882,-8922632417303152977,-4093929191831849297,0]
> > I/dvm_gc_info(  553):
> > [8825198673194567275,-8923474642673121594,-4087453067807340858,0]
> > I/dvm_gc_info(  553):
> > [8825198673194583664,-8922909493427964195,-4080976944051259683,0]
> > I/dvm_gc_info(  553):
> > [8825198673194612348,-8919249218950650139,-4078724044457498907,0]
> > I/dvm_gc_info(  553):
> > [8825198673194612342,-8922625818891073797,-4072530495189760261,0]
> > I/dvm_gc_info(  553):
> > [8825198673194575421,-8974698689314085113,-4069152795200772345,0]
> > I/dvm_gc_info(  553):
> > [8825198673194542225,-9125005227097495779,-4062959245933058275,0]
> > I/dvm_gc_info(  553):
> > [8825198673194583229,-9065332530692524189,-4043255996220999837,0]
> > I/dvm_gc_info(  553):
> > [8825198673194591378,-9132886525103077527,-4041567146360731799,0]
> > I/dvm_gc_info(  553):
> > [8825198673194583156,-9088976428736206993,-4039878296500459665,0]
> > I/dvm_gc_info(  553):
> > [8825198673194595430,-9099109527109257353,-4037626495898241161,0]
> > I/dvm_gc_info(  553):
> > [8825198673194587298,-9080812554111428739,-4035936546526341251,0]
> > I/dvm_gc_info(  553):
> > [8825198673194603672,-9069553555026221182,-4026084922324686974,0]
> > I/dvm_gc_

Re: [android-developers] Contacts PhoneLookup

2009-12-04 Thread Dmitri Plotnikov
Probably just some mistake in the construction of the URI.  Are you
constructing it according to this document:

http://developer.android.com/reference/android/provider/ContactsContract.PhoneLookup.html

Thank you,
- Dmitri

On Thu, Dec 3, 2009 at 10:47 PM, Alok Kulkarni  wrote:
> Have you added the permission for accessing the contacts in your Android
> manifest file ?
> Thanks,
> Alok.
>
> On Fri, Dec 4, 2009 at 12:07 PM, swapnil  wrote:
>>
>> Hi All,
>>
>> I am trying to fetch all the numbers of a specific contact through my
>> application.
>>
>> Can anybody tell me what is the Content URI I have to use for this?
>>
>> I am using ContactContract.PhoneLookup.CONTENT_FILTER_URI but it is
>> giving IllegalArgument Exception telling some legacy issues.
>>
>>
>> Thanks in advance.
>>
>>
>> Regards,
>>
>> Swapnil Dalal.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: manually update AppWidgetProvider's onUpdate

2009-12-04 Thread Chet
Doing this causes my widget not to update after changing to Landscape
mode... Any ideas what might be causing it?

On Nov 4, 4:02 pm, Evan Ruff  wrote:
> I don't know if this is EXACTLY kosher, but I've overriden the
> onRecieve method in my AppWidgetProvider to look like:
>
> @Override
> public void onReceive( Context context, Intent intent )
> {
>     this.view = new RemoteViews( context.getPackageName(),
> R.layout.widget );
>     if (intent.getAction().equals( MY_AWESOME_CUSTOM_INTENT ))
>     {
>         // DO AWESOME STUFF HERE
>     }
>     else
>     {
>         super.onReceive( context, intent );
>     }
>
>     ComponentName me = new ComponentName( context, VAWidget.class );
>     AppWidgetManager.getInstance( context ).updateAppWidget( me,
> view );
>
> }
>
> Then I just add the custom intents to the widget's intent-filter in
> the manifest as usual.
>
> It has worked every time for me, but I'm wondering if there is a
> scenario where it would not be preferable to do it this way?
>
> E
>
> On Nov 4, 1:11 pm, skink  wrote:
>
> > Mark Murphy wrote:
> > > skink wrote:
> > > > hi,
>
> > > > my custom AppWidgetProvider has onUpdate method where i have logic to
> > > > update RemoteViews
>
> > > > it is not periodically updated by system, but rather, i'd like to
> > > > trigger onUpdate if something happens (in one of my app Activities).
> > > > both custom AppWidgetProvider and Activities i'd like to trigger
> > > > update from run with the same UID
>
> > > > i tried some AppWidgetManager's methods, but no luck, finally i ended
> > > > with really weird solution: i'm sending broadcast with action
> > > > ACTION_APPWIDGET_UPDATE and extras EXTRA_APPWIDGET_IDS which i got
> > > > from AppWidgetManager
>
> > > > is it a common way of updating AppWidgetProvider?
>
> > > You could also just send a broadcast to the provider directly, via the
> > > component-name version of the Intent constructor. Look for a null
> > > action, or some extra you package in, or something to tell it is your
> > > own custom Intent, then do the update work.
>
> > thank you Mark,
>
> > this is exactly what i'm doing now - sending broadcast directly to my
> > AppWidgetProvider by manually creating proper Intent and adding some
> > EXTRA_APPWIDGET_IDS extras
>
> > yet my impression was that this is not the way one should do: i mean i
> > thought there must be some higher level helper method to update
> > AppWidgetProvider
>
> > pskink
>
>

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


[android-developers] Accessing built-in AAC and MP3 decoders

2009-12-04 Thread ls02
Is there way to access built-in AAC and MP3 decoders from NDK C code?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Saving service killing without "startForeground"

2009-12-04 Thread Nick
Hi all,
I had a similar issue. What I wanted to do was to run a short service
on boot up and initialize a few items and then stop the service. I
understand that its not a good idea to leave the service running for
the entire life-cycle of the phone. I was able to achieve this by
creating a broadcast receiver and starting my service (and do some
post delay items). I still need to figure out how to stop the service
part. Please chime in if any one has any comments on this.

I also wanted to start the same service once the package was
installed. I tried using the PACKAGE_ADDED, PACKAGE_CHANGED intents
but I guess the newly installed package does not receive these
intents. Can any one point to another strategy for starting up my
service after my package installation? An alternative would be to
"force phone re-boot" after the package is installed (obviously after
giving the choice to the user if he wants to continue or not) but I
don't know how to force that either. Any ideas how to achieve that?

Thanks for the help in advance

Nick

On Nov 23, 11:11 pm, Ash  wrote:
> At last I could find and fix the problem.
>
> The problem was after installing my package through ADT plug-in from
> Eclipse, for testing BOOT_COMPLETED event I had to restart the
> emulator every time, and when I run it again from Eclipse, my package
> receives the BOOT_COMPLETED event and starts running, but in between
> the Eclipse(ADT) tries to install the package again, which terminates
> my service/process.
> After installation when I run the emulator from outside the Eclipse,
> it works great.
>
> It was a silly problem to be discussed and happened because of my
> novelty in using Eclipse with ADT.
> The good thing is that I learned a lot of new concepts and APIs in the
> process of fixing this problem.
>
> Thanks Everyone!!
> Ash
>
> On Nov 23, 7:19 pm, Ash  wrote:
>
> > Hi!!
>
> > First of all I am extremely sorry for not providing the logs. (Kindly
> > the find the logs below)
>
> > Let me provide some more information about the service. Initially my
> > test environment was full build, when I could successfully test the
> > functionality I switched to SDK.
> > The same software without a single line change works successfully
> > without process killing/service crashing etc.
>
> > I tried starting the service in a new thread as suggested but that
> > didn’t help. Also my service is not getting restarted.
>
> > I could not observe/find any Low Memory, ANR or Service crashing
> > traces, though one of the trace says
>
> > “Scheduling restart of crashed service
> > com.mycompany.voip/.service.VoIPManager in 5000ms”
>
> > Surprisingly, my service did not get killed and was alive life-long
> > after  I removed one of the permission “ACCESS_CHECKIN_PROPERTIES”
> > from AndroidManifest.xml but that is not the real fix because with
> > this fix I could not run it successfully next time.
>
> > I am now clueless about the crash. Kindly provide some directions.
>
> > Thanks in advance
> > Ash
>
> > Package Name: com.mycompany.voip
>
> > Logcat –b event:
> > ---­
> > I/boot_progress_start(  553): 4455
> > I/boot_progress_preload_start(  553): 5701
> > I/dvm_gc_info(  553):
> > [8825198673194435749,-9065622874527238670,-4134462757533256206,0]
> > I/dvm_gc_info(  553):
> > [8825198673194411075,-9144998817959537112,-4131929482742753752,0]
> > I/dvm_gc_info(  553):
> > [8825198673194419250,-9164702066329053645,-4128833257998707149,0]
> > I/dvm_gc_info(  553):
> > [8825198673194427506,-9093207422244374979,-4126018508231428547,0]
> > I/dvm_gc_info(  553):
> > [8825198673194489386,-9016083278087436653,-4101811659696093549,0]
> > I/dvm_gc_info(  553):
> > [8825198673194550882,-8922632417303152977,-4093929191831849297,0]
> > I/dvm_gc_info(  553):
> > [8825198673194567275,-8923474642673121594,-4087453067807340858,0]
> > I/dvm_gc_info(  553):
> > [8825198673194583664,-8922909493427964195,-4080976944051259683,0]
> > I/dvm_gc_info(  553):
> > [8825198673194612348,-8919249218950650139,-4078724044457498907,0]
> > I/dvm_gc_info(  553):
> > [8825198673194612342,-8922625818891073797,-4072530495189760261,0]
> > I/dvm_gc_info(  553):
> > [8825198673194575421,-8974698689314085113,-4069152795200772345,0]
> > I/dvm_gc_info(  553):
> > [8825198673194542225,-9125005227097495779,-4062959245933058275,0]
> > I/dvm_gc_info(  553):
> > [8825198673194583229,-9065332530692524189,-4043255996220999837,0]
> > I/dvm_gc_info(  553):
> > [8825198673194591378,-9132886525103077527,-4041567146360731799,0]
> > I/dvm_gc_info(  553):
> > [8825198673194583156,-9088976428736206993,-4039878296500459665,0]
> > I/dvm_gc_info(  553):
> > [8825198673194595430,-9099109527109257353,-4037626495898241161,0]
> > I/dvm_gc_info(  553):
> > [8825198673194587298,-9080812554111428739,-4035936546526341251,0]
> > I/dvm_gc_info(  553):
> > [8825198673194603672,-9069553555026221182,-4026084922324686974,0]
> > I/dvm_gc

[android-developers] Re: Send zip file as mail attachment

2009-12-04 Thread Dustin
I had a similar issue and found that the file was not readable by the
mail app (running as a different user).  Is /sdcard/test.zip world
readable when viewed via the shell?

-dustin

On Dec 4, 4:14 am, Pedro Fraca  wrote:
> Hi  All.
>
> I'm trying to send a zip file as mail attachment, in the ADP1 when
> mail is composed it shows the zip file as attached but don't sends it.
> This is the code I'm using:
>
>                     // Setup the recipient in a String array
>                     String[] mailto = {"supp...@mail.org"};
>                     // Create a new Intent to send messages
>                     Intent sendIntent = new Intent(Intent.ACTION_SEND);
>                     // Add attributes to the intent
>                     sendIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
>                     sendIntent.putExtra(Intent.EXTRA_EMAIL, mailto);
>                     sendIntent.putExtra(Intent.EXTRA_SUBJECT,"test");
>                     sendIntent.putExtra(Intent.EXTRA_TEXT,"test");
>
>                     sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new 
> File
> ("file:///sdcard/test.zip")));
>                     sendIntent.setType("application/zip");
>
>                     
> this.myContext.startActivity(Intent.createChooser(sendIntent,
> "Email:"));
>
> Cheers,

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


[android-developers] Re: How can we do TextView Justification

2009-12-04 Thread UD
Hi,

Try using WebView instead of TextView.
U can add text justification with help of CSS.

--
Regards,
Udayan Warnekar

On Dec 3, 5:36 pm, Archana  wrote:
> Please see this link ..here they are aligning the text i want same
> like this
>
> Check "Full Text Search"
>
> http://www.aldiko.com/blog/
>
> On Dec 3, 5:32 pm, "Dexter's Brain"  wrote:
>
>
>
> > Sorry, but I don't get what you want to achieve
> > GRAVITY.CENTER ?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Who do you consider as the Android mobile Apps developers Guru ?

2009-12-04 Thread Ellimac
If you had to suggest 2 to 3 names of Android Gurus, who will you
suggest?
What lead you to these choices?

Would you like to be able to chat with them?

Ellimac

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Showing application version

2009-12-04 Thread Binh Nguyen
I follow the code below but it always show 'getPackageInfo() is
undefined' error, anyone knows the reason.

Thanks in advance

On Oct 26, 9:19 pm, Greivin Lopez  wrote:
> Or just use the following code snippet:
>
> /**
>  * Gets the softwareversionandversionname for this application
>  */
>  private void getSoftwareVersion() {
>       try {
>             PackageInfo pi = getPackageManager().getPackageInfo
> (getPackageName(), 0);
>             // Store the softwareversioncode andversionname
> somewhere..
>             Global.softwareVersion = pi.versionCode;
>             Global.softwareVersionText =
> pi.versionName;
>         } catch (PackageManager.NameNotFoundException e) {
>             Log.e(TAG, "Package name not found", e);
>         };
>     }
>
> Good luck with your Android programming! :)

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


  1   2   3   >