Can't Get CameraPreview Example to Work

by polyclefsoftware » Thu, 29 Oct 2009 00:21:22 GMT


Sponsored Links
 I upgraded to the 2.0 SDK yesterday...don't know if that has anything
to do with it. I can't get the CameraPreview example from the API
Demos to work. I get the same error in both my emulator and on my G1:

E/AndroidRuntime( 4758): java.lang.RuntimeException: Fail to connect
to camera service

Anyone else experiencing this? If not, any ideas on what's going on?
--~--~---------~--~----~------------~-------~--~----~



Can't Get CameraPreview Example to Work

by Fred Grott(Android Expert) » Thu, 29 Oct 2009 02:48:00 GMT


 did any camera permissions change in AndroidManifest.xml during change
from 1.6 to 2.0?



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Can't Get CameraPreview Example to Work

by polyclefsoftware » Thu, 29 Oct 2009 03:45:22 GMT


 Nah, I just didn't have permissions enabled. Now I feel like a doofus.

Thanks for the help, Fred. :)

On Oct 28, 1:46pm, "Fred Grott(Android Expert)"



--~--~---------~--~----~------------~-------~--~----~



Can't Get CameraPreview Example to Work

by Fred Grott(Android Expert) » Thu, 29 Oct 2009 04:04:04 GMT


 That is okay..





--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. App-independent Storage of Shared Resources/Media

> I'm in a situation where I have to share some resources (i.e. images)

If they can be packaged as actual resources, resources can be shared among
apps. There was a thread about this recently -- Ms. Hackborn supplied the
relevant API (should either be in PackageManager or Resources, I forget
which).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



--~--~---------~--~----~------------~-------~--~----~

2. ListAdapter issue related to ListView selection

Hello,

I have following problem:

I am creating ListAdapter that is used by my ListView.
Task (that I am solving using ListView) relates to displaying files on
SD card. When specific directory is opened, list highlights the first
item in it and selects the item (using setSelection(position) method
of ListView ).

Problem appears only at following case:
1. Initial directory contains about 25 files (displayed on screen only
1-5), the first item is selected (0 position)
2. Second directory contains only 1 file.
3. Now we go back to initial directory (don't know why, but ListView
displays 21-25), the first item is selected (0 position), but it is
not visible (but highlighted, according to logs and what I see after
scrolling). Scroll bar in this case is set to the max position.

To update list content I use method
mListAdapter.notifyDataSetChanged();

It works fine, but with some issues concerning item selection if
list's item count is bigger than item's count possible for displaying
on the screen.

I can resolve this trouble using following set of operations:

getListView().setAdapter(null);
updateFileList();
mListAdapter.notifyDataSetChanged();
getListView().setAdapter(mListAdapter);

Can anybody advice me how to do the right way in this case?

Thanks,
Lyubomyr
--~--~---------~--~----~------------~-------~--~----~

3. Starting the Porting of Android to ARM 7 processor

4. Anyone else suffered cupcake touch failure.

5. establishing two connection( 3G & Wifi )at the same time

6. How to I use touch screen to draw a straight line

7. Child TextView in ScrollView with large amount of text pushes other views off the screen