Android : Access To Native Screen Buffer From Java

Jul 29, 2010

Is it possible, from within my android java app, to capture an image of what is on the screen, even if it was written using native (ndk)? I do not wish to take screen shots of other apps, just my own. I can already capture and image of a canvas that I am aware of, but is there a view or canvas or something like it that always represents what is on the screen, so that a) I don't have to capture the separate views images and recompile them, and b) I can see what my native (jni) code is doing with the graphics too?

Android : Access to native screen buffer from Java


Android :: How To Record Audio From Mic In Raw Pcm Format Into A Buffer Using Native Libraries Directly

Oct 9, 2009

My application cannot handle the JNIE overhead, as I need to make 2 JNIE calls to the native C/C++ code for every 20msec. So I am trying to use the native media libraries and the realted C/C++ files provided by Android in the folder "//external/srec/audio/test" of the donut build. Ex. AudioHardwareRecord, AudioInRecord etc.. I am implementing all the calls in the native layer.

I am using the sampling rate as 8000 and want to read 160 samples (320 bytes) at a time.

I used the following values to create the AudioRecord..

CODE:..........

It says "success" after creating this interface but I am getting the error "Bad Value" if I am doing the InitCheck.

And it is crashing once I start reading the samples or if I try to retrieve the configured sampling rate.

Has anybody tried to access this native code?

View 4 Replies View Related

Android :: Java.lang.OutOfMemoryError On Audio Buffer

Mar 4, 2010

I am currently trying to create an Android application that loops Audio from the mic to the earpiece, I can do that perfectly but when I do it over and over again in my application I eventually get an Out Of Memory Error.

Here is the code I use to create the Audio Loop:

CODE:.................

And here is the error I get:

CODE:........................

So the Error specifically focuses on this line in the code

CODE:.................

And it happens after I try to do the Loop several times, so say I start the application and after 10 times starting the loop I get the error.

So I think the buffer is simply becomiing full or something?? Is that correct? If so how would I keep clearing out the buffer?

View 1 Replies View Related

Android :: Access Frame Buffer Directly In Droid?

Jul 14, 2009

In Linux, we can get the framebuffer directly by "open("/dev/fb0", O_RDWR);"

Is there any way I can call the similar function via JNI in Android or how can I access the frame buffer directly in Android?

View 2 Replies View Related

Android : Way To Get Data Buffer Of Screen In Screen Stack In Droid?

Jun 11, 2010

Currently I want to develop one Activity to allow the user to see the screens/activites of all running tasks , then the user can select one of them to switch it to foreground. As I known, HTC Sence seems already to have this implementation for Home screen, to display the thumbnail of all Home panels in one screen. Does anybody know how to access screen stack in Android?

View 1 Replies View Related

Android :: Java Vs Native Thread?

May 8, 2010

Does anyone know how Java thread relates to Android native thread? Does it map one to one?

View 2 Replies View Related

Android :: Start Native Application From Java

Apr 23, 2009

I have a native application that I would like to start from a Java interface. Does anyone know of a good way of doing this? can start the application using adb, with no problems. I can also start the application using Runtime.exec(), but that doesn't work so well for me; I need the application to run outside of a Java Runtime Process. Any ideas?

View 2 Replies View Related

Android :: Debugging Integrated Java And Native Code

Feb 7, 2009

I am trying to figure out what is the best way to debug a mix of Java and native code? Please notice, that I am NOT trying to develop a native app. The app will be written entirely in Java, using Android SDK. However, I noticed that some pieces of the SDK use native methods (e.g. AssetManager, WebKit, etc). I wonder which tools Google developers use if/when they need to debug a mix of Java and C/C++ code? Eclipse/gdb or there are commercial tools which make the debugging experience less painful?

View 2 Replies View Related

Android :: Set And Get Thread Priority From Java And Native Layers?

May 10, 2010

I have a multithreaded streaming app which has mainly the following 5 threads. 1 Main App(UI) Thread 1 controller thread (in native) 1 audio decoder thread (in native) 1 video decoder thread(in native) 1 thread to query the head position of audio (in Java) Apart from this I have video rendering with OpenGL. My problem is, if I query the thread priority using the Thread.getPriority method (my native threads make callbacks to Java and I am making the query at that point of time), I am getting the priority of each of them as 5. For my audio query thread (the last one in the list) I am explicitly setting the priority using Process.setThreadPriority(Process.THREAD_PRIORITY_URGENT_AUDIO); Also for my decoder threads, I am giving higher priority than my controller thread(using pthread APIs in native). But still finally all of them seem to have same priority. Also what should I be doing to increase the priority of my threads(both from Java and native)?

View 6 Replies View Related

Android :: Java Application / Native Library Integration

Apr 8, 2009

I have developed bluetooth application where native library will be initiated by Java application (using JNI wrapper). JNI will call the entry function of the native library and then it will create Pthread to for scanning the device. Once Scanning is over, i will get the callback which i registered during the entry function of the native lib (called by app). But i haven't received the callback, but if i run the same native library in the shell (executable from the shell terminal) it is working fine. Can any one help me, if there is any specific architecture needs to follow while developing Java application based on native lib?

View 4 Replies View Related

Android :: Running Native Executable From Java Application

Nov 5, 2009

I am trying to run a native executable from inside an android java application. The native executable exists in my assets. At start of activity, I copy it from assets to my application cache Dir. then I use Process Builder to run it.I tried to run "chmod 777" on the file and on cache directory containing it and I ensured permissions are granted using adb shell. but I still get this permission exception.

View 4 Replies View Related

Android :: Can A Native Application Use Java Methods In Telephony Manager?

Sep 17, 2009

I am currently working on porting a application written in C in android platform. I need to know that can i invoke/call the getSystemService from the C application using invocation interface by JNI. Meaning using a .java file which will interact with the interace provided by the android.telephony.TelephonyManager.java for using getCallState() and other mehthods.

View 2 Replies View Related

Android :: Display APIs - Buffer On Screen?

Nov 3, 2009

How can we display a buffer on screen?

Currently I create a bitmap using Bitmap's CreateBitmap() and render it on screen using canvas' drawBitmap().

Is there any other way of doing this in Java layer?

View 8 Replies View Related

Android :: Access In Native Libraries?

Apr 12, 2010

I am completely new to the NDK.

I have done a couple of the tutorials including the hello from jni one and another one that calculates the sum of two numbers.

They involved using cygwin and the ndk to create the library so file and I have a bit of a grasp on how to insert my own libraries into the libraries layer of Android.

I have now been asked to access the native libraries on Android and see what I can use them for.

My question is can I do this?

The STABLE-APIS.txt document is a bit vague and mentions the following as Stable C++ API's in Android 1.5

cstddef

new

utility

stl_pair.h

Does that mean I can access them?

If so then how do I go about it?

View 1 Replies View Related

Android : Ndk To Access Native Bluetooth Lib?

May 1, 2010

Looking for any pointer or advise using NDK to access to native bluetooth lib. is it doable? anyone have good or bad experience to share?

View 2 Replies View Related

Android : How To Access A File (say .xml) From A Native Code?

Sep 16, 2010

I am trying out an example of OpenCV from http://github.com/billmccord/OpenCV-Android and am stuck at the point where it is mentioned "Before attempting to run the VideoEmulator application, you must first copy this XML file into the emulator in the following location: /data/data/org.siprop.opencv/files/haarcascade_frontalface_alt.xml " Where in my eclipse workspace do I need to place this haar xml file to be copied to the location /data/data/org.siprop.opencv/files/ of the emulator?

View 1 Replies View Related

Android : Access Droid's Native Resources?

Jul 11, 2009

Could someone please tell me how to access android's native resources? In particular, I would like to use the camera icon and shutter sound in my own app.

View 3 Replies View Related

Android :: Access To Databases From Native Code - For Example Mmssms.db

Aug 9, 2010

Try to select (or update) from custom databases (for example mmssms.db) but on init I see " Unable to open the database file". Try send permissions in manifest <uses-permission android:name="android.permission.WRITE_SMS"/> <uses-permission android:name="android.permission.READ_SMS"/> but this doesn't help.

View 2 Replies View Related

Android :: Access And Update Contacts In Native Libraries

Jul 1, 2010

Is there any way to access the contact DB in my native libraries(C/C+ +)? Also to update the contact database through native libraries itself.

View 4 Replies View Related

Android :: Native Android Application Java Front End

Jun 25, 2010

I am trying to produce a java front end, via some sort of Android "view" that will allow me to show the console output from a native C/C++ application binary. I followed the steps from various google searches and I have a tool chain that produces native binarys that I can then "adb push" onto the android device. I can either use the adb shell or a console application like ConnectBot to native to the pushed path and run the binary like so: ./someApplicationHowever as I stated in my opening sentence I would like to wrap this binary with a font end producing an apk that can be loaded onto the phone and when it runs it opens up and directs the stdio output from the native binary to the screen.

View 1 Replies View Related

Android :: NDK OpenGL - Mixing Java And Native - C - Calls To OpenGL API

Jul 24, 2010

I would like to be able to use the OpenGL API from both Java and C (via NDK).

In Java, there is a GL object passed, which has all GL methods on it.

In C, you just talk to the native library.

In a single onDrawFrame callback (for which Java is passed a GL), can I use methods on the GL object, and also call NDK methods which access the openGL library?

In other words, is the GL object just a wrapper for the same instance of the native library?

View 3 Replies View Related

Android :: Access APIs Android View Surface.cpp From My Native Code

Oct 5, 2010

I am working on video renderer application which need surface and control of surface. And through isurface i can register heap buffer to that surface and post buffer operation. I have gone through android_view_surface.cpp file. It is having all required APIs which are helpful for my application. But i don't know how can i implement it. What are the procedures to get access of those APIs.

View 2 Replies View Related

Android :: Unique Droid Device ID / Access It Via Java?

May 7, 2010

Do Android devices have a unique id, and if so, what is a simple way to access it via Java?

View 3 Replies View Related

Android :: Access The Environment Variable In Java Layer

Mar 27, 2009

I wish to get the environment variable which is set by a daemon in native but failed. Some details: in the daemon, which is started by root setenv("MY_NAME", name, 1); in java code, which is started by system String name = System.getenv("MY_NAME);

View 3 Replies View Related

Android : How To Access Camera.java In On Cick Event

May 25, 2010

I am making a app which takes photo on button click i have camera.java which operates camera and takes photo

how to i call it on the below event? Code...

View 1 Replies View Related

Android : Java Access From Droid Webkit Plugin?

Dec 29, 2009

Has anybody tried to access Java class from Android Webkit plugin?

I am trying to do but there is no reliable way to access with JNI. So if anybody has tried please reply.

here is example of what I want - JS in webage access plugin and plugin accesses JAVA class/application to access Android platform.

View 3 Replies View Related

Android :: Access Or Execute .java File In Another Javafile In App Development

May 19, 2010

I got 2 java files app.java and gallaery.java

CODE:.....................

View 1 Replies View Related

Android :: Access Files In The /sys Folder Of Milestone/droid From Java?

Mar 25, 2010

I want to access files in the /sys, to be exact in the /sys/class folder. I just need to read some values there. I tried the Context.openFileInput method, but got only exceptions and I understand this is not the right way.

View 1 Replies View Related

Android :: Access Calendar's Entries Without Using Gdata-java-client?

May 11, 2009

Is it possible to get the calendar's entries from the phone offline? It seem the only way is to use gdata-java-client.

View 4 Replies View Related

Android :: Access Values Defined In A Java Manifest From Code?

Feb 4, 2010

Can I access the values defined in a java manifest from code?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved