Issue passing context

by Jeffrey » Wed, 30 Mar 2011 00:38:36 GMT


Sponsored Links
 So I'm trying to use openGl to draw an image for a live wallpaper,
using the below method:

https://github.com/markfguerra/GLWallpaperService

And to draw then image Im referencing the foloowimg tutorial:

 http://obviam.net/index.php/texture-mapping-opengl-android-displaying-images-using-opengl-and-squares/ 

The only problem I'm having is the very last part, passing the context
to the square object, because I'm not loading a GLSurfaceview. I've
tried to figure this out myself but my low knowledge of android is
making it difficult. Please help.

-- 



Re: Issue passing context

by Jeffrey » Wed, 30 Mar 2011 00:44:01 GMT


 The issue is with the last part of the second link, also the xoom
needs better autocorrect...




-- 


Sponsored Links


Re: Issue passing context

by Jeffrey » Wed, 30 Mar 2011 01:01:27 GMT


 Sorry, the issue is the last part of the second link. Also, Xoom needs
better auto correct...




-- 



Other Threads

1. Screen color depth supported by Android 1.5/Galaxy

Hi,

there's a discussion going on about the color depth on the Samsung
Galaxy.

While it is advertised as having a 16 Million color display (24bpp) it
is only running at 16bpp:

    $ cat /sys/devices/virtual/graphics/fb0/bits_per_pixel
    16

Some say that it is a restriction of Android 1.5 itself which was only
capable of supporting up to 16bpp screens. Android would be down
sampling to 16bpp whatever the screen supports.

I've searched the available documentation over and over and can't find
anything like that.

As I see it Android 1.5 would indeed be capable of displaying 24bpp
images properly given that the screen is capable of and configured to
do so.

Can anyone give an authoritative answer, please?

Kind regards, Felix

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

2. How to get the duration of an audio resource using SoundPool

Hi,

I have a scenario where I want to play several samples after each
other. Sounds like a job for the SoundPool since they will re-occur
and I want to keep them loaded. Below is a code snippet:

SoundPool soundPool = new SoundPool(1, AudioManager.STREAM_MUSIC, 0);
int mySampleId = soundPool.load(context, R.raw.mySample, 1);

//Load a bunch of other samples here...

AudioManager mgr = (AudioManager) context.getSystemService
(Context.AUDIO_SERVICE);
int streamVolume = mgr.getStreamVolume(AudioManager.STREAM_MUSIC);
soundPool.play(mySampleId, streamVolume, streamVolume, 1, 0, 1f);

The play() method of the SoundPool returns instantly so I want to be
able to know how long to wait before starting to play the next sample.

The MediaPlayer has a getDuration() method that would be conviniant in
the SoundPool as well, i.e. to get the duration of a sound ID.

Does anybody know how to get the duration of a sample fetched as a
resource or do you have an alternative solution. Using a MediaPlayer
instance feels a bit more heavy weight .

Thanks,
Pettax

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

3. What Happened to Android Discuss Group?

4. getting Java Exception, libmedia_jni.so already loaded

5. Handset screen sizes

6. How to manage service lifecycle when device kills it due to low memory

7. are SharedPreferences really private?