Disabling AppNap from java
Andrew Thompson
lordpixel at me.com
Sat Feb 22 15:13:05 PST 2014
I've resisted posting this until now as it will probably just confuse the issue, but on this page you can find code which calls Objective C using both Rococoa and plain old JNI so you can compare and contrast.
Of course the problem this is solving has nothing to do with AppNap and so it might be more distracting than anything else:
http://pixel.recoil.org/code/rococoa/
Unfortunately like most things this is a matter of experience. Having done this before I could probably knock something up in a couple of hours that would meet your needs. But if it's your first time it'll be trickier for you.
> On Feb 22, 2014, at 1:49 PM, Paul Taylor <paul_t100 at fastmail.fm> wrote:
>
>> On 22/02/2014 20:43, Eirik Bakke wrote:
>> JNA might be a simpler way to call native functions:
>> https://github.com/twall/jna
>>
>> -- Eirik
>>
>>> On 2/22/14, 8:51 AM, "Paul Taylor" <paul_t100 at fastmail.fm> wrote:
>>>
>>> I think Im having problems with AppNap with my application, although it
>>> is difficult to understand when/if it is kicking in.
>>>
>>> 'The correct way to disable App Nap is to use the -[NSProcessInfo
>>> beginActivityWithOptions:reason:] and -[NSProcessInfo endActivity] APIs
>>> within your app via JNI, and only when your app is actually doing work.'
>>> - Mike Swingler
>>>
>>> Has anything been done to disable AppNap from java without having to use
>>> JNI
>>>
>>> Paul
> I think JNA or its own is Wndows only isnt it, but there is something called rococoa.
> To be honest I was hoping someone else had encountered this particular problem with AppNap and had something to share.
>
> Paul
More information about the macosx-port-dev
mailing list