Android :: Bug In IntBuffer.put() When Using Direct Buffers
Jun 16, 2009
In a process of switching from indirect to direct buffers for OpenGL geometry specification I've found a problem with the following function in java.nio.IntBuffer class: IntBuffer put(int[] src, int off, int len) this function is supposed to do a bulk transfer of int data from the given array starting at the specified offset. It should be an optimized version of the following code: for (int i = 0; i < len; i++) {buffer.put(src[off + i]);}
View 2 Replies
Feb 2, 2009
I am trying to optimize the OpenGL ES rendering pipeline, along with general optimizations for a proof of concept. One thing I did was to take vertex and texture coordinate float[] data and FloatBuffer that are passed to gl*Pointer methods and convert them into int[] data and IntBuffer objects, because I am using GL_FIXED and fixed point math. After initializing/allocateDirect()'ing the IntBuffers and put()'ing the int[] data in them for the first time, the render() method is called once per frame. After the rendering, the int[] data is updated for both vertex and texture data. Then, the following methods are called on the IntBuffer objects: -vertices_buffer.clear() vertices_buffer.put(vertices) // vertices is a int []-vertices_buffer .position(0) This was not problem when using float[] and FloatBuffer, but a BufferOverflow Exception is being thrown on that call to put(). The API says this is only thrown when the remaining size of the IntBuffer is less than the length of the int[] passed in. Well, both of those values are output to the log on the line just prior to calling put() (intBuf.remaining() and intArr.length). They both output 600, and last I checked 600 is not less than 600! I figure I am missing something simple. I checked the call made to allocateDirect() and it looks like this: -vertices_direct = ByteBuffer.allocateDirect (vertices.length * (Integer.SIZE >> 3));-vertices_ direct. order (ByteOrder.nativeOrder ());-vertices_buffer = vertices_direct.asIntBuffer(); The original code (using floating point math and Android SDK m3-rc37a) can be found here: http://www. enfis.it /wp-content /uploads/2008/01/tunnel3d.zip http://www.enfis.it /archives/14 Obviously, I had to convert the original code up to Android SDK 1.0 r2. I ended up using EGL as I did not see a way around it.Keep in mind I have little OpenGL experience, let alone ES 1.0 on Android.
View 7 Replies
View Related
Jul 5, 2010
I am looking to customize my icons for direct message direct dial, to the best of my knowledge better cut can do this, however i have heard it is not compatible with launcher pro beta that i use, so does anyone know what it is compatible with? also what size do i need to make my icons and what format do i save them in?
View 1 Replies
View Related
Aug 30, 2010
I'm using MediaRecorder.setOutputFile(FileDescriptor fd) over a UNIX socket, so that local code on the device can see the encoded stream in real time (for video streaming out).
What I observed is that the encoder doesn't write encoded frames continuously, when they are produced, but by "bursts", exactly one second apart. I tried both containers (THREE_GPP and MPEG_4) and all three available codecs (MPEG_4_SP, H263, H264), the behavior is always the same. This one-second period is notably unrelated to framerate or bitrate, so it is not flushing by size; rather, it seems to be flushing by time (possibly to mask SD card write overheads ? Bummer, I 'm not using the SD here !). Is it a known limitation ? Is there a known workaround ?
View 2 Replies
View Related
Jul 21, 2009
When using Protocol Buffers with Android (running in the Windows VM) I'm noticing that the first time I instantiate a protocol buffer based class Android lags for some time. When I step through it looks like it's spending a lot of time dynamically loading the protocol buffer classes. Is there something I can do to speed up this process? I haven't tested yet on a physical device, so the delay might not be as bad but in the VM it takes about 30 - 45 seconds to load all the classes and get past that first message instantiation. What I did was downloaded the Protocol Buffers source code. Compiled the.java files. Stuffed them into a .jar. Added the .jar as an external library to my Eclipse project. Generated the .java classes from the .proto files. Added the generated .java files to my project. Ran my project. I'm not sure if I'm doing something wrong it terms of how to reference external libraries with an Android project, but 30-45 seconds seems like a very long time to wait on a 2.6GHz machine. Also, I recently learned that android uses Protocol Buffers internally. Will this cause any sort of conflicts with my included .jar that could be the problem? I *think* the namespace is different but I'm not entirely sure. Lastly. Why did Google use Protocol Buffers internally and not make it available to SDK developers. This makes me very sad knowing that it's all right there and I can't use it.
View 20 Replies
View Related
Dec 8, 2009
for all those gl*Pointer functions you need to create bytebuffers through ByteBuffer.allocatedirect. when you want to load a texture through glteximage2d you need to supply a bytebuffer, too. can this be a "normal" bytebuffer or do I have to create this one too via allocatedirect?
View 2 Replies
View Related
Apr 8, 2010
I can't seem to find the proper audio source for recording/analyzing/receiving the currently played music track (or just any playing media). I'm not talking about the Mic.
The spectrum live wallpaper does this on the Nexus One AFAIK.
How can I keep receiving wave buffers of the currently playing media?
(I would like to support everything from 1.5, but 2.1 specific solutions are also welcome)
View 1 Replies
View Related
Dec 27, 2013
We are new to Android development. We have written small code which reads /dev/graphics/fb0 and sends frames to other application through network. We are successful if /dev/graphics/fb0 is available. But some android devices have fb0 and fb1(ex - Samsung Galaxy Grand - GT- I9082, Android version 4.2.2). luckly sending fb0 frames is sufficient to get required frames. We are not able to understand why fb1 exist and what is significance of the fb1. We also found few mobiles have fb0, fb1, ... , fb13. How to find which is main framebuffer?
View 2 Replies
View Related
Oct 8, 2009
The following what written on the Android 1.6 Platform Highlights: Android 1.6 includes the updated OpenCore 2 media engine, which has: * Support for OpenMAX encoders * Support for additional audio codecs in AuthorEngine * Improved buffering model supports shared buffers allocated in the decoder Could someone explain to me how this affects us the developers? Does this mean now we can play other media types? What in reality is new to us on Android 1.6 in regards to OpenCore?
View 2 Replies
View Related
Nov 10, 2009
Anyone hear of and app for the Droid like the one for the iphone that attaches to ur direct tv account?? this is the only app i really miss from my iphone
View 30 Replies
View Related
May 31, 2010
I recently installed LauncherPro on my Droid and am trying to make use of the additional home screen space. One thing I would like to do is create a on-click shortcut to search for nearby hardware stores (I'm a contractor and sometimes need to pickup task-specific materials). I could swear there used to be a shortcut available called "Direct Search" or something like that, that would do just what I'm looking for, but I don't see it when I try to add a shortcut to the home screen. Did this used to exist, or was it just my imagination? Is there anything like it now? I know I could make a bookmark in the browser and place a shortcut to the bookmark on the home screen, but I was hoping for the results to come up in Google Maps.
View 2 Replies
View Related
May 21, 2009
I am new to Android. I have depeloped a video player app. through Sd card.
Now i want to play video direct from URL.
Can anybody provide me sample code for the same.
View 10 Replies
View Related
Mar 16, 2012
I have an Android 3.2 and the Wifi direct works fine.The problem is, I'm trying to compile this sample but it says that the import "android.net.wifi.p2p" cannot be resolved.Well, if Android 3.2 supports Wifi Direct an actually I'm able to send files through this, why I'm not able to develop for this?
this error don't happen when the project is configured to run over Android 4.0.
View 5 Replies
View Related
Nov 18, 2009
I'm looking for an app that I can create a shortcut on the home screen and it will automatically email a specific email address. I know there are things that are close to this (add contact to home screen) but then you have to click again to send an email, etc. I'm looking for the equivalent of a fast "note to self" application for quick capture of ideas.
View 5 Replies
View Related
Jul 28, 2010
I have a droid X running 2.1 update 1: I want a direct link to my universal inbox from my homescreen that drills directly into the inbox displaying all my messages. Currently, the best I can do is to use the "messaging" shortcut, which then goes and displays another shortcut to my "universal inbox" along with my individual mailboxes. I want to cut out the two-step approach, and get a direct shortcut.
View 2 Replies
View Related
May 17, 2010
So - I *love* Google Maps with Navigation and I just recently upgraded to the new version of maps where it gives you a direct link to Navigation. My issue though is that I do not have any voice navigation when I start Navigation directly but I do have it when I just go through the regular Maps link and then select Navigation in there. I checked the menu and it is not muted. The sounds is also set to high. As I said, the sound works perfectly well if I go through the main app. Just not with the new direct link. Anyone else seeing this or worked this out?
View 2 Replies
View Related
Sep 6, 2010
Does anyone know of a direct api that allows access to CPU usage statistics for different applications/tasks running inside android? All I can find is data available by accessing a file "/proc/stat" but this seems a little cumbersome. ActivityManager holds data about processes/tasks etc but no CPU usage stats.
View 12 Replies
View Related
Nov 9, 2009
Im trying to record audio directly from the system. Using the standard API, you can only record from the MIC or phonecalls, ala: MediaRecorder.Some ways I've tried is to read from /dev/audio and /dev/eac from my app, but I think the sandbox of the app is preventing this.Im thinking about using the NDK, but Im not sure if that would overcome the sandbox aspect ? Ideally, there is some solution outthere to access the audio sub- system directly. Whether it be directly to alsa, to the AudioFlinger, to /dev/eac
View 16 Replies
View Related
Apr 16, 2009
Does anybody know of a way to directly access the Video Encoders provided by the(android.media.MediaRecorder) API? I'd like to make changes to the raw camera data "before" it gets encoded.
View 4 Replies
View Related
Feb 13, 2010
Is there a way to capture the audio using AudioRecord or any other API into a Direct ByteBuffer created using ByteBuffer.allocatedirect call with an offset?
From the documentation it is not clear that at which offset, calling the following method, will place the data: audiorecord.read(directbytebuffer, size);
View 2 Replies
View Related
Aug 4, 2010
Been getting a headache with some 2d Opengl coordinates and putting them in a direct buffer.
I have a basic square defined as such
CODE:...............
This runs, no segfault or anything, and when I iterate through the buffer the size and values seem exactly the same (8 elements, ordered just as the array). What happens though is that my draw() function draws nothing, it works one way, but doesn't work the other way. I use Direct Buffers in a lot of my other geometry. I have to get direct buffers working or I know that my software might not be reliable.
CODE:.........
My Drawing function is as follows.
CODE:..................
View 2 Replies
View Related
Aug 8, 2010
htc desire froyo. When I go to youtube.com from the stock browser I can load the page but when I click to any of videos it looks like it starts to load (loading circle in the middle is rotating) and then I get the message "An error occured, please try again later." at the center of the clip.
I was able to play them but now I can't. Can anyone provide a solution?
And please thank you anyway but do not offer solutions such as: use another browser, go to mobile site, use youtube app (which works by the way).
Main reason for me to switch to android is option to enjoy desktop view of the web on mobile device.
View 1 Replies
View Related
Jul 4, 2010
I wrote a widget that can call numbers directly with one click. It works on the emulator, and it used to work on my nexus one when it had Android 2.1. Now I got the update, and the widget stopped working. I am using Intent.ACTION_CALL, and android.permission.CALL_PHONE. If I change to Intent.ACTION_DIAL it works, and the same code works from an activity. It is the combination of an app widget and the call action. I don't see any error. Does anyone know if it is not possible, and if so, how? Are there many cases the emulator is different than the cell phones, concerning the permission aspects?
The numbers are all regular, not 911 or something.
View 1 Replies
View Related
Aug 30, 2013
Is it possible to have a Direct Wi Fi Connection between my Android device (Lg L5 e610) and my PC (Win7, Ubuntu 13.04, Mac OSx Snow Leopard)? Is there any tool or program to do it? Or at least a developement project (I like to be a tester)? I found some solutions for my question but they need to a router to work and i haven't it
View 1 Replies
View Related
Sep 2, 2010
Just found out that I don't need content providers if I don't need to share data with other applications. But since the examples I've seen all use content providers, I'm not sure how to proceed without them and populate activities with data derived from accessing my application's database directly.
View 2 Replies
View Related
Sep 26, 2010
I've been looking for a widget that will allow me to direct dial (direct text a bonus!) from home screen. I've looked around online and there doesn't seem to be anything that suits me well. I tried making the "direct dial" shortcuts by long-pressing, but those icons are small and have a little "M" and image of Android which obscures the photo icon. I found the perfect app while searching for other stuff. I've attached the image to this post. Does anyone know what the app is that allows me to place those 2x1 icons onto the screen?
View 6 Replies
View Related
Sep 1, 2010
E-mail I received from customer service: Just so you know, new for 2010, we're offering NFL SUNDAY TICKET To-Go for non-DIRECTV customers ($350 1-pay). This allows you to see every NFL SUNDAY TICKET game on your smartphone - we have dedicated apps for iPhone, select Android, Blackberry and Windows Mobile devices, and the Palm Pre - as well as on your laptop or desktop computer. Now, you don't have to miss a game even when you're nowhere near a TV. The offer is available only on/after Sep 8, 2010, please call (800) 670-7288.To get all the information you need, please go to DIRECTV: NFL SUNDAY TICKET To-Go IMO - price point is a little high since we are unable to stream to TV (hope someone develops a solution for this capability soon )
View 6 Replies
View Related
Apr 15, 2010
I'm looking at ways to sell my app to countries where Android Market does not allow people to buy apps (only free apps available in market).
I was looking at Slideme.org, but most of the apps there seem free and the details on their website seem scant about how to actually setup an account so they can pay me using say PayPal. Also, I couldn't reach them by phone, so I'm guessing its a pretty small operation.
I was also thinking about using Google Checkout to sell directly from my website. Would use a buy now button for digital content delivery, using a server 2 server back end post to send a license key to Google checkout which they only show to user after they've paid (or authorized, or something). User would then enter license key on my website using an Android phone browser only and if key is good would get redirected to the .apk file for download.
Still lots of risks for piracy. I suppose having the user enter the license key in the app itself and having the app communicate back with the server for validation might be better, and there are other solutions for that as well.
My main questions are: - Does anyone have experience using SlideMe for actually selling apps, and are they good with service and getting you paid? -Is there any issue with using the same Google Checkout account that is linked to my sales on the Android Market to sell directly from my website?? -Is it against any Google policy to sell an app directly using Google Checkout for the same app that is available through Android Market?
View 21 Replies
View Related
Jul 20, 2010
Can I access android MediaProvider (Images & Videos) databases directly from my code rather then through a content provider ?
I'm planning to have my own Cursor implementation so inside it I want to access the media databases directly, possible or android does not allow it ?
View 1 Replies
View Related
May 20, 2009
Hi, I have discovered while using DDMS that the basic OpenGL system calls in my code are allocating memory and causing the garbage collector to fire! It's not the system calls themselves causing the problem but the use of direct byte buffers to pass data in.
The direct byte buffers I use in calls such as glVertexPointer & glTexCoordPointer lead to java.nio calls to read the byte buffers, leading to objects of type org.apache.harmony.luni.platform.PlatformAddress being created.
These buffers are the same as in the example OpenGL code. I am creating a ByteBuffer using allocateDirect() and then creating an IntBuffer using ByteBuffer.asIntBuffer() to pass data to the OpenGL functions. The problem occurs as the system is reading the buffers.
Is there a way around this? Maybe using something other than direct byte buffers? It seems that using this method, OpenGL code of any complexity (ie a lot of OpenGL system calls in every frame) is doomed to pause a lot. I am aware that these calls should be kept to a minimum, but I still need to use a certain amount of them.
View 9 Replies
View Related