top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Is it possible to raise the thread priority using native API interface in Android?

+3 votes
438 views

We using C++ in the media layer and we want to raise the priority of our _AUDIO PROCESSING_ thread, to make sure the audio works well even the CPU is high (totally %98 on an slow Phone).

I have searched on google and find to use _setpriority( PRIO_PROCESS, 0, priority); but _setpriority function is change the process priority instead of the thread.

I know there is Java API to do that, but we need an C++ API. So does there any way to raise an single thread priority from C++ code?

posted Jan 23, 2014 by Kumar Mitrasen

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

What is best thread priority for intensive disk I/O operations - Foreground or Background?

+1 vote

We have an app that sync's its contacts with the native contacts app under a new account/content provider created by our app.

There are a few cases where we are unable to edit or update our app's contacts and receive errors like "Not editable from this app" (4.22) or "unable to edit from this app" (4.1.2)

I've cloned the git source for 4.22 contacts api and have added to my android project from Team - Share Project though i still don't understand how I can step through the native contacts code. I have found 2 places in the code where the above error is called, and I'm wanting to know which case we are hitting to better understand how to resolve the issue

+2 votes

I wonder if it is possible to get the logcat output along with timestamp?
If so, how can i get it?

+7 votes

Is it possible to profile all the app processes running on android phone simultaneously. I ran "am profile start " one by one for all the app processes. I found that it just profiles the last process. Is it possible to profile multiple processes simultaneously without editing app code (adding "Debug.startMethodTracing" calls)?

...