using android based devices camera?

Previous topic - Next topic

graffix989

I a working on a project that basicaly analyses a picture. i would like to make this cross platform for android phones and eventualy iphones.
basic idea:
open the program on phone
this brings up camera shot veiw (just like when taking a picture), with a defined area (overlay square)
then take the picture
analyze
and report

what i do know is browse for a picture already taken and analyze it, but its time consuming and would like this to be streamlined.

so how exactly does one control the camera on an android based phone (galaxy 3, etc.) ?
is there an example somewhere that im missing? ive got the android SDK, but id rather not have to learn another language to acomplish this.... :glare:

mentalthink

I think for this you have to use C++ making external calls, for ipHone I'm not sure but I think in the forum someone post somthing about do this whit the camera...

In android I think you have to use C++, sure, I never read something... or calling whit Java, in some part in the forum a colegaue put how use GLbasic and Java joined...

I hope someone can give you more light about this theme...

Regards, and welcome to the boards!!!  :good:

graffix989

good stuff, got years of programming in basic.... time to take the plunge into C++ i guess. easy workaround would be to program camera stuff in C, then do everything else in GL.... but i have a feeling that would be useless in the long run, unless GLbasic can run an external program then snap back...

kanonet

If you want to code parts of your program in C++ there is no need to call a 2nd program from GLB. Just use the INLINE command and you can code in C/C++ what you need to (camera etc.) and than ENDINLINE and do the rest of your program in GLB. Internally GLB transforms your GLB code to C++ anyway and so it allows you to plug in parts that are written in C/C++, this is one of the strong points of GLB, it does not limit you to its own features.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

erico

IIRC kitty did acess the iphone camera on one of the forum posts, but I really can´t remember correctly.
I guess the problem was saving the image or something like that.

I think one of his apps, the spy kid one does use the iphone camera.
I know nothing on android yet, but soon will get one.

Welcome to the boards.

matchy

This is a common request from new members. You will need to be able to implement a wrapper as the camera lib requires customization.

spacefractal

Im pretty sure this require a new activity, while the sld actiity layer is still not handled correctly. I have those kind of issues when i tried to implemented kiip moment system, but the sld kidding me too much.

When that was more stable, I'm pretty sure it's could been done using the java communication directly.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

graffix989

so i started working with eclipse sdk with andriod adk for a java sided approach to making an android app. after a few hours of drilling through some tutorials i found, i was able to do alot of simple things like make buttons and new activites, sounds, etc.. so i imported a program that GLBasic compiled for android just to see what it looked like in eclipse. So basicaly from what i found is glbasic initializes everything it could possible use or do for android, needed or not, then runs a generated code based on anything u did in GLbasic... in a single activity i might add. This is a HUGE waste and you dont get to use many of the convienent built in functions for android 4.2+ that make apps so streamlined. Eclipse opened my eyes to the use of "threads", which would highly optimize some of my exspensive maths, unheard of in GLBASIC. basicaly its like buying a 10ton dump truck with a 15' plow to remove the snow in your one car driveway, it can get the job done but you wasted alot in the process...

so to wrap this up, im going to make a seperate program, using eclipse, that takes the pictures needed and eithor sends them to my pc via wifi or sends them to a new "activity" (my glbsaic program) on the phone. learning how to work around GLBasic to custom tailor my needs for android seems counter productive. bottom line, you want something to work efficently on a android device, you need to have a basic java understanding and i HIGHLY recommend eclipse compiler. I'll probably never be as good in java as i am in basic, so im going to continue on Basic for anything pc related. just need a different approach when dealing with something smaller.

awsome tutorials for eclipse with andoird that i found, Mybringback.com. guy lays it out for you in plain english, doesn't stray from focus. I learned very quickly what was important and what i could just fudge to get by. :nana:

Kitty Hello

Write a java function that saves to a file.