[android-developers] Can GradientColor be used to define a gradient for a fill or stroke entirely in XML?

2016-11-29 Thread Michael Richardson
I was looking at the document for 
GradientColor 
https://developer.android.com/reference/android/R.styleable.html#GradientColor 
. How can I define a gradient color in XML and apply it to an XML vector 
drawable? 

I have tried in color.xml, styles.xml and within an XML vector drawable. 

I get the error " Failed to convert @id/gradclor into a ColorStateList" 
with: 


http://schemas.android.com/apk/res/android;
android:width="120dp"
android:height="120dp"
android:viewportWidth="120.0"
android:viewportHeight="120.0">








or 
"Failed to convert # #00FF 145 into a ColorStateList" when 
using: 


http://schemas.android.com/apk/res/android;
android:width="120dp"
android:height="120dp"
android:viewportWidth="120.0"
android:viewportHeight="120.0">






with in color.xml:


#FF
#00
145


-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/8f69b95d-29e0-4d59-bef3-6c56412ec25e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] dummy Binder/C++ service

2009-11-03 Thread Michael Richardson
I wrote a dummy HelloWorld service and client.
It uses Binder for IPC.  For some this is likely duh, but it did take
me several days of puzzling to work things out.  I think some of the
problem is that there is some dead code in IMediaPlayerClient.cpp, which
I was using as my guide.

I'm convinced that it should be possible to see the services from Java
Binder/ServiceManager code, and avoid a layer of JNI (and thus an NDK
invocation) between a Java application and a C++ service, but I didn't
manage that.  The bird droppings in the src/org/credil/...*.java are my
attempts, ignore them, or better yet, fix them.

Push the three pieces generated: libhelloworldservice.so (to
/system/lib), and helloworldservice, and helloworldclient to /data.
adb shell
cd /data
./helloworldservice 
./helloworldclient

I hope that this code will help others from scratching their head a lot.

   https://review.source.android.com/#change,12454
is one suggestion I have to make other writers of code like this easier.

Probably I'm posting to the wrong mailing list, sorry.
I can not keep up with these mailing lists.

My code is at:
 http://github.com/mcr/Android-HelloWorldService



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

2009-11-03 Thread Michael Richardson
Tim wrote:
 
 On Nov 3, 8:58 am, Girish htgir...@gmail.com wrote:
 In my application i want to pass the camera data to native layer. what
 is the best possible approach for doing the same.

 I know it can be done 2 ways.

 1.start the camera in application and pass the preview data to native
 layer. But i feel this may consume lot of resources.
 
 This is the only 'supported' way. Apparently there is a bug with the
 camera callback that creates a new massive object for every frame.
 Since java is shite and garbage collected this slows this way down
 even before you copy all the data through JNI.

Well, it's not a bug, it's just how Java works.
It certainly does suck.

 2.Start the camera directly in native layer and use it. So JNI will
 come less into picture. and not much resource loading also.But dont
 want to take any risk by using the lower layer code which may change
 in future.
 
 Yeah this would be ideal, but not supported yet, if ever.

We tried to get opencore to do this for us, and we failed.

We never even got opencore's extensive debugging to turn on while trying 
to figure out how things work, and after some person-weeks of effort, we 
  understood enough about opencore that we can use it as a library, but 
not via MediaService.

We are now writing our own service that opens the camera hardware 
directly, and runs as a service.  I do not think a lot of things will 
happen to this layer, except that it will not be available anymore.
We tried to chmod the camera devices so that it could be a non-root 
service, but there is more to it than that, so for now, it's a root 
service.


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


[android-developers] some questions about using gdbserver and JNI libraries

2009-10-15 Thread Michael Richardson

We have been using gdbserver to debug our JNI code as follows.
We have been less than successful -- breakpoints do not always get
activated, sometimes we get SIGILL, and we seldom ever get a useful
stack when the debugging stops on SIGSEGV, sometimes the program dies
with SIGTRAP!!!

We have occasionally been able to have debug sessions with s/n, but
since pretty much every SEGV has resulted in either a damaged stack,
or
at least, gdbserver can not find the stack, it's a pain.

Is there something we are missing?  Is there some reason to use the
4.2.1 vs 4.3.1 toolchain?  (Why are there two toolchains? I assume
because of bugs in each that are fixed in the other... which bugs?)

We guessed that the dalvik process that we wanted to debug was
app_process --- we found this out by looking at /proc/XXX/cmdline on
our
running activity.

This is what we do typically do
 (repo sync directory is in /build/m1 for me)

invoke:
  /build/m1/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-
gdb

(some of us use -tui, some of us run it under Xemacs, etc.)

we then do:

Current directory is /build/m1/
GNU gdb 6.6
...
(gdb) cd /build/m1
Working directory /build/m1
 (canonically /build/m2).
(gdb) file out/target/product/generic/symbols/system/bin/app_process
Reading symbols from /build/m2/out/target/product/generic/symbols/
system/bin/app_process...done.
(gdb) set solib-search-path out/target/product/generic/symbols/system/
lib

We then start our activity, adb shell, discover the PID of the
activity,
discover the IP of the phone with netcfg, and:

app_15   1815  49107468 15744  afe0d4a4 S
org.credil.thomas_watson.videophoneservice

# gdbserver 0.0.0.0:1234 --attach 1815
Attached; pid = 1815
Listening on port 1234
Remote debugging from host 132.213.238.4

(gdb) target remote 132.213.236.179:1234

This is with a physical device.  With an emulator, one has to, of
course, run the adb forward stuff. (Too bad that doesn't work with a
real device too, as then I would not need to run gdb over the
wireless)


Program terminated with signal SIGKILL, Killed.
The program no longer exists.
(gdb) target remote 132.213.236.179:1234
Remote debugging using 132.213.236.179:1234
Error while mapping shared library sections:
/system/bin/linker: No such file or directory.
warning: .dynamic section for /build/m2/out/target/product/generic/
symbols/system/lib/libc.so is not at the expected address (wrong
library or version mismatch?)
... many more
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
tkill () at bionic/libc/arch-arm/bionic/tkill.S:52

(gdb) break sendframe
Breakpoint 1 at 0x80401086: file /build/m1/packages/apps/
VideoPhoneService/libvideophoneservice/src/rooster.cpp, line 96.

(gdb) c
Continuing.

Program terminated with signal SIGTRAP, Trace/breakpoint trap.
The program no longer exists.
(gdb)







(btw, an annoyance about googlegroups is that it seems that it looks
at
my SMTP from header, rather than From:... This basically means that I
can not post from gmane.org via NNTP, which is a shame.  Is there a
secret NNTP access on googlegroups.com, I wonder?)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: ADP will not recognize my phone (in Ubuntu 9.04 or Fedora 11)

2009-10-09 Thread Michael Richardson

Douglas Whitfield wrote:
 I found 
 https://groups.google.com/group/android-developers/browse_thread/thread/1d3488c601243686/541573842e904727#541573842e904727
 but I cannot respond to that thread anymore (perhaps they expire?).
 I've tried with both the 1.5 SDK and the 1.6 SDK.  I have tried all

Did you restart udev?
Did you replug the device after?
What does lsusb say?
Is there an adb server running (ps ax, look for adb fork-server)

 using ./ in the dir.  Adb appears to work as it tells me List of
 devices attached.  At some point right after I installed 1.5 I

So, adb devices shows the device, but adb -d shell does not?



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

2009-10-09 Thread Michael Richardson

ian wrote:

 Honestly in Canada, I've never seen an Android phone. They are
 available only on an unattractive three year package and nobody is
 choosing them over similarly priced Pre or iPhones.
 
 You gotta have faith to be an Android developer.

Where are you?
I'm in Ottawa/Gatineau.


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