Hello,
I want to write a process execution blocker application that will
block the execution of a process that is not in a white list
of my application. I have got it to work with the toolhelper API
but this is not the 100% solution because I can only kill
processes that are already started.
Is it possible to write a filter component for the pocket pc
that is called before a process is started and where
I can allow that it can be started?
Thanks
Houser
I currently have an issue with a Windows Mobile application that appears to be dropping out of memory at random points. This is happening on many different types of PDA's, and it doesn't seem to catch an exception in any error handling throughout the application. I have placed logging throughout the entire application, to try and determine what could be the cause. During one of the drop offs, the section of code directly after the last successful log entry was just boolean checks on local variables, and the next log entry wasn't hit. There were no web service calls being hit, and no database access calls being sent, just these simple lines of code.
The application is written in the Microsoft .NET 2.0 Compact Framework. I have actually made a test application that just has two timers, running simultaneously. One timer makes a basic database call to a mobile database, and one makes a web service call. This application also would drop out, with just this code. The main application is very large and I wanted to eliminate any other .dlls or projects that we have added in the solution. It makes me think there is something in the .NET Compact Framework that is the issue.
I did read the following post from the Microsoft Site:
http://social.msdn.microsoft.com/fo.../thread/de556282-b2ec-4c1f-8bac-d647b4103a2b/
This seems like a very similar issue. I tried installing the 3.5 Framework, and at first I thought that this helped the problem, as the dropout occurred less frequently. Running through the application after this, however, the application still drops out. It seems to have limited the amount of times this occurs, yet still happens. This phone that I'm using definitely has the issue more that others, rarely being able to complete the process without the application dropping out of memory.
Has anyone had any of these issues developing with mobile applications? This has been an ongoing issue with our applications, and any help would be greatly appreciated. Thanks,
Steve
Hi, why some default apps run only like a service? Gmail app and gtalk app runs only like a service...
And are some apps appear in Active Apps panel ans not appear in In Progress panel... Is very confusing... I'm not understand what app are running and consuming battery and memory...
Someone can help ?
If the cpu usage for app is 0%, it doesn't consume battery. And freeing memory doesn't help with battery drain, it's quite opposite. Try to find some threads here in "General" section with keywords: ram, multitasking, lmk, minfree...
Ps. Android isn't windows, so things work quite differently..
Sent from my GT-I9000 using xda premium
acazsouza said:
Hi, why some default apps run only like a service? Gmail app and gtalk app runs only like a service...
And are some apps appear in Active Apps panel ans not appear in In Progress panel... Is very confusing... I'm not understand what app are running and consuming battery and memory...
Click to expand...
Click to collapse
There is a difference between a service and a process.
A service is a component that runs in the background to perform long-running operations or to perform work for remote processes. A service does not provide a user interface. For example, a service might play music in the background while the user is in a different application, or it might fetch data over the network without blocking user interaction with an activity.
Click to expand...
Click to collapse
When an application component starts and the application does not have any other components running, the Android system starts a new Linux process for the application with a single thread of execution. By default, all components of the same application run in the same process and thread (called the "main" thread).... Every application runs in its own process and all components of the application run in that process, by default
Click to expand...
Click to collapse
The Android system tries to maintain an application process for as long as possible, but eventually needs to remove old processes to reclaim memory for new or more important processes. To determine which processes to keep and which to kill, the system places each process into an "importance hierarchy" based on the components running in the process and the state of those components. Processes with the lowest importance are eliminated first, then those with the next lowest importance, and so on, as necessary to recover system resources.
Click to expand...
Click to collapse
In a few words... Gmail and Talk are only services that are constantly monitoring incoming push data from the Google servers. There is also a WhatsApp, Google+, Music, Email, and many other services that are automatically started when an event triggers them. This depends on the app. Not all apps have services. For instance, a Live Wallpaper is a service, not a process. You should not kill those.
When you run an application, you start a process. This process holds all the UI and logic to display the application in your screen. If you press HOME on your phone, the process goes to inactive mode, and it "in theory" should stop using CPU cycles and will sleep in your RAM until you execute the app again, or until Android claims the RAM and kills the app. RAM does not kill your battery, CPU cycles do.
Source: http://developer.android.com/guide/topics/fundamentals.html
In a few words... Gmail and Talk are only services that are constantly monitoring incoming push data from the Google servers. There is also a WhatsApp, Google+, Music, Email, and many other services that are automatically started when an event triggers them. This depends on the app. Not all apps have services. For instance, a Live Wallpaper is a service, not a process. You should not kill those.
Click to expand...
Click to collapse
Why should not I kill them? I installed Germini App and stop GTalk and others to automatically init on boot.
up........
So I've been toying with the idea of using the NST as a hiking pad. Backcountry Navigator seems to run fairly well on the Nook. After enabling mock locations via Sqlite3, I was able to get TetherGPS picking up GPS location data from my phone... except the service keeps dying.
At first, I thought the service stopped updating the location because of the app's paywall. But after purchasing the full version of TetherGPS, I determined that the Tethergps service seems to be dying after a resource-intensive application such as Maps or Backcountry Navigator starts getting demanding.
Adb reads:
I/NotificationService( 880): enqueueToast pkg=com.comptonsoft.tgps [email protected] duration=0
~service starts~
I/ActivityManager( 880): Process com.comptonsoft.tgps (pid 5222) has died.
W/ActivityManager( 880): Scheduling restart of crashed service com.comptonsoft.tgps/.TGPS_client in 14063ms
I/ActivityManager( 880): Start proc com.comptonsoft.tgps for service com.comptonsoft.tgps/.TGPS_client: pid=5393 uid=10057 gids={3003}
~service attempts to restart, but the notifications flag just hangs and GPS updates do not commence. service needs to be restarted manually~
I tried freeing up a sizeable chunk of RAM for testing, but extra available RAM didn't change the behavior. I'm wondering if I couldn't be hitting some limit in maximum concurrent processes. Are there any settings I could be pushing via Sqlite3 to allow more processes?
I am of course open to any other suggestions or theories.
I'm currently using Pinguy's custom NST firmware. I'll try to make certain the behavior is the same with other rooting methods.
You could try Memory Locker app, it is a paid app but is very cheap. Works on Android 2.1 and working on my NST.
https://play.google.com/store/apps/details?id=com.smartprojects.MemoryLocker
How to prevent apps from closing on their own?
For example, I have an application (A) that allows to open certain applications (B, C, ...) by a code or footprint. The problem is that as the application (A) is closed by itself after a while, I no longer have protection.
I tried in the settings to ask that the Application (A) is not optimized for the battery, but it's the same.
Looking forward to your help