[android-developers] Re: mediaserver always occupy 90%+ cpu when there is a wmv file existing on the sdcard.

2012-09-07 Thread 王鑫
I have found the reason that the hardware didn't support this WMV file , so
i disable the hardware
decoding and problem fix.

On Thu, Sep 6, 2012 at 10:35 AM, 王鑫 tremendoustur...@gmail.com wrote:

 I have a wmv file (about 130MB) in the sd card, i reset and reboot the
 device , the mediaserver process will occupy 90%+ cpu and keep that status
 until the battery dry out.

 I used gdb to debug the mediaserver process, but it seems I can't get the
 all threads info, normally I just can see one thread. At one time, I get
 all the thread info occasionally, and I will attach them below.

 It's odd that I wrote some debug log info in the code but the log can't
 output, it seems the stack below may not belong my problematic wmv file but
 some files in the phone.

 I am sorry I can't attach that wmv file for it's too large comparing to
 the permission of gmail.



 (gdb) info threads
   9 Thread 715  __ioctl () at bionic/libc/arch-arm/syscalls/__ioctl.S:15
   8 Thread 714  __futex_syscall3 ()
 at bionic/libc/arch-arm/bionic/atomics_arm.S:200
   7 Thread 713  0x84963b44 in BS_flush16 ()
from
 /home/ckt/work/R7627USNSKQLYA113023_shared/out/target/product/msm7627a_vicuna/symbols/system/lib/libOmxWmvDec.so
   6 Thread 712  __futex_syscall3 ()
 at bionic/libc/arch-arm/bionic/atomics_arm.S:200
   5 Thread 199  __ioctl () at bionic/libc/arch-arm/syscalls/__ioctl.S:15
   4 Thread 198  __futex_syscall3 ()
 at bionic/libc/arch-arm/bionic/atomics_arm.S:200
   3 Thread 197  0x0520 in ?? ()
   2 Thread 196  0x0520 in ?? ()
 * 1 Thread 96  __futex_syscall3 ()
 at bionic/libc/arch-arm/bionic/atomics_arm.S:200
 (gdb)
 (gdb) t 1
 [Switching to thread 1 (Thread 96)]#0  __futex_syscall3 ()
 at bionic/libc/arch-arm/bionic/atomics_arm.S:200
 200ldmia   sp!, {r4, r7}
 (gdb) bt
 #0  __futex_syscall3 () at bionic/libc/arch-arm/bionic/atomics_arm.S:200
 #1  0x80212264 in __pthread_cond_timedwait_relative (cond=0x2043c,
 mutex=0x20424, reltime=0x0) at bionic/libc/bionic/pthread.c:1451
 #2  0x80212338 in __pthread_cond_timedwait (cond=0x2043c, mutex=0x20424,
 abstime=0x0, clock=0) at bionic/libc/bionic/pthread.c:1474
 #3  0x8386d926 in android::Condition::wait (this=0x20360,
 buffer=0xbebd3a28,
 options=value optimized out)
 at frameworks/base/include/utils/threads.h:451
 #4  android::OMXCodec::read (this=0x20360, buffer=0xbebd3a28,
 options=value optimized out)
 at frameworks/base/media/libstagefright/OMXCodec.cpp:4244
 #5  0x83874c60 in extractVideoFrameWithCodecFlags (
 client=value optimized out, trackMeta=..., source=..., flags=1,
 frameTimeUs=-1, seekMode=2)
 at
 frameworks/base/media/libstagefright/StagefrightMetadataRetriever.cpp:316
 #6  0x83875086 in android::StagefrightMetadataRetriever::getFrameAtTime (
 this=value optimized out, timeUs=-1, option=2)
 at
 frameworks/base/media/libstagefright/StagefrightMetadataRetriever.cpp:447
 #7  0x8221a9ec in android::MetadataRetrieverClient::getFrameAtTime (
 this=0xebf0, timeUs=-1, option=2)
 at
 frameworks/base/media/libmediaplayerservice/MetadataRetrieverClient.cpp:2---Type
 return to continue, or q return to quit---
 10
 #8  0x80942886 in android::BnMediaMetadataRetriever::onTransact
 (this=0xebf0,
 code=value optimized out, data=value optimized out,
 reply=0xbebd3b60,
 flags=16) at
 frameworks/base/media/libmedia/IMediaMetadataRetriever.cpp:210
 #9  0x80817566 in android::BBinder::transact (this=0xebf4, code=4,
 data=...,
 reply=0xbebd3b60, flags=16) at
 frameworks/base/libs/binder/Binder.cpp:107
 #10 0x8081a72c in android::IPCThreadState::executeCommand (this=0xab50,
 cmd=value optimized out)
 at frameworks/base/libs/binder/IPCThreadState.cpp:1012
 #11 0x8081a90e in android::IPCThreadState::joinThreadPool (this=0xab50,
 isMain=true) at frameworks/base/libs/binder/IPCThreadState.cpp:457
 #12 0x8bda in main (argc=value optimized out, argv=value optimized
 out)
 at frameworks/base/media/mediaserver/main_mediaserver.cpp:66
 (gdb) t 2
 [Switching to thread 2 (Thread 196)]#0  0x0520 in ?? ()
 (gdb) bt
 #0  0x0520 in ?? ()
 Cannot access memory at address 0x69647538
 (gdb) t 3
 [Switching to thread 3 (Thread 197)]#0  0x0520 in ?? ()
 (gdb) bt
 #0  0x0520 in ?? ()
 Cannot access memory at address 0x69647538
 (gdb) t 3
 [Switching to thread 3 (Thread 197)]#0  0x0520 in ?? ()
 (gdb) bt
 #0  0x0520 in ?? ()
 (gdb) t 4
 [Switching to thread 4 (Thread 198)]#0  __futex_syscall3 ()
 at bionic/libc/arch-arm/bionic/atomics_arm.S:200
 200ldmia   sp!, {r4, r7}
 (gdb) bt
 #0  __futex_syscall3 () at bionic/libc/arch-arm/bionic/atomics_arm.S:200
 #1  0x80212264 in __pthread_cond_timedwait_relative (cond=0xcd00,
 mutex=0xccfc, reltime=0x0) at bionic/libc/bionic/pthread.c:1451
 #2  0x80212338 in __pthread_cond_timedwait (cond=0xcd00, mutex=0xccfc,
 abstime=0x0, clock=0) at bionic/libc/bionic/pthread.c:1474
 #3  0x8002b154 in android::Condition::wait 

[android-developers] Re: help require regarding address application

2012-09-07 Thread Calin Perebiceanu
Hello,
Sqllite has no security , thus you have to encrypt your data.
We can use GCM to send notifications to devices.

On Friday, 7 September 2012 08:51:30 UTC+3, pankajdev wrote:

 Hi, 

 want to build an application where i can store address of one of the 
 office location , these location are from different location all around the 
 world.

 I am trying to build the database in sqllite and will use it with the 
 application , but i would like to know how secure it is to use the same , 
 secondly what if i have any changes in the address how can i push that in 
 the device , can we do something or call the sqllite database from a 
  central server in that case how can we achieve the offline mode then.

 appreciate suggestions as i am very new to this any sample code will be 
 also really helpful to start with.

 with regards


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

Re: [android-developers] Re: help require regarding address application

2012-09-07 Thread pankaj dev
Thanks Calin , but how to begin with this kind of application is also what
i need help on.

with regards

On Fri, Sep 7, 2012 at 11:59 AM, Calin Perebiceanu 
calin.perebice...@gmail.com wrote:

 Hello,
 Sqllite has no security , thus you have to encrypt your data.
 We can use GCM to send notifications to devices.


 On Friday, 7 September 2012 08:51:30 UTC+3, pankajdev wrote:

 Hi,

 want to build an application where i can store address of one of the
 office location , these location are from different location all around the
 world.

 I am trying to build the database in sqllite and will use it with the
 application , but i would like to know how secure it is to use the same ,
 secondly what if i have any changes in the address how can i push that in
 the device , can we do something or call the sqllite database from a
  central server in that case how can we achieve the offline mode then.

 appreciate suggestions as i am very new to this any sample code will be
 also really helpful to start with.

 with regards

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


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

Re: [android-developers] Re: help require regarding address application

2012-09-07 Thread Calin Perebiceanu
Here you can find some great information  
http://developer.android.com/index.html 

On Friday, 7 September 2012 09:54:08 UTC+3, pankajdev wrote:

 Thanks Calin , but how to begin with this kind of application is also what 
 i need help on.

 with regards

 On Fri, Sep 7, 2012 at 11:59 AM, Calin Perebiceanu 
 calin.pe...@gmail.comjavascript:
  wrote:

 Hello,
 Sqllite has no security , thus you have to encrypt your data.
 We can use GCM to send notifications to devices.


 On Friday, 7 September 2012 08:51:30 UTC+3, pankajdev wrote:

 Hi, 

 want to build an application where i can store address of one of the 
 office location , these location are from different location all around the 
 world.

 I am trying to build the database in sqllite and will use it with the 
 application , but i would like to know how secure it is to use the same , 
 secondly what if i have any changes in the address how can i push that in 
 the device , can we do something or call the sqllite database from a 
  central server in that case how can we achieve the offline mode then.

 appreciate suggestions as i am very new to this any sample code will be 
 also really helpful to start with.

 with regards

  -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 
 android-d...@googlegroups.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 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] Live wallpaper. nullPointerException when detecting preview mode

2012-09-07 Thread JPS
Hi 
I am developing a live wallpaper and want the preview mode to display a 
bitmap as opposed to the regular animation in run mode.

I know I should use the isPreview() call and all my searches indicate that 
I should do this in the onCreateEngine() method which is what I did. 
However I get a nullPointerException. I have tried other locations and the 
only locations it works are located too far down to perform initialisation.

Any help is Greatly appreciated.

Thanks

JPS


@Override
public Engine onCreateEngine() {
mEng = new WallpaperEngine();

if (mEng!= null) {
*if (mEng.isPreview()) { // crash here*
Log.d(TAG, preview mode);
// display preview bitmap
} else {
Log.d(TAG, run mode);
// perform full initalization
}
}

return mEng;
}

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Live wallpaper. nullPointerException when detecting preview mode

2012-09-07 Thread Calin Perebiceanu
Can you also provide the stack for the crash ?

On Friday, 7 September 2012 10:19:42 UTC+3, JPS wrote:

 Hi 
 I am developing a live wallpaper and want the preview mode to display a 
 bitmap as opposed to the regular animation in run mode.

 I know I should use the isPreview() call and all my searches indicate that 
 I should do this in the onCreateEngine() method which is what I did. 
 However I get a nullPointerException. I have tried other locations and the 
 only locations it works are located too far down to perform initialisation.

 Any help is Greatly appreciated.

 Thanks

 JPS


 @Override
 public Engine onCreateEngine() {
 mEng = new WallpaperEngine();

 if (mEng!= null) {
 *if (mEng.isPreview()) { // crash here*
 Log.d(TAG, preview mode);
 // display preview bitmap
 } else {
 Log.d(TAG, run mode);
 // perform full initalization
 }
 }

 return mEng;
 }



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

Re: [android-developers] Re: help require regarding address application

2012-09-07 Thread pankaj dev
great , i have seen this url ...:( the Beginning  always require help if i
am not wrong.

On Fri, Sep 7, 2012 at 12:43 PM, Calin Perebiceanu 
calin.perebice...@gmail.com wrote:

 Here you can find some great information
 http://developer.android.com/index.html


 On Friday, 7 September 2012 09:54:08 UTC+3, pankajdev wrote:

 Thanks Calin , but how to begin with this kind of application is also
 what i need help on.

 with regards

 On Fri, Sep 7, 2012 at 11:59 AM, Calin Perebiceanu calin.pe...@gmail.com
  wrote:

 Hello,
 Sqllite has no security , thus you have to encrypt your data.
 We can use GCM to send notifications to devices.


 On Friday, 7 September 2012 08:51:30 UTC+3, pankajdev wrote:

 Hi,

 want to build an application where i can store address of one of the
 office location , these location are from different location all around the
 world.

 I am trying to build the database in sqllite and will use it with the
 application , but i would like to know how secure it is to use the same ,
 secondly what if i have any changes in the address how can i push that in
 the device , can we do something or call the sqllite database from a
  central server in that case how can we achieve the offline mode then.

 appreciate suggestions as i am very new to this any sample code will be
 also really helpful to start with.

 with regards

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

 To unsubscribe from this group, send email to
 android-developers+**unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/android-developers?hl=enhttp://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] Help required in packaging android library project as a jar in android application.

2012-09-07 Thread india123
Hi All,

I am trying to use Android Library Project as a jar in my android 
application.

But i am not able to use library project as a jar because it contains .xml 
and images, so i can't make jar of this.

Can any one guide me to resolve 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: Live wallpaper. nullPointerException when detecting preview mode

2012-09-07 Thread JPS


On Friday, September 7, 2012 9:19:42 AM UTC+2, JPS wrote:

 Hi 
 I am developing a live wallpaper and want the preview mode to display a 
 bitmap as opposed to the regular animation in run mode.

 I know I should use the isPreview() call and all my searches indicate that 
 I should do this in the onCreateEngine() method which is what I did. 
 However I get a nullPointerException. I have tried other locations and the 
 only locations it works are located too far down to perform initialisation.

 Any help is Greatly appreciated.

 Thanks

 JPS


 @Override
 public Engine onCreateEngine() {
 mEng = new WallpaperEngine();

 if (mEng!= null) {
 *if (mEng.isPreview()) { // crash here*
 Log.d(TAG, preview mode);
 // display preview bitmap
 } else {
 Log.d(TAG, run mode);
 // perform full initalization
 }
 }

 return mEng;
 }


Hi Calin

here is the crash log

09-07 09:58:33.441: E/AndroidRuntime(2101): FATAL EXCEPTION: main
09-07 09:58:33.441: E/AndroidRuntime(2101): java.lang.NullPointerException
09-07 09:58:33.441: E/AndroidRuntime(2101): at 
android.service.wallpaper.WallpaperService$Engine.isPreview(WallpaperService.java:332)
09-07 09:58:33.441: E/AndroidRuntime(2101): at 
com.aajo.appia.LiveWallpaper.onCreateEngine(LiveWallpaper.java:205)
09-07 09:58:33.441: E/AndroidRuntime(2101): at 
android.service.wallpaper.WallpaperService$IWallpaperEngineWrapper.executeMessage(WallpaperService.java:872)
09-07 09:58:33.441: E/AndroidRuntime(2101): at 
com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:61)
09-07 09:58:33.441: E/AndroidRuntime(2101): at 
android.os.Handler.dispatchMessage(Handler.java:99)
09-07 09:58:33.441: E/AndroidRuntime(2101): at 
android.os.Looper.loop(Looper.java:130)
09-07 09:58:33.441: E/AndroidRuntime(2101): at 
android.app.ActivityThread.main(ActivityThread.java:3683)
09-07 09:58:33.441: E/AndroidRuntime(2101): at 
java.lang.reflect.Method.invokeNative(Native Method)
09-07 09:58:33.441: E/AndroidRuntime(2101): at 
java.lang.reflect.Method.invoke(Method.java:507)
09-07 09:58:33.441: E/AndroidRuntime(2101): at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
09-07 09:58:33.441: E/AndroidRuntime(2101): at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
09-07 09:58:33.441: E/AndroidRuntime(2101): at 
dalvik.system.NativeStart.main(Native Method)
 
Is this what you needed? 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 override Theme.Light title-text in styles.xml ?

2012-09-07 Thread aprogrammer
I'm using Theme.Light in an app and noticed that Theme.Light automatically 
sets the title-text of the title-bar.
The title-text is set to the android:label of MainActivity. However, I want 
the title to be New Text, not the label attached to MainActivity.

Now, it is possible to change titlebar-text with a couple of approaches
1. Change android:label (of the main activity) to New Text in the 
manifest file
2. Programmatically set the title-bar text to New Text.

The first approach has some problems. 
The second approach works a bit late, the original title-text is flashed 
before it gets overwritten by New Text. So this is a bad user experience.

It seems like there should be an easy way to create a new style that 
inherits from Theme.Light, but overrides the title-text. 
Setting the style's android:label or android:title properties don't change 
anything, setting the android:windowNoTitle property to true eliminates the 
entire titlebar.

Does anyone know how to create a new style that inherits from Theme.Light 
and displays the title-bar, but overrides the title-text

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

[android-developers] Re: Help required in packaging android library project as a jar in android application.

2012-09-07 Thread RichardC
See Referencing a Library Project:
http://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject
 

On Friday, September 7, 2012 8:59:49 AM UTC+1, india123 wrote:

 Hi All,

 I am trying to use Android Library Project as a jar in my android 
 application.

 But i am not able to use library project as a jar because it contains .xml 
 and images, so i can't make jar of this.

 Can any one guide me to resolve 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] date

2012-09-07 Thread Sadhna Upadhyay
Hi,
how to store date in sqlite and do sql query on date

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

2012-09-07 Thread cpares
Solved! In the end you were right, RichardC. It was the constructor of 
another class, which was firing implicitly, finding some exception and 
closing the program. Thank you, you set me on the right track! :)

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

[android-developers] EditTextPreference: Problems with android:dialogMessage

2012-09-07 Thread BearTi
Hi,

I got two questions:

1.) How can I make the Text android:dialogMessage in an 
EditTextPreference bold? I tried bTest1/b Test2, but this don´t 
work!

2.) This android:dialogMessage is not shown direct over the Textfield 
where the User can type something... there es a padding of (i think 2-3 
Lines). How can I remove this breaks?


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] 【android-developers】meta-data

2012-09-07 Thread 安藤玲生

im japanese programmer.

In the character string and what that are defined as the usual
string.xml does meta-data differ?


thanks.


REO ANDO


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


[android-developers] Translating time Executing time

2012-09-07 Thread ehsan azimzadeh
Hi

A breakdown of execution time shows that compilation constitutes a fraction
of total execution time in android application. How can we measure the time
spent*translating* and *executing* for android application separately? Are
there any tools?

Thanks
Ehsan

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

Re: [android-developers] Re: help require regarding address application

2012-09-07 Thread pankaj dev
I request if somebody can understand my question and help , that how i
should create an app that will store address in sqllite database and will
fetch based on specific search word , i also want to understand can i keep
database in remote server and it will sync based on the update button
clicked and will overwrite the existing database on the event, i see there
is already a command in SqLlite android development to do it but i want few
more pointer on creating , search and view in the android apps which
component should i use to achieve the same.

with regards

On Fri, Sep 7, 2012 at 1:03 PM, pankaj dev pankajde...@gmail.com wrote:

 great , i have seen this url ...:( the Beginning  always require help if i
 am not wrong.


 On Fri, Sep 7, 2012 at 12:43 PM, Calin Perebiceanu 
 calin.perebice...@gmail.com wrote:

 Here you can find some great information
 http://developer.android.com/index.html


 On Friday, 7 September 2012 09:54:08 UTC+3, pankajdev wrote:

 Thanks Calin , but how to begin with this kind of application is also
 what i need help on.

 with regards

 On Fri, Sep 7, 2012 at 11:59 AM, Calin Perebiceanu 
 calin.pe...@gmail.com wrote:

 Hello,
 Sqllite has no security , thus you have to encrypt your data.
 We can use GCM to send notifications to devices.


 On Friday, 7 September 2012 08:51:30 UTC+3, pankajdev wrote:

 Hi,

 want to build an application where i can store address of one of the
 office location , these location are from different location all around 
 the
 world.

 I am trying to build the database in sqllite and will use it with the
 application , but i would like to know how secure it is to use the same ,
 secondly what if i have any changes in the address how can i push that in
 the device , can we do something or call the sqllite database from a
  central server in that case how can we achieve the offline mode then.

 appreciate suggestions as i am very new to this any sample code will
 be also really helpful to start with.

 with regards

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

 To unsubscribe from this group, send email to
 android-developers+**unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/android-developers?hl=enhttp://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




-- 
Pankaj Dev
M :+91-9910754933 (Delhi )

Being Humble is Being Human
http://in.linkedin.com/in/pankajdevbhugra
http://www.sqldb.in
http://www.linuxforums.in

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

2012-09-07 Thread pankajdev
I request if somebody can understand my question and help , that how i 
should create an app that will store address in sqllite database and will 
fetch based on specific search word , i also want to understand can i keep 
database in remote server and it will sync based on the update button 
clicked and will overwrite the existing database on the event, i see there 
is already a command in SqLlite android development to do it but i want few 
more pointer on creating , search and view in the android apps which 
component should i use to achieve the same. 

On Friday, 7 September 2012 11:21:30 UTC+5:30, pankajdev wrote:

 Hi, 

 want to build an application where i can store address of one of the 
 office location , these location are from different location all around the 
 world.

 I am trying to build the database in sqllite and will use it with the 
 application , but i would like to know how secure it is to use the same , 
 secondly what if i have any changes in the address how can i push that in 
 the device , can we do something or call the sqllite database from a 
  central server in that case how can we achieve the offline mode then.

 appreciate suggestions as i am very new to this any sample code will be 
 also really helpful to start with.

 with regards


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

[android-developers] Re: Live wallpaper. nullPointerException when detecting preview mode

2012-09-07 Thread Calin Perebiceanu
I've looked at WallpaperService source code, and I pretty sure you can't 
use  isPreview  in onCreateEngine.


On Friday, 7 September 2012 11:00:46 UTC+3, JPS wrote:



 On Friday, September 7, 2012 9:19:42 AM UTC+2, JPS wrote:

 Hi 
 I am developing a live wallpaper and want the preview mode to display a 
 bitmap as opposed to the regular animation in run mode.

 I know I should use the isPreview() call and all my searches indicate 
 that I should do this in the onCreateEngine() method which is what I did. 
 However I get a nullPointerException. I have tried other locations and the 
 only locations it works are located too far down to perform initialisation.

 Any help is Greatly appreciated.

 Thanks

 JPS


 @Override
 public Engine onCreateEngine() {
 mEng = new WallpaperEngine();

 if (mEng!= null) {
 *if (mEng.isPreview()) { // crash here*
 Log.d(TAG, preview mode);
 // display preview bitmap
 } else {
 Log.d(TAG, run mode);
 // perform full initalization
 }
 }

 return mEng;
 }


 Hi Calin

 here is the crash log

 09-07 09:58:33.441: E/AndroidRuntime(2101): FATAL EXCEPTION: main
 09-07 09:58:33.441: E/AndroidRuntime(2101): java.lang.NullPointerException
 09-07 09:58:33.441: E/AndroidRuntime(2101): at 
 android.service.wallpaper.WallpaperService$Engine.isPreview(WallpaperService.java:332)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at 
 com.aajo.appia.LiveWallpaper.onCreateEngine(LiveWallpaper.java:205)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at 
 android.service.wallpaper.WallpaperService$IWallpaperEngineWrapper.executeMessage(WallpaperService.java:872)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at 
 com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:61)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at 
 android.os.Handler.dispatchMessage(Handler.java:99)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at 
 android.os.Looper.loop(Looper.java:130)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at 
 android.app.ActivityThread.main(ActivityThread.java:3683)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at 
 java.lang.reflect.Method.invokeNative(Native Method)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at 
 java.lang.reflect.Method.invoke(Method.java:507)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at 
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at 
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at 
 dalvik.system.NativeStart.main(Native Method)
  
 Is this what you needed? 


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

[android-developers] Animation moving image in random

2012-09-07 Thread Haris


For my application I need to move my image randomly throughout the screen 
using motion sensor
The motion sensor part completed. So as the next step I need to move an 
arrow throughout the screen. I searched in internet a lotPlease 
help..

thanks in advance  

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

[android-developers] How to remove(clear) shared preferences of one application from other application?

2012-09-07 Thread Abhishek Kumar Gupta
I want to remove(clear) the sharedpreferences of one application from other 
application. I have tried the following code in the other application to 
remove preferences of application having package com.android.blesettings:

Context context = getActivity().createPackageContext(
com.android.blesettings, 0);
SharedPreferences mSettings = 
mSettingsContext.getSharedPreferences(
profile_preference, MODE_WORLD_READABLE);
SharedPreferences.Editor mSettingsEditor = 
mBLESettings.edit();
mSettingsEditor.remove(proximity_settings);
mSettingsEditor.commit();

I am able to remove(clear) the value of the sharedpreference of 
application(that I have observed by looking the profile_settings file) 
but it is taking value(previously saved) from the *.bak* file of the 
sharedpreferences.

How to resolve this issue? Any help or guidance will be well appreciated.  

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

Re: [android-developers] EditTextPreference: Problems with android:dialogMessage

2012-09-07 Thread Kostya Vasilyev
You can do this by creating your own layout for the dialog.

http://developer.android.com/reference/android/preference/DialogPreference.html#attr_android:dialogLayout


-- K

2012/9/7 BearTi mlrti...@gmail.com

 Hi,

 I got two questions:

 1.) How can I make the Text android:dialogMessage in an
 EditTextPreference bold? I tried bTest1/b Test2, but this don´t
 work!

 2.) This android:dialogMessage is not shown direct over the Textfield
 where the User can type something... there es a padding of (i think 2-3
 Lines). How can I remove this breaks?


 Thanks!

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

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

Re: [android-developers] School project help needed.

2012-09-07 Thread Amey Bapat
Domin8rJ
listen up buddy,
wid due respect to the prev posts on this thread heres an idea for u..
u might take tym fr it but its k
jus take any chap or couple of chaps frm any subject and jus create an app..
so i would b like having a chap in ur phone..
automating it in a way towards smarter education..
jus draw some sample screens on a paper,try to go thru chapters frm mark
murphy's book so that screens smehw can b designed..
later on things will fall into place slowly wid event handling an all..
jus try it..any help in that matter mail me okk..
it can turn out to b very difficult for u but try it out..
its fun coding in android..


On Fri, Sep 7, 2012 at 1:27 AM, Tommy Hartz droi...@gmail.com wrote:

 I had no concept of java or c++ I was a VB.net guy up until I needed to
 learn android. I just jumped right into Marks book as noted below and then
 started messing around with sample apps. If you have any programming
 background pickup up Java isn’t hard as long as you know how to use google.
 If you get stuck, like I have in the past many times, ask a well thought
 out and detailed question to this forum and people WILL help, I have
 learned a lot from this forum…

 ** **

 If you have 0 programming experience you might be in for a rough ride and
 you will want to make sure any project you come up with is rather basic or
 you may not have time to finish it…

 ** **

 Learning how to design and layout your application is in my opinion the
 hardest part of android, but once you get it and figure it out it is smooth
 sailing from there.

 ** **

 *From:* android-developers@googlegroups.com [mailto:
 android-developers@googlegroups.com] *On Behalf Of *Lew
 *Sent:* Wednesday, September 05, 2012 3:37 PM
 *To:* android-developers@googlegroups.com
 *Subject:* Re: [android-developers] School project help needed.

 ** **

 Kristopher Micinski wrote: 

 I don't think that Android is a significantly new API or programming 

 ** **

 Compared to what?

  

 environment, and if you know Java (and even if you don't, but know C++
 or something similar-ish well enough) will be very easy to pick up.. 

 ** **

 You elide over the difficulties. Java is more than a language, it's an ***
 *

 environment, and that environment is quite different between Android and *
 ***

 other platforms.

 ** **

 For example, you could go through years of standard or enterprise Java ***
 *

 programming without every defining a UI in XML. If this is new to you, it
 

 takes some getting used to, and no amount of Java or C++ knowledge is 

 directly applicable.

  

 If you have a year of time to do so, I'd start by doing the following:

 - reading the developer guide
 - playing with a bunch of the sample apps
 - perhaps buying a copy of Mark Murphy's android book (the commonsware
 guide) if you find yourself needing more explained examples of the
 API, etc... 

 ** **

 You consider a year easy to pick up?

 ** **

 I consider three days easy to pick up. A year seems on the long end of *
 ***

 what it should take to be competent at Android programming.

 ** **

 -- 

 Lew

  

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




-- 
live and let LIVE!!!

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

Re: [android-developers] How to remove(clear) shared preferences of one application from other application?

2012-09-07 Thread Amey Bapat
id u try doing this
 remove  all SharedPreferences.Editor.clear() followed by a commit()

also removing the package can also b an option

On Fri, Sep 7, 2012 at 4:31 PM, Abhishek Kumar Gupta
akgaec2...@gmail.comwrote:

 I want to remove(clear) the sharedpreferences of one application from
 other application. I have tried the following code in the other application
 to remove preferences of application having package
 com.android.blesettings:

 Context context = getActivity().createPackageContext(
 com.android.blesettings, 0);
 SharedPreferences mSettings =
 mSettingsContext.getSharedPreferences(
 profile_preference, MODE_WORLD_READABLE);
 SharedPreferences.Editor mSettingsEditor =
 mBLESettings.edit();
 mSettingsEditor.remove(proximity_settings);
 mSettingsEditor.commit();

 I am able to remove(clear) the value of the sharedpreference of
 application(that I have observed by looking the profile_settings file)
 but it is taking value(previously saved) from the *.bak* file of the
 sharedpreferences.

 How to resolve this issue? Any help or guidance will be well 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




-- 
live and let LIVE!!!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 for newbie game development (views? drawables? what?)

2012-09-07 Thread Andrea Rossi
Hi everybody, newbie here! 

In Android development, at least. I'm definitely not new to game 
development in Java, but now I need some initial advices for my first silly 
game on Android. 

All I need is a background (probably horizontally scrolling), a hot air 
balloon going up and down on the left side, and some random foes (birds, 
whatever) and bonuses on the right, moving towards the balloon. Then, I 
obviously need collision detection, since the goal of the game is to go as 
far as you can, avoiding those feathered bastards.

I've read the documentation about the graphics part, but I can't understand 
which is the best solution. I currently have a fullscreen View which draws 
the background (a simple PNG), and an ImageView with the balloon on it, 
which is animated by an ObjectAnimator...but I'm pretty sure this is an 
awful solution. 

I've read a lot about Drawables and Bitmaps, but using them drove me mad 
due to the inability to use the Animator.

So, what is the best way of drawing those things, and then animate them?

Thanks so much in advance, and sorry for my ugly english! =/

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

[android-developers] Google Now APIs?

2012-09-07 Thread Andrés Pachón
Are there any plans to release a Google Now API in the Android SDK? Maybe 
as another type of 
notificationhttp://developer.android.com/design/patterns/notifications.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] Peer to Peer video streaming

2012-09-07 Thread Ariv
Hi All,

I am looking to develop a android application to do a peer to peer video 
chat. No servers in between. it can be through once of the networks lie 
WIFI, 3G bluetooth etc. 

Please provide some suggestions and example and any applications that is 
already available and capable of doing this.

Appreciate you response thanks.

-Ariv

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

[android-developers] Problem when loading Assets on Eclipse

2012-09-07 Thread Siflou
Hello guys, I've been reading the book Beginning Android Games and I have 
a problem because I have a test project that load assets via the asset 
manager and in the first project it worked great. Now we are in another 
project further in the book and I need to read Assets too, but It keeps 
failing. I use the same android emulation devices for both project and I 
even reused the same test that worked in my other project, in my new 
project and it won't load the assets still, but i know its there because 
with the exact same code on my other project it works. I checked out my 
manifest files, but I don't know what could be wrong, if you guys could 
help me pls. Here are my 2 manifests anyway. The 1 with the OpenGl things 
is the problematic 1.Thanks a lot !

Siflou

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

AndroidManifest.xml
Description: XML document


AndroidManifest.xml
Description: XML document


[android-developers] rSAP in Android

2012-09-07 Thread chencho
Hi all, 

Is there any chance to add rsap to android? most of the new bluetooth 
devices use this profile and i cannot use them with my cellphone. 
There is a web called www.android-rsap.com but unfortunatelly only develop 
the app for samsung and htc (i have a sony mobile).

chencho

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

[android-developers] Re: question, has any one use the void glDrawElements(intmode,intcount,inttype,intoffset) in GL11

2012-09-07 Thread Shitesh
So I believe the answer to this question is here: 
http://stackoverflow.com/questions/7708745/whats-the-offset-parameter-in-gles20-glvertexattribpointer-gldrawelements-an

You can use the int offset function if you've called glBindBuffer first.

On Sunday, 4 January 2009 08:35:39 UTC+2, 边蓬 wrote:

 the source of framework shows that use offset as void * directly, than 
 what should I do before call glDrawElements ? 


 /* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, 
 GLint offset ) */ 
 static void 
 android_glDrawElements__ 
   (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint 
 offset) { 
 glDrawElements( 
 (GLenum)mode, 
 (GLsizei)count, 
 (GLenum)type, 
 (const GLvoid *)offset 
 ); 
 } 


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

2012-09-07 Thread Siflou
Hi guys,

I have a androind project and I'm working with AssetManager to read images 
and I'm reading a book (Beginning Android Games) and we made a framework to 
load assets from, and I'm using it to load images. Basiclly I have 2 
different projects. In 1 project, I'm loading a texte file and it works. On 
the other projects I tried to load the SAME file on the SAME device and for 
an unknown reason, I get a FileNotFoundException. I checked my Manifest 
files, tried to add some permissions, but I can't get it to work. Could 
some one help me plz. Here I'll like  u the 2 manifest file to see if I did 
something wrong

Big thank you to all !

Siflou

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

AndroidManifest.xml
Description: XML document


AndroidManifestNotWorking.xml
Description: XML document


[android-developers] Support for indian languages in android devices

2012-09-07 Thread Amit Dhage
Hello everyone,

   I am developing an android application. In that 
I am using some Indian language fonts (e.g. Hindi).  I have used TTF font 
files but it is not rendering joint alphabets properly. That's why In my 
application I want to detect weather Indian (e.g. Hindi )language is 
supported by that android device or not. If its not supported by the device 
then close the application.

  Please help me to solve this problem.

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

[android-developers] javascript Bookmark in Android Browser

2012-09-07 Thread Aravind S
Hi,
I want to add a bookmark in android chrome browser programetically.
And, my bookmark starts with javascript: as my bookmark will need to get 
the currently opened website address.
Any help is really appreciated.

PS: I tried to add bookmark that starts with javascript: manually and it 
didn't work properly. However the same bookmark string is working properly 
in computer's web browser.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 ResourceType Too many attributes references, stopped at: 0x010102c5

2012-09-07 Thread BusDeath
Hello,
 
i scale the layouts of my android app programmatically. So my application 
looks the same on any device.
 
It works fine so far. But now the logcat reports a warning like:
 
ResourceType - Too many attribute references, stopped at: 0x010102c5
 
and my application layout does not look right.
 
Can anyone tell me whats the problem?
 
Greetz
 
 

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

2012-09-07 Thread bobbi
While enlarging/shrinking images is inherent in Android, not so is the font 
size.  Some of us old farts need larger fonts to be able to read without 
glasses.  Allowing FONT sizes to be user-selected would go a long way to 
making Android easier for older users.

And, some of us are increasingly deaf, too.  How hard would it be to route 
all audio through a user-adjustable filter to boost certain frequencies of 
sounds?

Adding these geriatric features may seem wasteful to you young folks, but 
to us oldsters-- many of whom helped develop the underlying technology that 
you are using today-- are increasinly important.

PLEASE CONSIDER ADDING USER-SELECTABLE FONT SIZES and AUDIO FILTERS TO 
ANDROID.

Thank you-- some day you, too, will be happy that you did.

Bobbi

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

2012-09-07 Thread AndroidDev
Friend,

I am working on app in which I have to calculate the total distance from 
start point to end point. I use the Location Manager of the Android SDK, 
use location listener and use both provider(GPS and network provider) and 
in every 20 seconds I have track the location and put the tracked location 
into the array list. After a time period calculate the total distance by 

*total distance = dist at point[0,1]+ dist at point[1,2] 
+.+dist at point[n-1,n]

*where 0,1,2n is the index of array list location value.

After several test, Not got the accurate result. Approximately 60-70% of 
actual odometer value. Please guide if have some other alternative to be 
used.  
Please guide me how I got more accurate result.

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

2012-09-07 Thread Manmohan Singh
Hi

1. You can do this by making the custom button. Make a class and extends
the button class in same class  and in the paint method(inheritanced from
button class) you can draw the checkmark.

2. Set the background of the button with a check mark image on runtime.

Best regards
Man Mohan

On Fri, Sep 7, 2012 at 11:03 AM, Sadhna Upadhyay
sadhna.braah...@gmail.comwrote:

 Hi everybody,
  Actually i am trying to show check mark when i click on a
 button.I hope anyone of you will help me.







 Thanks and Regards:
   sadhana

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

2012-09-07 Thread Arjun
Hi  Karthikeyan R,

   I used your example in my android Testproject but i got some exception,
java.lang.NoClassDefFoundError: com.android.chimpchat.adb.AdbBackend Can 
you please tel me whats wrong i did?

Thanks
Arjun


On Wednesday, August 3, 2011 11:21:16 AM UTC+5:30, Karthikeyan R wrote:

 You can use shutdown() function from AdbBackend 

 On Aug 3, 3:06 am, Nitin Chhabra nitin.n...@gmail.com wrote: 
  Hi karthik, 
  
  Thanks for the help. I am able to run Monkeyrunner using Java. 
  But device.dispose(), does not seem to work, it does not close the 
  socket connection being made. 
  
  Is there any way around to disconnect my MonkeyRunner from the 
  device? 
  
  On Aug 2, 2:41 am, CCN CCN evansgel...@gmail.com wrote: 
  
  
  
  
  
  
  
   Hi Karthikeyan 
   I'm also trying to use monkeyrunner of Java, but running your example 
   I get an error: 
  
   12:29:20 E/adb: Failed to get the adb version: Cannot run program 
   adb: error=2, No such file or directory 
  
   Meaning the error is understandable, but I do not how to fix it znab. 
  
   I tried to fix the problem by connecting ddmlib in draft form and 
   directly in the code to set the path to the ADB but to no avail. The 
   application just freezes. 
  
   p.s. I'm sorry I do not know much English 
  
   On Aug 2, 11:34 am, Karthikeyan R dba.kart...@gmail.com wrote: 
  
Hi Nithin, 
  
I missed your post that is the reason for delayed reply. 
  
Please use the below snippet  (Make sure to include monkeyrunner, 
ddmlib, jython, sdklib jars) 
  
import com.android.monkeyrunner.adb.AdbBackend; 
import com.android.monkeyrunner.core.IMonkeyDevice; 
import com.android.monkeyrunner.core.TouchPressType; 
  
public class sampleMonkey { 
  
 public static void main(String[] args) { 
sampleMonkey monkey=new sampleMonkey(); 
monkey.demo(); 
 } 
 public void demo() 
 { 
AdbBackend adb = new AdbBackend(); 
IMonkeyDevice device = adb.waitForConnection(); 
  
// Actions should go here 
device.touch(200, 200,TouchPressType.DOWN); 
  
device.dispose(); 
 } 
  
} 
  
Thanks 
--Karthik 
  
On Jul 30, 1:53 am, Nitin Chhabra nitin.n...@gmail.com wrote: 
  
 Hi Bill/Karthikeyan, 
  
 Can you please help me out as well in this regard. I am able to 
 runMonkeyRunnerusing Python Scripts on Windows 
 Platform. But I would like to use it in Java, as my test 
 application 
 is being 
 built in Java. I am usingMonkeyRunnerto automate things only. I 
 can 
 call my Python script using Java to runMonkeyRunner, but that is 
 not 
 a clean solution! 
  
 Karthik, can you please help me as you have mentioned that you 
 have 
 got that running. Can you please point me to some sample code as 
 well. 
  
 On Jun 28, 9:44 am, Karthikeyan R dba.kart...@gmail.com wrote: 
  
  Hi Bill, 
  
  Thank you so much for pointing me to those links. 
  
  It helps me a lot and now I can able use monkey runner from 
 java. 
  
  This group is rocking . . . 
  
  Thanks 
  --Karthik 
  
  On Jun 28, 2:19 am, Bill Napier nap...@android.com wrote: 
  
  MonkeyRunneractually has a small example of doing this in it's 
 own source 
   code: 
  
  
 http://android.git.kernel.org/?p=platform/sdk.git;a=blob;f=monkeyrunn... 
  
   IMonkeyBackend adb = new AdbBackend(); 
   IMonkeyDevice device = adb.waitForConnection(); 
  
   And you can see the IMonkeyDevice source here:
 http://android.git.kernel.org/?p=platform/sdk.git;a=blob;f=monkeyrunn... 
  
   And see that it has a bunch of methods on it like 
 takeSnapshot, touch, 
   drag, etc. 
  
   Hopefully that's enough to get you started. 
  
   Bill 
  
   On Fri, Jun 24, 2011 at 7:27 PM, Karthikeyan R 
 dba.kart...@gmail.comwrote: 
  
Hi Bill, 
  
Thank you so much for sharing the information. 
  
we wanted to create a automation framework in java 
 havingMonkeyRunner 
as base. 
  
Could you give me one small sample using java, it will be 
 really 
helpful for us. 
  
To give you a context we wanted to automated the device as a 
 whole 
where we interact with multiple apk's  hope our choice of 
 monkey 
runner is right for that. 
  
Thank you in advance. 
  
Thanks 
--Karthik 
  
On Jun 24, 10:39 am, Bill Napier nap...@android.com 
 wrote: 
 If you mean from Java on the phone (like as part of an 
 application), then 
 the answer is no. 
  
 If you mean from Java on a computer, then the answer is 
 yes.  You just 
need 
 to make your java project depend on theMonkeyRunner.jar 
 and you can call 
 some of it's internal classes to do what you need. 
  
 We're in the middle of changing how the code is structured 
 to make this 
even 
 easier, 

[android-developers] Re: PBAP CLIENT

2012-09-07 Thread yulongfei
my proble  is the same with you , can you show your  source code on the web?
 
did you use uuid?
在 2011年5月20日星期五UTC+8下午6时27分18秒,Anirudh Kashyap写道:

 Hi, 

 I have implemented a PBAP client. I am able to establish a OBEX 
 Connection and connect to the PBAP server on the other android device. 

 I am able to retrieve the vcards from certain devices. 

 But I am not able to retrieve contacts from HTC Wildfire and DESIRE 
 HD. When i send the GET request to PBAP Server it returns me 
 OBEX_HTTP_UNAVAILABLE which is weired. 

 Please can someone let me know where I am going wrong?. 

 I am setting the following headers in the PBAP request 

 NAME : telecom/pb.vcf 
 TYPE : x-bt/phonebook 
 APPLICATION PARAMETERS : 

 FILTERS : 0x 
 START_OFFSET : 0 
 MAX_LIST_COUNT : 65535 
 FORMAT : VCARD2.1 
 The above parameters work fine with Nexus S and one more phone. 

 Regards, 
 anirudh

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

[android-developers] Re: WebView lost JavaScript update contents after called goBack()

2012-09-07 Thread Pan Ng
Did u come up with an anwser for this issue?

On Friday, November 18, 2011 6:23:32 PM UTC+8, alex wrote:

 I have a problem that when I click back button on a WebView, my
 previous page losts all contents updated by JavaScript.

 My steps in WebView was below:
 - after Main page loaded, JavaScript starts update contents, like
 refresh shoppings with links;
 - user will see some shopping lists after updated;
 - then user click each link will load new url in same WebView;
 - user click back to Main page;

 the problem is when user back to Main page, user cannot see any
 shopping updated by JavaScript, they were gone!
 I tried my page on IE and FF, both works fine, but had problem on
 Android WebView. I'm not sure this issue caused by I'm not set some
 settings correctly or other issues.

 My sample code as below:

 // set settings for webview
 WebSettings webSettings = web.getSettings();
 webSettings.setBuiltInZoomControls(true);
 webSettings.setJavaScriptEnabled(true);
 webSettings.setUseWideViewPort(true);
 webSettings.setDomStorageEnabled(true);
 webSettings.setJavaScriptCanOpenWindowsAutomatically(true);

 // call JavaScript to update shoppings
 webView.loadUrl(javascript:addShoppings( + str + ););

 // add interface for callback
 webView.addJavascriptInterface(new
 BusinessJavaScriptInterface(), business);

 final class BusinessJavaScriptInterface
 {
 public void businessListReceived()
 {
 ... ...
 }
 }

 // handle back key event
 public boolean onKeyDown(int keyCode, KeyEvent event)
 {
 WebView web = (WebView) this.findViewById(R.id.browser);
 if (web != null)
 {
 if ((keyCode == KeyEvent.KEYCODE_BACK)  web.canGoBack())
 {
 web.goBack();
 return true;
 }
 return super.onKeyDown(keyCode, event);
 }
 return false;
 }



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 support for Bluetooth LE (low energy 4.0) peripheral

2012-09-07 Thread maushah
Does Android (AOSP) support Bluetooth LE (4.0) *peripheral* support? 
Basically, can I use a peripheral LE broadcast module with another app 
processor running Android?

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

[android-developers] Re: Bluetooth Low Energy (BLE) - bluetooth 4.0 support

2012-09-07 Thread maushah
I would love to get the same answer. iOS 6 adds LE peripheral support so I 
am assuming AOSP will as well. When is the question!!

On Monday, November 28, 2011 9:47:13 AM UTC-8, Mik wrote:

 Dear all,

 I am looking forward the time when we could connect our android
 devices towards devices supporting BLE.
 Obviously I expect that android devices will support Dual profile
 (capability to connect via bluetooth towards old devices and towards
 Bluetooth low energy devices).

 If I understood correctly Android 4.0 platform should be able to
 handle the Bluetooth Health Device Profile
 is that bluetooth 4.0?

 Does anyone know if there is any existing device supporting BLE?
 Motorola Razr seems to be supporting Bluetooth 4.0 according to theirs
 specs, but it runs Android 2.3

 Did anyone had any experience with this technology?

 Any clarification to my confused mind is highly appreciated.

 Thanks,
 Mik



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

[android-developers] Porting Andriod OS Intel's Crossville Board

2012-09-07 Thread nitin singh
HI All,

I am having Crosville IVI development board with Meego OS installed on
it. I want to port Android OS on same board by removing Meego one.
Could anyone cite me the complete procedure to do the desired task.
Also how can i get the android OS image which is compatible for this
board (Intel E6 Series)

Any suggestion would be appreciable.

Thank 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] clearing Activity stack after crash

2012-09-07 Thread prashant
I looked into several blogs related to this topic. But have not got a 
suitable solution.
I use ACRA. When the application crashes I have an over ridden 
uncaughtException handler in which a custom message is displayed and kill 
the process and do an exit

android.os.Process.killProcess(android.os.Process.myPid());
System.exit(10);

By default android restores the activity stack after this. But I want to go 
back to the root activity and start the app from there. The current 
solution used in the app is in each of the activity stack is cleared if I 
find that process is restarted. But this is not feasible as there are more 
than 30 activities in the app and maintainability is an issue.

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

[android-developers] Dalvik's Instruction scheduling function is where?

2012-09-07 Thread DSS
Hi, I'm studing for Dalvik machine in Android.

I'm serching for the funtion that execute Global Instruction Scheduling. 
But I don't find where it's located.

Can you help me? please.

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

[android-developers] Re: PBAP CLIENT

2012-09-07 Thread yulongfei
/**
 * Defines the OBEX SERVICE UNAVAILABLE response code.
 * P
 * The value of codeOBEX_HTTP_UNAVAILABLE/code is 0xD3 (211).
 */
public static final int OBEX_HTTP_UNAVAILABLE = 0xD3;


I can connect to htc increditable s , it returns response code : 0xD3. 
(obex_http_available)

I  suffer from this problem a lot.

have you resolve it??? Please help me.
 my emai: yul...@gmail.com

在 2011年5月20日星期五UTC+8下午6时27分18秒,Anirudh Kashyap写道:

 Hi, 

 I have implemented a PBAP client. I am able to establish a OBEX 
 Connection and connect to the PBAP server on the other android device. 

 I am able to retrieve the vcards from certain devices. 

 But I am not able to retrieve contacts from HTC Wildfire and DESIRE 
 HD. When i send the GET request to PBAP Server it returns me 
 OBEX_HTTP_UNAVAILABLE which is weired. 

 Please can someone let me know where I am going wrong?. 

 I am setting the following headers in the PBAP request 

 NAME : telecom/pb.vcf 
 TYPE : x-bt/phonebook 
 APPLICATION PARAMETERS : 

 FILTERS : 0x 
 START_OFFSET : 0 
 MAX_LIST_COUNT : 65535 
 FORMAT : VCARD2.1 
 The above parameters work fine with Nexus S and one more phone. 

 Regards, 
 anirudh

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

[android-developers] Re: Multiple rows in 'Gallery' widget.

2012-09-07 Thread gbohrn
Write a custom adapter for the Gallery


On Friday, May 18, 2012 9:16:08 AM UTC-6, Put_tiMe wrote:

 Doesn't 'Gallery' widget support multiple rows?

 It just shows one row, no matter what ever I try.

 Basically I want 'GridView' widget with horizontal scrolling only.




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Rotated map view - how to get the touches back to where they belong?

2012-09-07 Thread Moésio Medeiros
on touch event you must use the inverted matrix used on dispatch draw of 
the view. Follow both method implementation:

private Matrix invertedMatrix = new Matrix();

private float[] tempLocation = new float[2];


@Override

protected void dispatchDraw(Canvas canvas) {

canvas.save(Canvas.MATRIX_SAVE_FLAG);

canvas.rotate(-mHeading, getWidth() * 0.5f, getHeight() * 0.5f);

canvas.getMatrix().invert(invertedMatrix);

mCanvas.delegate = canvas;

super.dispatchDraw(mCanvas);

canvas.restore();

}


@Override

public boolean dispatchTouchEvent(MotionEvent ev) {

float[] location = tempLocation;

location[0] = ev.getX();

location[1] = ev.getY();

invertedMatrix.mapPoints(location);

ev.setLocation(location[0], location[1]);

return super.dispatchTouchEvent(ev);

}

Em quinta-feira, 25 de fevereiro de 2010 00h30min22s UTC-3, lbendlin 
escreveu:

 I am using the MapsDemo example for a mapping application where I
 rotate the map in direction of travel. This works well even without
 the canvas smoothing in the example.

 However, I haven't yet managed to adjust the dispatchTouchEvent code
 to counter the map rotation effect for the user touches (right now
 when the map is rotated 90 degrees a user's horizontal sweep will move
 the map vertically etc).  The sample code only offers the teaser:

public boolean dispatchTouchEvent(MotionEvent ev) {
 // TODO: rotate events too
 return super.dispatchTouchEvent(ev);
 }

 Any guidance would be appreciated.

 And while I am at it - Is it still possible to position the zoom
 controls separately, so that they do NOT rotate when the map rotates?
 I read that the getZoomControls() is deprecated. (Why ?)



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

2012-09-07 Thread Squince
I have been attempting to get rid of our solution for some time, the 
products out there today are usually a yearly cost, and a high one at that.

Here are some tools I have found recently researching the question?

Is anyone going to build an open source MDM solution for smart phones? 
There is not one yet that is open source that I have found.

openmeap is a platform from which you can

http://www.openmeap.com/

Is a good one but develop the software yourself in HTML 5

Centrify is also a good integration product. But if your a large company 
the free version just wont work.
Also your allowing a proxy system around your firewall into the cloud.

http://www.centrify.com/mobile/mobile-security-management.asp


On Friday, August 31, 2012 2:06:26 AM UTC-4, Srikanth Turpu wrote:

 Hi, Whis is the best MDM server for android. How to develop our own MDM 
 server to manage devices remotely.

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

[android-developers] Screen Support in Android 3.2 (API level 13)

2012-09-07 Thread Javier Garcia Crespo
*
According to the note written in this documentation, the old groups are 
depecated (small, normal, large, and xlarge)*, thas why we have to migrate 
to new techique defined in Android 3.2

*
Note:* Beginning with Android 3.2 (API level 13), these size groups are 
deprecated in favor of a new technique for managing screen sizes based on 
the available screen width. If you're developing for Android 3.2 and 
greater, see Declaring Tablet Layouts for Android 
3.2http://developer.android.com/guide/practices/screens_support.html#DeclaringTabletLayoutsfor
 more information.


*My question is. How do we make diferent layout for small vs normal vs 
large screens in the new technique?. I try it and no find solutio, and I 
want to set a diferent layout for each one, and It said that is deprecated.*


*Old way clasification*

   - *xlarge* screens are at least 960dp x 720dp
   - *large* screens are at least 640dp x 480dp
   - *normal* screens are at least 470dp x 320dp
   - *small* screens are at least 426dp x 320dp

*
*

*New way*

   - 320dp: a typical phone screen (240x320 ldpi, 320x480 mdpi, 480x800 
   hdpi, etc).
   - 480dp: a tweener tablet like the Streak (480x800 mdpi).
   - 600dp: a 7” tablet (600x1024 mdpi).
   - 720dp: a 10” tablet (720x1280 mdpi, 800x1280 mdpi, etc).



   - *res/layout-sw320dp/main_activity.xml # For handsets (smaller than 
   600dp available width)*
   - * res/layout-sw600dp/main_activity.xml # For 7” tablets (600dp wide 
   and bigger)*
   - * res/layout-sw720dp/main_activity.xml # For 10” tablets (720dp wide 
   and bigger)*

















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

[android-developers] installation of audio in /mnt/sdcard

2012-09-07 Thread drstikko
Hello,

as far as I know only audio that is located in /mnt/sdcard is played by the 
webview class.
No my question is: how do I let the installation apk install the in a 
folder on /mnt/sdcard?
Or if people think it is possible to play them from the res or assets 
folder :  how do I do that?

regards,

Dave

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

[android-developers] Intercept layout android loading choice

2012-09-07 Thread Jose Ayerdis
Is there a way that I can intercept when does android decided which layout
to use, like for instance I want to have two different kind layouts tested
on different set of users, but I would like some random users load the
regular(even if they have hdpi devices) and others uses the hdpi.

The only thing that comes to mind is override the setContentView.

layout/mylayout.xml
layout-hdpi/mylayout.xml


Sincerly yours,

[Jose Luis Ayerdis Espinoza]
Necronet.info |
LinkedInhttp://www.linkedin.com/pub/jose-luis-ayerdis-espinoza/28/7b4/704|
Careers
StackOverflow http://careers.stackoverflow.com/necronet

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

[android-developers] asp.net to Android

2012-09-07 Thread prakash jha
I am a asp.net Developer know i want to move to android Development.


what i have to start from to learn Android

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

[android-developers] place audio in /mnt/sdcard during install

2012-09-07 Thread drstikko
Hi,

as far as I know I only can play sound from a webview with html5 if it is 
located in a folder on /mnt/sdcard.
My question is: how can I let a apk install place audio in a /mnt/sdcard 
folder?

Or, if it is possible: how can I play a audio file from the 'res' or 
'assets' folder from a html5 file in a webview?.

regards,

Dave

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

[android-developers] upload photos on web server.

2012-09-07 Thread vivekdave
Hi 

I am new to Android and I would like to create a simple application to 
upload photos on webserver. please let me know how to achieve it.any steps 
to complete it?

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

[android-developers] doubt on customview

2012-09-07 Thread vadivel rajan
 hi friends help me

i just want to create TextView , Button and Edittext using java code and
also extends the Linear layout in the class how to do?

advance thanks to u

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Any body have a clue with this bug : Adding window failed ?

2012-09-07 Thread 张维亚
我也遇到此问题了,解决了求告知

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

2012-09-07 Thread sparky
I think switching it in setContentView() is exactly right.  The main
question then is, how do you decide which user gets which layout, and
how do you make it consistent?  The latter, I would accomplish by
writing something into Shared Preferences.


On Sep 7, 2:16 pm, Jose Ayerdis joseayer...@gmail.com wrote:
 Is there a way that I can intercept when does android decided which layout
 to use, like for instance I want to have two different kind layouts tested
 on different set of users, but I would like some random users load the
 regular(even if they have hdpi devices) and others uses the hdpi.

 The only thing that comes to mind is override the setContentView.

 layout/mylayout.xml
 layout-hdpi/mylayout.xml

 Sincerly yours,

 [Jose Luis Ayerdis Espinoza]
 Necronet.info |
 LinkedInhttp://www.linkedin.com/pub/jose-luis-ayerdis-espinoza/28/7b4/704|
 Careers
 StackOverflow http://careers.stackoverflow.com/necronet

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

2012-09-07 Thread sparky
http://developer.android.com/training/basics/firstapp/index.html

On Sep 7, 10:52 am, vadivel rajan getvadi...@gmail.com wrote:
  hi friends help me

 i just want to create TextView , Button and Edittext using java code and
 also extends the Linear layout in the class how to do?

 advance thanks to u

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Screen Support in Android 3.2 (API level 13)

2012-09-07 Thread Mark Murphy
On Fri, Sep 7, 2012 at 6:28 AM, Javier Garcia Crespo jgarc...@gmail.com wrote:
 According to the note written in this documentation, the old groups are
 depecated (small, normal, large, and xlarge), thas why we have to migrate to
 new techique defined in Android 3.2

Deprecated in Android usually means we think we have a better
solution for you that you should consider.

 My question is. How do we make diferent layout for small vs normal vs large
 screens in the new technique?

If you are supporting Android 3.1 and earlier, use -small, -normal,
-large, -xlarge.

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

_The Busy Coder's Guide to Android Development_ Version 4.1 Available!

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


Re: [android-developers] Dalvik's Instruction scheduling function is where?

2012-09-07 Thread Mark Murphy
Questions regarding the Android open source code belong on a Google
Group listed on the http://source.android.com site. This group is for
developing applications with the Android SDK.

On Fri, Sep 7, 2012 at 1:48 AM, DSS frombc7...@gmail.com wrote:
 Hi, I'm studing for Dalvik machine in Android.

 I'm serching for the funtion that execute Global Instruction Scheduling. But
 I don't find where it's located.

 Can you help me? please.

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



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

_The Busy Coder's Guide to Android Development_ Version 4.1 Available!

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


[android-developers] soap+android related problem

2012-09-07 Thread rauf qureshi
can any body tell me how to send soap request in json format

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

Re: [android-developers] Screen Support in Android 3.2 (API level 13)

2012-09-07 Thread Javier Garcia Crespo
OK, then there is no way in the new technique. No solution to consider.

El viernes, 7 de septiembre de 2012 15:26:49 UTC+2, Mark Murphy (a Commons 
Guy) escribió:

 On Fri, Sep 7, 2012 at 6:28 AM, Javier Garcia Crespo 
 jgar...@gmail.comjavascript: 
 wrote: 
  According to the note written in this documentation, the old groups are 
  depecated (small, normal, large, and xlarge), thas why we have to 
 migrate to 
  new techique defined in Android 3.2 

 Deprecated in Android usually means we think we have a better 
 solution for you that you should consider. 

  My question is. How do we make diferent layout for small vs normal vs 
 large 
  screens in the new technique? 

 If you are supporting Android 3.1 and earlier, use -small, -normal, 
 -large, -xlarge. 

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

 _The Busy Coder's Guide to Android Development_ Version 4.1 Available! 


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

[android-developers] How to add a dynamic editable text area to a LinearLayout

2012-09-07 Thread plw
 I am writting an app that reads a database and dispays the record contents 
to the screen which can the be changed and  the database updated. How do I 
add the text field dynamically to the linearlayout do they are editable? I 
thought it was something like TextView tv = new TextView(null); to start 
with but that crashes. 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] How to add a dynamic editable text area to a LinearLayout

2012-09-07 Thread Justin Anderson

 I thought it was something like TextView tv = new TextView(null); to start
 with but that crashes.


Well... did you look at the error you get when it crashes?  I'm guessing
that you can't pass in null for a context...


Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Fri, Sep 7, 2012 at 7:55 AM, plw i...@knutsford-software.co.uk wrote:

  I am writting an app that reads a database and dispays the record
 contents to the screen which can the be changed and  the database updated.
 How do I add the text field dynamically to the linearlayout do they are
 editable? I thought it was something like TextView tv = new TextView(null);
 to start with but that crashes. Thanks

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

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

Re: [android-developers] soap+android related problem

2012-09-07 Thread Justin Anderson
Yeah... it is called Google

   -
   http://android-dev-tips-and-tricks.blogspot.com/2012/08/so-you-need-help.html
   - http://lmgtfy.com/?q=android+soap+request


Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Fri, Sep 7, 2012 at 7:38 AM, rauf qureshi qureshira...@gmail.com wrote:

 can any body tell me how to send soap request in json format

 please reply
 thanks in advance

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

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

Re: [android-developers] Screen Support in Android 3.2 (API level 13)

2012-09-07 Thread Mark Murphy
On Fri, Sep 7, 2012 at 9:44 AM, Javier Garcia Crespo jgarc...@gmail.com wrote:
 OK, then there is no way in the new technique. No solution to consider.

You already posted the answer for the new technique in your original
email. It's just that the new technique only works on new devices.

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

_The Busy Coder's Guide to Android Development_ Version 4.1 Available!

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


Re: [android-developers] asp.net to Android

2012-09-07 Thread Justin Anderson
Step 1: Learn Java... There are lots of Java tutorials online
Step 2: Learn Android... Start here: http://developer.android.com

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Fri, Sep 7, 2012 at 1:15 AM, prakash jha pramu...@gmail.com wrote:

 I am a asp.net Developer know i want to move to android Development.


 what i have to start from to learn Android

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

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

Re: [android-developers] How to add a dynamic editable text area to a LinearLayout

2012-09-07 Thread Knutsford Software
I did but it wasn't very helpful. I have just this minute solved it though

I needed something like


EditText et = new EditText(v.getContext());









Thanks

  - Original Message - 
  From: Justin Anderson 
  To: android-developers@googlegroups.com 
  Sent: Friday, September 07, 2012 3:07 PM
  Subject: Re: [android-developers] How to add a dynamic editable text area to 
a LinearLayout


I thought it was something like TextView tv = new TextView(null); to start 
with but that crashes.


  Well... did you look at the error you get when it crashes?  I'm guessing that 
you can't pass in null for a context...


  Thanks,
  Justin Anderson
  MagouyaWare Developer
  http://sites.google.com/site/magouyaware



  On Fri, Sep 7, 2012 at 7:55 AM, plw i...@knutsford-software.co.uk wrote:

 I am writting an app that reads a database and dispays the record contents 
to the screen which can the be changed and  the database updated. How do I add 
the text field dynamically to the linearlayout do they are editable? I thought 
it was something like TextView tv = new TextView(null); to start with but that 
crashes. Thanks


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



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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Screen Support in Android 3.2 (API level 13)

2012-09-07 Thread Javier Garcia Crespo
Yes new devices with android 3.2 upper. Hvga wvga no way to select diferent 
layout with new technique. Poor. I have to make a test mixing horenration and 
dps selector .h240-por or h320-land

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 remove(clear) shared preferences of one application from other application?

2012-09-07 Thread Abhishek Kumar Gupta
Hi Amey,

Thanks for the reply. I have tried but it is not working.

I am unable to delete .bak file of the 
sharedpreferences(profile_preference) of application having package 
com.android.blesettings. I have tried the following code:

 File file = new 
File(/data/data/com.android.blesettings/shared_prefs/profile_preference.xml.bak);
 file.delete();
 But still .bak file is present and data is retrieved from it. I am trying 
to clear the preferences of application having package 
com.android.blesettings from Settings(default) application of ICS source.

On Friday, 7 September 2012 16:31:37 UTC+5:30, Abhishek Kumar Gupta wrote:

 I want to remove(clear) the sharedpreferences of one application from 
 other application. I have tried the following code in the other application 
 to remove preferences of application having package 
 com.android.blesettings:

 Context context = getActivity().createPackageContext(
 com.android.blesettings, 0);
 SharedPreferences mSettings = 
 mSettingsContext.getSharedPreferences(
 profile_preference, MODE_WORLD_READABLE);
 SharedPreferences.Editor mSettingsEditor = 
 mBLESettings.edit();
 mSettingsEditor.remove(proximity_settings);
 mSettingsEditor.commit();

 I am able to remove(clear) the value of the sharedpreference of 
 application(that I have observed by looking the profile_settings file) 
 but it is taking value(previously saved) from the *.bak* file of the 
 sharedpreferences.

 How to resolve this issue? Any help or guidance will be well appreciated.  



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

Re: [android-developers] Re: Live wallpaper. nullPointerException when detecting preview mode

2012-09-07 Thread Harri Smått
Hi,

It's very much sure isPreview() does not work within service Engine
instantitation method. Not only for null pointer but there's no way newly
created Engine knew whether it's in preview mode or not.

Also, bear in mind it's not guaranteed a new Engine is created for preview
and actual wallpaper. If implemented cleverly same Engine instance can be
used for both situations.

--
H
On Sep 7, 2012 1:45 PM, Calin Perebiceanu calin.perebice...@gmail.com
wrote:

 I've looked at WallpaperService source code, and I pretty sure you can't
 use  isPreview  in onCreateEngine.


 On Friday, 7 September 2012 11:00:46 UTC+3, JPS wrote:



 On Friday, September 7, 2012 9:19:42 AM UTC+2, JPS wrote:

 Hi
 I am developing a live wallpaper and want the preview mode to display a
 bitmap as opposed to the regular animation in run mode.

 I know I should use the isPreview() call and all my searches indicate
 that I should do this in the onCreateEngine() method which is what I did.
 However I get a nullPointerException. I have tried other locations and the
 only locations it works are located too far down to perform initialisation.

 Any help is Greatly appreciated.

 Thanks

 JPS


 @Override
 public Engine onCreateEngine() {
 mEng = new WallpaperEngine();

 if (mEng!= null) {
 *if (mEng.isPreview()) { // crash here*
 Log.d(TAG, preview mode);
 // display preview bitmap
 } else {
 Log.d(TAG, run mode);
 // perform full initalization
 }
 }

 return mEng;
 }


 Hi Calin

 here is the crash log

 09-07 09:58:33.441: E/AndroidRuntime(2101): FATAL EXCEPTION: main
 09-07 09:58:33.441: E/AndroidRuntime(2101): java.lang.NullPointerException
 09-07 09:58:33.441: E/AndroidRuntime(2101): at android.service.wallpaper.
 **WallpaperService$Engine.**isPreview(WallpaperService.**java:332)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at
 com.aajo.appia.LiveWallpaper.**onCreateEngine(LiveWallpaper.**java:205)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at android.service.wallpaper.
 **WallpaperService$**IWallpaperEngineWrapper.**executeMessage(**
 WallpaperService.java:872)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at com.android.internal.os.**
 HandlerCaller$MyHandler.**handleMessage(HandlerCaller.**java:61)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at android.os.Handler.**
 dispatchMessage(Handler.java:**99)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at
 android.os.Looper.loop(Looper.**java:130)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at
 android.app.ActivityThread.**main(ActivityThread.java:3683)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at java.lang.reflect.Method.*
 *invokeNative(Native Method)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at java.lang.reflect.Method.*
 *invoke(Method.java:507)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at com.android.internal.os.**
 ZygoteInit$**MethodAndArgsCaller.run(**ZygoteInit.java:839)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at com.android.internal.os.**
 ZygoteInit.main(ZygoteInit.**java:597)
 09-07 09:58:33.441: E/AndroidRuntime(2101): at dalvik.system.NativeStart.
 **main(Native Method)

 Is this what you needed?

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] How to add a dynamic editable text area to a LinearLayout

2012-09-07 Thread Justin Anderson

 I did but it wasn't very helpful.


If you know how to read a Java stacktrace it would be very helpful.

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Fri, Sep 7, 2012 at 8:21 AM, Knutsford Software 
i...@knutsford-software.co.uk wrote:

 I did but it wasn't very helpful.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 remove(clear) shared preferences of one application from other application?

2012-09-07 Thread TreKing
On Fri, Sep 7, 2012 at 10:13 AM, Abhishek Kumar Gupta
akgaec2...@gmail.comwrote:

 I am unable to delete .bak file of the
 sharedpreferences(profile_preference) of application having package
 com.android.blesettings. I have tried the following code:

  File file = new
 File(/data/data/com.android.blesettings/shared_prefs/profile_preference.xml.bak);
   file.delete();


What makes you think you can just arbitrarily delete the files of another
application?

delete() return true or false if it succeeded or not. Check it. It's
probably always false because you have no permission to be doing this.

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

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

Re: [android-developers] upload photos on web server.

2012-09-07 Thread TreKing
On Fri, Sep 7, 2012 at 5:22 AM, vivekdave vivekdd...@gmail.com wrote:

 I am new to Android and I would like to create a simple application to
 upload photos on webserver. please let me know how to achieve it.any steps
 to complete it?


If you don't already know how to go about this, this is not going to be
simple.

Steps:
Read the docs.
Try something.
Use Google.
As a last resort, ask here with a *a very specific* question if you need
help.

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

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

Re: [android-developers] clearing Activity stack after crash

2012-09-07 Thread TreKing
On Fri, Sep 7, 2012 at 12:16 AM, prashant kspr...@gmail.com wrote:

 I have an over ridden uncaughtException handler in which a custom message
 is displayed and kill the process and do an exit

 android.os.Process.killProcess(android.os.Process.myPid());
 System.exit(10);


Why?


 By default android restores the activity stack after this. But I want to
 go back to the root activity and start the app from there.


Why?

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

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

Re: [android-developers] Android Track Location Issue

2012-09-07 Thread TreKing
On Thu, Sep 6, 2012 at 8:54 AM, AndroidDev androidteste...@gmail.comwrote:

 After several test, Not got the accurate result. Approximately 60-70% of
 actual odometer value. Please guide if have some other alternative to be
 used.
 Please guide me how I got more accurate result.


Don't use the network provider if accuracy is what you're after.

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

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

Re: [android-developers] School project help needed.

2012-09-07 Thread TreKing
On Fri, Sep 7, 2012 at 7:33 AM, Amey Bapat amey.n.ba...@gmail.com wrote:

 Domin8rJ
 listen up buddy,
 wid due respect to the prev posts on this thread heres an idea for u..
 u might take tym fr it but its k
 jus take any chap or couple of chaps frm any subject and jus create an
 app..
 so i would b like having a chap in ur phone..
 automating it in a way towards smarter education..
 jus draw some sample screens on a paper,try to go thru chapters frm mark
 murphy's book so that screens smehw can b designed..
 later on things will fall into place slowly wid event handling an all..
 jus try it..any help in that matter mail me okk..
 it can turn out to b very difficult for u but try it out..
 its fun coding in android..


This post is an affront to the English language.

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

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

Re: [android-developers] Animation moving image in random

2012-09-07 Thread TreKing
On Fri, Sep 7, 2012 at 5:49 AM, Haris haris...@gmail.com wrote:

 So as the next step I need to move an arrow throughout the screen. I
 searched in internet a lotPlease help..


Help with what? You provided almost no information. What *exactly* do you
need help with?

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

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

Re: [android-developers] date

2012-09-07 Thread TreKing
On Fri, Sep 7, 2012 at 3:31 AM, Sadhna Upadhyay
sadhna.braah...@gmail.comwrote:

   how to store date in sqlite and do sql query on date


A: This is not specific to Android.
B: http://justfuckinggoogleit.com/

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

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

[android-developers] Thread

2012-09-07 Thread bob
 

What do you normally do on Android when you spawn a thread but the thread 
needs to access 

your Activity object?  Do you typically pass the Activity object to your 
own constructor for the Thread?


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

2012-09-07 Thread RichardC
Pass in the Activity object and hold it in a WeakReference in the thread 
class.  

Using a WeakReference means that you will not leak memory if your Activity 
is destroyed before your thread completes and also if you find that the 
WeakReference is null you know that the Activity has gone away.




On Friday, September 7, 2012 5:18:46 PM UTC+1, bob wrote:

 What do you normally do on Android when you spawn a thread but the thread 
 needs to access 

 your Activity object?  Do you typically pass the Activity object to your 
 own constructor for the Thread?




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

2012-09-07 Thread Larry Meadors
That's probably unsafe due to the lifecycle of activities. What's the use case?

Larry


On Fri, Sep 7, 2012 at 10:18 AM, bob b...@coolfone.comze.com wrote:
 What do you normally do on Android when you spawn a thread but the thread
 needs to access

 your Activity object?  Do you typically pass the Activity object to your own
 constructor for the Thread?


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

2012-09-07 Thread Mark Phillips
+200
On Sep 7, 2012 8:57 AM, TreKing treking...@gmail.com wrote:

 On Fri, Sep 7, 2012 at 7:33 AM, Amey Bapat amey.n.ba...@gmail.com wrote:

 Domin8rJ
 listen up buddy,
 wid due respect to the prev posts on this thread heres an idea for u..
 u might take tym fr it but its k
 jus take any chap or couple of chaps frm any subject and jus create an
 app..
 so i would b like having a chap in ur phone..
 automating it in a way towards smarter education..
 jus draw some sample screens on a paper,try to go thru chapters frm mark
 murphy's book so that screens smehw can b designed..
 later on things will fall into place slowly wid event handling an all..
 jus try it..any help in that matter mail me okk..
 it can turn out to b very difficult for u but try it out..
 its fun coding in android..


 This post is an affront to the English language.


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

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

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

Re: [android-developers] School project help needed.

2012-09-07 Thread Amey Bapat
well i agree its a bit difficult to understand it..
but it is ok.deal with it..!!

On Fri, Sep 7, 2012 at 10:16 PM, Mark Phillips
m...@phillipsmarketing.bizwrote:

 +200
 On Sep 7, 2012 8:57 AM, TreKing treking...@gmail.com wrote:

 On Fri, Sep 7, 2012 at 7:33 AM, Amey Bapat amey.n.ba...@gmail.comwrote:

 Domin8rJ
 listen up buddy,
 wid due respect to the prev posts on this thread heres an idea for u..
 u might take tym fr it but its k
 jus take any chap or couple of chaps frm any subject and jus create an
 app..
 so i would b like having a chap in ur phone..
 automating it in a way towards smarter education..
 jus draw some sample screens on a paper,try to go thru chapters frm mark
 murphy's book so that screens smehw can b designed..
 later on things will fall into place slowly wid event handling an all..
 jus try it..any help in that matter mail me okk..
 it can turn out to b very difficult for u but try it out..
 its fun coding in android..


 This post is an affront to the English language.


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

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

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




-- 
live and let LIVE!!!

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

2012-09-07 Thread Vivek Dave
I worked on android, I am not newbie to it. actually, I got the idea but it
was not impressive.
but i need help for it. or any thing which can help me to sort out the
problem.

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] speak action automatic

2012-09-07 Thread Ray da Costa
Hi friends, a help ... Anyone know if there is any listener to be listening
to the microphone to a sound when it detects it recener this sound in the
onActivityResult Activity?

-- 
Ray da Costa
The best way to predict the future is to invent it.
Alan Kay

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

[android-developers] Adding Contacts

2012-09-07 Thread akash
Hi,
I am trying to add new contact using my android application, but not able 
to get this. 
This code always execute catch and returns false. Is there any additional 
settings i need to apply.

I have already added following permissions to my Manifest file. 

 uses-permission android:name=android.permission.READ_CONTACTS/

 uses-permission android:name=android.permission.WRITE_CONTACTS/   

 uses-permission android:name=android.permission.GET_ACCOUNTS /

CODE:

public static boolean insertAndroidContact(Account account, String name, 
String username, String headline)
{
ArrayListContentProviderOperation batch = new 
ArrayListContentProviderOperation();
ContentResolver resolver = 
AndroidAddressBookConnector.getInstance().getContext().getContentResolver();

ContentProviderOperation.Builder builder = 
ContentProviderOperation.newInsert(RawContacts.CONTENT_URI);
builder.withValue(RawContacts.ACCOUNT_NAME, account.name);
builder.withValue(RawContacts.ACCOUNT_TYPE, account.type);
builder.withValue(RawContacts.SYNC1, username);
batch.add(builder.build());

builder = 
ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI);

builder.withValueBackReference(ContactsContract.CommonDataKinds.StructuredName.RAW_CONTACT_ID,
 
0);
builder.withValue(ContactsContract.Data.MIMETYPE, 
ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE);

builder.withValue(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME, 
name);
batch.add(builder.build());

builder = 
ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI);

builder.withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0);
builder.withValue(ContactsContract.Data.DATA1, headline);
builder.withValue(ContactsContract.Data.DATA2, Mydata);
batch.add(builder.build());

try{
resolver.applyBatch(ContactsContract.AUTHORITY, batch);
return true;
}
catch(Exception e)
{
return(false);
}
}


Thank you
Akash

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

[android-developers] Customer can't see my app in the app store.

2012-09-07 Thread Toby

I've got hundreds of install, but this is the first person that
can't find my app by searching in the play store.  I'm requiring
Android 2.2, and she says she is running 2.6.  I'm requiring some
permissions:

HARDWARE CONTROLS
TAKE PICTURES AND VIDEOS
Allows the app to take pictures and videos with the camera. This allows the app 
at any time to collect images the camera is seeing.
NETWORK COMMUNICATION
FULL INTERNET ACCESS
Allows the app to create network sockets.
YOUR PERSONAL INFORMATION
READ CONTACT DATA
Allows the app to read all of the contact (address) data stored on your tablet. 
Malicious apps may use this to send your data to other people. Allows the app 
to read all of the contact (address) data stored on your phone. Malicious apps 
may use this to send your data to other people.
PHONE CALLS
READ PHONE STATE AND IDENTITY
Allows the app to access the phone features of the device. An app with this 
permission can determine the phone number and serial number of this phone, 
whether a call is active, the number that call is connected to and the like.

What are some of the reasons that the app might not show up for
these two phones after hundreds of successful installs?

Thanks,

Tobiah

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

2012-09-07 Thread TreKing
On Fri, Sep 7, 2012 at 11:58 AM, Amey Bapat amey.n.ba...@gmail.com wrote:

 well i agree its a bit difficult to understand it..
 but it is ok.deal with it..!!


No, it is not OK. You make it difficult for everyone to understand what
you're saying and you come off like an illiterate spammer. Instead of
everyone on this group dealing with it, how about *you* learn to spell?

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

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

Re: [android-developers] upload photos on web server.

2012-09-07 Thread TreKing
On Fri, Sep 7, 2012 at 11:59 AM, Vivek Dave vivekdd...@gmail.com wrote:

 but i need help for it. or any thing which can help me to sort out the
 problem.


First you need to clearly explain what it is that you need help for and
what this problem is that you need help sorting out. Your post is broad
and vague.

http://www.catb.org/~esr/faqs/smart-questions.html

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

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

Re: [android-developers] speak action automatic

2012-09-07 Thread TreKing
On Fri, Sep 7, 2012 at 12:24 PM, Ray da Costa raydaco...@gmail.com wrote:

 Hi friends, a help ... Anyone know if there is any listener to be listening
 to the microphone to a sound when it detects it recener this sound in the
 onActivityResult Activity?


If I understood you correctly, I think you want SpeechRecognizer. If not,
you really need to clarify your question.

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

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

Re: [android-developers] Customer can't see my app in the app store.

2012-09-07 Thread TreKing
On Fri, Sep 7, 2012 at 12:49 PM, Toby t...@tobiah.org wrote:

 I'm requiring Android 2.2, and she says she is running 2.6.


The fact that 2.6 does not exist might be the first problem.
http://developer.android.com/about/dashboards/index.html


 TAKE PICTURES AND VIDEOS
 Allows the app to take pictures and videos with the camera. This allows
 the app at any time to collect images the camera is seeing.



 What are some of the reasons that the app might not show up for
 these two phones after hundreds of successful installs?


They don't have a camera?

I think you need a lot more info from this user about their device and the
OS they're running.

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

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

Re: [android-developers] Thread

2012-09-07 Thread bob
 

The use case is that the thread may want to call Activity.startActivity().

On Friday, September 7, 2012 11:35:50 AM UTC-5, Larry Meadors wrote:

 That's probably unsafe due to the lifecycle of activities. What's the use 
 case? 

 Larry 


 On Fri, Sep 7, 2012 at 10:18 AM, bob b...@coolfone.comze.comjavascript: 
 wrote: 
  What do you normally do on Android when you spawn a thread but the 
 thread 
  needs to access 
  
  your Activity object?  Do you typically pass the Activity object to your 
 own 
  constructor for the Thread? 
  
  
  -- 
  You received this message because you are subscribed to the Google 
  Groups Android Developers group. 
  To post to this group, send email to 
  android-d...@googlegroups.comjavascript: 
  To unsubscribe from this group, send email to 
  android-developers+unsubscr...@googlegroups.com javascript: 
  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 can I put different resources for different dpi on ICS with the same sw800dp smallest width?

2012-09-07 Thread Leo
 

How can I put different resources for different dpi on ICS with the same 
sw800dp smallest width?

Details: There are two tablets with ICS 4.0.4. First one has 1280x800 
resolution and mdpi (160) density. Second one has 1920x1200 resolution and 
hdpi (240) density. So in terms of smallest width they both have the same 
sw800dp qualifier but different mdpi/hdpi density qualifiers.

I need to have different layouts and images for these two resolutions. 

So I created two directories:

layout-sw800dp-mdpi

layout-sw800dp-hdpi

I thought that each device will choose its own directory according to the 
smallest width AND density. BUT both of them take resources from the same 
sw800dp-hdpi folder!

I'm very confused and do not know how to separate resources for that two 
different resolutions.

Any help is really appreciated. Thanks in advance.
 http://stackoverflow.com/questions/tagged/android

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

[android-developers] Operation Timeout

2012-09-07 Thread SoftMan
Hi, I would like some help with this error. I can not find the way to go 
with this. The error is: The operation timed out

I have two projects stopped by this error, and can not find the solution. I 
set the value of the timeout to zero, so I never stops for time. But I 
never work and always return the same error after a long time.

This is the full error:

09-07 13:54:22.823: E/ServicioRest(8804): java.net.SocketException: The 
 operation timed out
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 org.apache.harmony.luni.platform.OSNetworkSystem.connectStreamWithTimeoutSocketImpl(Native
  
 Method)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 org.apache.harmony.luni.platform.OSNetworkSystem.connect(OSNetworkSystem.java:115)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:244)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:533)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 java.net.Socket.connect(Socket.java:1055)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:143)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 com.silm.request.OrderRequestParser.listOrderRequest(OrderRequestParser.java:49)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 com.silm.activities.InboxHandler.initComponents(InboxHandler.java:86)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 com.silm.activities.InboxHandler.onCreate(InboxHandler.java:70)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 android.app.ActivityThread.access$2300(ActivityThread.java:125)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 android.os.Handler.dispatchMessage(Handler.java:99)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 android.os.Looper.loop(Looper.java:123)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 android.app.ActivityThread.main(ActivityThread.java:4627)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 java.lang.reflect.Method.invokeNative(Native Method)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 java.lang.reflect.Method.invoke(Method.java:521)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
 09-07 13:54:22.823: E/ServicioRest(8804): at 
 dalvik.system.NativeStart.main(Native Method)


This is where the error comes from:


try {
/*
HttpParams httpParameters = new BasicHttpParams();
HttpConnectionParams.setConnectionTimeout(httpParameters, 0);
HttpConnectionParams.setSoTimeout(httpParameters, 0);
HttpConnectionParams.setTcpNoDelay(httpParameters, true);
*/
httpClient = new DefaultHttpClient();
del = new HttpGet(url);
del.setHeader(content-type, application/json);
 HttpResponse resp = httpClient.execute(del);

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

Re: [android-developers] How can I put different resources for different dpi on ICS with the same sw800dp smallest width?

2012-09-07 Thread Mark Murphy
On Fri, Sep 7, 2012 at 2:27 PM, Leo leonidthek...@gmail.com wrote:
 I need to have different layouts and images for these two resolutions.

I can see having different images. Why different layouts based on density?

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

_The Busy Coder's Guide to Android Development_ Version 4.1 Available!

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


[android-developers] Re: How can I put different resources for different dpi on ICS with the same sw800dp smallest width?

2012-09-07 Thread RichardC
Have you taken into account that the smallest width is the available 
width (to your application) not the physical screen width i.e. it is the 
physical width minus any persistent UI elements such as soft buttons (home, 
back, etc).

On Friday, September 7, 2012 7:27:35 PM UTC+1, Leo wrote:

 How can I put different resources for different dpi on ICS with the same 
 sw800dp smallest width?

 Details: There are two tablets with ICS 4.0.4. First one has 1280x800 
 resolution and mdpi (160) density. Second one has 1920x1200 resolution and 
 hdpi (240) density. So in terms of smallest width they both have the same 
 sw800dp qualifier but different mdpi/hdpi density qualifiers.

 I need to have different layouts and images for these two resolutions. 

 So I created two directories:

 layout-sw800dp-mdpi

 layout-sw800dp-hdpi

 I thought that each device will choose its own directory according to the 
 smallest width AND density. BUT both of them take resources from the same 
 sw800dp-hdpi folder!

 I'm very confused and do not know how to separate resources for that two 
 different resolutions.

 Any help is really appreciated. Thanks in advance.
  http://stackoverflow.com/questions/tagged/android

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

Re: [android-developers] Thread

2012-09-07 Thread Streets Of Boston
I'm guessing here a little bit, but is this what you want?:

The user is in ActivityA. THe user clicks on a button or does something 
that requires a background Thread to do so processing.
When the Thread is done (successfully), the thread needs to spawn/start 
ActivityB

If so,
use an AsyncTask. Subclass it into your own (static) subclass.

Create an instance of this class. When the task needs to run, instantiate 
it and call 'execute' on it.
This will cause its doInBackground method to run in a background thread.
When this method return, the onPostExecute is called. Use this to start 
ActivityB.

In the mean time, design your subclass to add a method that allows 
ActivityA to register itself (upon instantation/execute) and to deregister 
itself (e.g. when ActiivtA's onDestroy is called). If ActivityA is 
deregistered, you can code your subclass' doInBackground and/or 
onPostExecute method to stop or do nothing.


On Friday, September 7, 2012 2:16:52 PM UTC-4, bob wrote:

 The use case is that the thread may want to call Activity.startActivity().

 On Friday, September 7, 2012 11:35:50 AM UTC-5, Larry Meadors wrote:

 That's probably unsafe due to the lifecycle of activities. What's the use 
 case? 

 Larry 


 On Fri, Sep 7, 2012 at 10:18 AM, bob b...@coolfone.comze.com wrote: 
  What do you normally do on Android when you spawn a thread but the 
 thread 
  needs to access 
  
  your Activity object?  Do you typically pass the Activity object to 
 your own 
  constructor for the Thread? 
  
  
  -- 
  You received this message because you are subscribed to the Google 
  Groups Android Developers group. 
  To post to this group, send email to android-d...@googlegroups.com 
  To unsubscribe from this group, send email to 
  
  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: tts text to speech can read Russian

2012-09-07 Thread lselwd
is it able an Android app speak Russian TTS? jelly bean? IF YES WHAT 
VERSIONS FROM 2.2 AND ABOVE?

On Wednesday, September 5, 2012 11:08:14 PM UTC+3, lselwd wrote:

 tts text to speech can read Russian, ...? I make it 
 read English but Russian spell slash and numbers arbitrarily...? 

 yes can read Ru... / No can not read Ru...


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