Re: [android-developers] Lock Orientation at runtime

2015-01-03 Thread TreKing
On Fri, Jan 2, 2015 at 8:56 PM, Nathan  wrote:

> I wanted to know if it is possible to lock the orientation of an activity
> at runtime.


http://stackoverflow.com/questions/2366706/how-to-lock-orientation-during-runtime

-
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] how to communicate with a print machine?

2015-01-03 Thread Belhouchet Ines
What are the possible solutions for linking an android client to a print
machine??
I'm thinking about Bluetooth or maybe socket(internet choice) so please
which one I can use ??
Thanks
-- 
Best Regards
*Belhouchet INES*

Android Developer
# GNU/Linux addicted
Cell number:  00216 21276914

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] how to communicate with a print machine?

2015-01-03 Thread Ines
What are the possible solutions for linking an android client to a print 
machine??
I'm thinking about Bluetooth or maybe socket(internet choice) so please 
which one I can use ??
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Is it possible to pass intent to bound service public methods?

2015-01-03 Thread Ji
Hi All,
 
 My goal is to initiate new activity from the Launcher activity on 
click of a button on launcher activity. I am trying  to achieve this by 
using bound service. My launcher activity binds to service and calls the 
public api method. The parameter to the api method is intent. Method 
extracts data from intent and makes decision on which next activity to 
start.  Can someone let me know if it is possible to start new activity by 
passing intent to a bound service api method?

Thanks,
Ji

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] why zygote process name change to "main" in Lollipop, Is it a bug?

2015-01-03 Thread perry shan
hi,

I notice that the zygote process name change to "main" Lollipop , but in
KitKat and before, the zygote process name is "zygote".

in Lollipop:

$ adb shell ps | grep -i zygote

root  376   1 1492064 67316   S zygote



$ adb shell cat /proc/376/stat

376 (main) R 1 376 0 0 -1 4194560 170602 262860 825 248 283 137 226 174 20
0 1 0 637 1522405376 16861 4294967295 1 1 0 0 0 0 4612 0 103672 4294967295
0 0 17 3 0 0 0 0 0 0 0 0



$ adb shell cat /proc/376/comm

main


in KitKat:

$ adb shell ps | grep -i zygote

root  329   1 867640 64860   S zygote



$ adb shell cat /proc/329/stat

329 (zygote) S 1 329 0 0 -1 1077936384 106227 3303200 682 1688 618 798
27926 9112 20 0 4 0 1254 888463360 16215 4294967295 1 1 0 0 0 0 4612 0
103672 4294967295 0 0 17 0 0 0 0 0 0 0 0 0



$ adb shell cat /proc/329/comm

zygote


In app_main.cpp when start zygote, it will set nicename, and set the
process name with niceName.


frameworks/base/cmds/app_process/app_main.cpp


int main(int argc, char* const argv[])

...

if (strcmp(arg, "--zygote") == 0) {

zygote = true;

niceName = ZYGOTE_NICE_NAME;

...

if (!niceName.isEmpty()) {

runtime.setArgv0(niceName.string());

set_process_name(niceName.string());

}


but in new AndroidRuntime ART, the will change the name "zygote" to "main"

if (zygote) {

runtime.start("com.android.internal.os.ZygoteInit", args);


#0  0xb6f0116c in prctl  /system/lib/libc.so

bionic/libc/arch-arm/syscalls/prctl.S:16

#1  0xb6edda48 in pthread_setname_np+0x0040(+64)  /system/lib/libc.so

bionic/libc/bionic/pthread_setname_np.cpp:56

  t (long int) = -1225441592(0xb6f53ec8)

  thread_name (char *) = 0xbedc94a4 "main" [@ENTRY=0xbedc94a4 "main"]

#2  0xb4f479ae in art::SetThreadName+0x006e(+110)  /system/lib/libart.so

art/runtime/utils.cc:1010

  thread_name (char *) = 0xb4fd9904 "main" [@ENTRY=0xb4fd9904 "main"]

  buf (char [16]) =  "main"

#3  0xb4f31f7a in art::Thread::Attach+0x00b2(+178)  /system/lib/libart.so

art/runtime/thread.cc:409

  thread_name (char *) = 0xb4fd9904 "main"

#4  0xb4f20204 in art::Runtime::Init+0x0338(+824)  /system/lib/libart.so

art/runtime/runtime.cc:788

#5  0xb4f21dde in art::Runtime::Create+0x0032(+50)  /system/lib/libart.so

art/runtime/runtime.cc:335

#6  0xb4ed99d2 in JNI_CreateJavaVM+0x01b2(+434)  /system/lib/libart.so

art/runtime/jni_internal.cc:3026

#7  0xb6e19266 in android::AndroidRuntime::startVm+0x0882(+2178)
 /system/lib/libandroid_runtime.so

frameworks/base/core/jni/AndroidRuntime.cpp:887

#8  0xb6e19892 in android::AndroidRuntime::start+0x00fe(+254)
 /system/lib/libandroid_runtime.so

frameworks/base/core/jni/AndroidRuntime.cpp:967

  this (AndroidRuntime *) = 0xbedca858

  className (char *) = 0xb6f56f50 "com.android.internal.os.ZygoteInit"

#9  0xb6f56658 in main+0x02ec(+748)  /system/bin/app_process32

frameworks/base/cmds/app_process/app_main.cpp:309

  niceName (String8) = {

mString (char *) = 0xb5018418 "zygote"}


So the zygote process name is set "zygote" first, then change to "main" in
Lollipop, Is it a bug?


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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Is it possible to pass intent to bound service public methods?

2015-01-03 Thread TreKing
On Sat, Jan 3, 2015 at 6:16 PM, Ji  wrote:

> Can someone let me know if it is possible to start new activity by passing
> intent to a bound service api method?


It's possible, but why are you jumping through those hoops instead of just
starting the next Activity from the first one?

-
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Lock Orientation at runtime

2015-01-03 Thread Nathan
That is what I was looking for. Thanks. 

On Saturday, January 3, 2015 10:13:20 AM UTC-8, TreKing wrote:
>
>
> On Fri, Jan 2, 2015 at 8:56 PM, Nathan 
> > wrote:
>
>> I wanted to know if it is possible to lock the orientation of an activity 
>> at runtime.  
>
>
>
> http://stackoverflow.com/questions/2366706/how-to-lock-orientation-during-runtime
>
>
> -
> 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Compile 5.0 source code on Ubuntu 14.04 appear "No such file or directory"

2015-01-03 Thread 张张斌
I am trying compile source  code for 5.0. But appear errors like below. I 
tried both openjdk and Oracle jdk,same result.
Can anyone help?Something wrong with my source code? 


Checking build tools versions...
including ./abi/cpp/Android.mk ...
including ./art/Android.mk ...
including ./bionic/Android.mk ...
including ./bootable/recovery/Android.mk ...
including ./build/libs/host/Android.mk ...
including ./build/target/board/Android.mk ...
including ./build/target/product/security/Android.mk ...
including ./build/tools/Android.mk ...
including ./cts/Android.mk ...
find: `src': No such file or directory
find: `src': No such file or directory
find: `src': No such file or directory
find: `src': No such file or directory
find: `src': No such file or directory
find: `src': No such file or directory
find: `src': No such file or directory
find: `src': No such file or directory
find: `src': No such file or directory
find: `src': No such file or directory
find: `src': No such file or directory
find: `src': No such file or directory
find: `src': No such file or directory

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