top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Android native application performance

+2 votes
50 views

We work on rooted tablet and execute in the background a pure C++ native process. This process is a service that communicates with USB device and grab video images from it.

We also have an Android application which communicates with this process through JNI. It acquires video images from the device and displays them on screen.

We have some problems in this architecture that we have not found a solution yet:
1. We get strange freezes every few seconds (like every 10 seconds or so), it looks like the threads are getting starved. We have logs that show the processing stages, and every 10 seconds or so we see logs that indicate that threads miss  a few frames.
This means the threads were frozen for about 100-200 ms.
I haveve tried changing the application nice level with renice. But it didn't seem to help
2. We would like to execute this process as a system service (like in Linux). This process should be executed when the table is started and should start working when any client application tries to communicate with our device.
3. Ways to improve UI performance
4. The most effective ways to store a large amount of frames coming with a high frequency
5. The most memory and performance wise way to create , present and dispose a large amount of objects (or, more specifically, Bitmaps)

posted Jul 21, 2015 by anonymous

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

Similar Questions
0 votes

Can anyone suggest the library for Push Notification?

0 votes

Update is installed but status is in pending on App Center. Since sync is alreday called , it won't rollback automatically and also not updating to newer version. The app crashes on startup everytime.

So how to rollback or update to new code push bundle version in this case ?

Here is the sample code:

componentDidMount() { 
codePush.sync(codePushOptions,(status) => {  
switch (status) {    
case codePush.SyncStatus.CHECKING_FOR_UPDATE:
//console.log("Checking for updates.");
break;  
case codePush.SyncStatus.DOWNLOADING_PACKAGE:
//console.log("Downloading package.");
break;   
case codePush.SyncStatus.INSTALLING_UPDATE:
//console.log("Installing update.");
break;  
case codePush.SyncStatus.UP_TO_DATE:
break;  
case codePush.SyncStatus.UPDATE_INSTALLED:         
break;
}
})
throw new Error();
}

Note : I have thrown error to check working of auto rollback.

+3 votes

I've been trying to figure out how an android app is installed by browsing AOSP.

The PackageManagerService.java has the gids for the corresponding permissions by parsing the platform.xml file.

PackageInstallerActivity parses and checks for any existing packages and then invokes the InstallAppProgress

I was able to follow the paths where the package is parsed and validated and PackagerManager.installPackage() method is invoked to install the package. I know this makes a native call to the JNI library. The corresponding aidl file is IPackageManager.aidl.

What I want to know is where can I find the Native cpp code related to this aidl mentioned above?

...