Windows 10 - Background Agents/Services? - service

I'm writing a Windows 10 Universal Application, and got to the point where I would like to implement a background service (the application connects to a variety of Bluetooth LE devices, and the Notify characteristics would need to, obviously, notify the device).
But I can't find the BackgroundAgent project definition for Windows 10 apps. Is it deprecated? What must be used instead of that?

Instead of a specific Background Agent project type (used in Silverlight projects), you need to make a Windows Runtime Component and implement IBackgroundTask -- see the Quickstart on MSDN

Related

Should macOS daemons be made from the "Command Line Tool" Xcode template?

I have a few questions regarding daemons. Indeed, even the macos developer center has limited information resources.
I want to develop an application daemon that runs after system boot without login.
a) a Daemon; Is it a simple console application combined with a plist? Because there are almost no tutorials on daemon development related to Xcode. If there is a code sample reference, can you share it here?
b) Can daemons be downloaded from the app store? Because there must be a software that I can offer to everyone through the App Store. Is the installation automatic like other app store apps? If anyone has experience and can share it, I would be very grateful.
c) I am working on an API related to mirroring the screen to Android phone. Do you think a daemon has full access to WiFi/BLE and screen capture APIs?
I would be very happy to hear your suggestions.
I've made a launch daemon in the past, for the purpose of making a privileged helper tool with SMBless. I can share some of my experience.
A
a Daemon; Is it a simple console application combined with a plist? Because there are almost no tutorials on daemon development related to xcode. If there is a code sample reference, can you share it here?
Here are some resources that I found useful:
Woody's Cocoa: implement a privileged Helper. This article covers the low-level, step by step process of making a launch daemon and launching it as a privileged helper tool. If you have no need for privileged execution, the steps would be much the same, but without the SMJobBless parts.
SwiftAuthorizationSample which show cases SecureXPC (a framework for Swifty, Codable-based XPC communication) and Blessed (a framework for a Swifty, modern interface to SMJobBless and the AuthorizationServices framework). It handles a lot of the complexity from #1.
Apple's Daemons and Services Programming Guide
B
Can daemons be downloaded from the app store? Because there must be a software that I can offer to everyone through the app store. Is the installation automatic like other app store apps? If anyone has experience and can share it, I would be very grateful.
No. You would distribute them as part of an app, and make your app install them when required.
I am working on an api related to mirroring the screen to android phone. Do you think a daemon has full access to WiFi/BLE and screen capture APIs?
WiFi certainly, but I'm not sure about the screen capture APIs. One of the differences between launch agents and daemons (IIRC), is that only launch agents can connect to the window server, which I assume is necessary for the screen capture APIs.
From Technical Note TN2083 – Daemons and Agents:
Daemons
A daemon is a program that runs in the background as part of the overall system (that is, it is not tied to a particular user). A daemon cannot display any GUI; more specifically, it is not allowed to connect to the window server. A web server is the perfect example of a daemon.
...
Agents
An agent is a process that runs in the background on behalf of a particular user. Agents are useful because they can do things that daemons can't, like reliably access the user's home directory or connect to the window server. A calendar monitoring program is a good example of an agent because:

Inkcanvas with Citrix Receiver Mobility

We currently deploy a CMS type application through the Citrix Environment and i have added an electronic signature feature which I wrote using an WPF Inkcanvas. This part of our application works well when using the pen mouse through a desktop version of the receiver, but very poorly when accessing it through a tablet, Ipad or Droid. When you go to try to scribble you signature you either to hold your finger to initiate the left-click hold, this is longer of droid than Ipad. Does anyone have any experience with this? I want it to work just like Square signing feature a just draw by touch.
You have a few options here. The simplest is to tell admins to set the Application Description to the following when publishing the application:
keywords:mobile
On the mobile receivers (iOS and Android) this does a few things, the useful one for you is it puts them into a different input mode where the receiver does less gesture detection and pushes through events more directly.
You can perform more finer grained control of the input mode using the Mobility SDK for Windows Apps. You can probably get away without the added complexity of using the SDK and just use the extra keywords in the publishing step. But if you're interested there are multiple language bindings for the SDK, including .NET. The main SDK link is here:
http://www.citrix.com/mobilitysdk/
The specific class you use to set the input mode with the .NET binding is here (see BeginSetTouchInputMode):
http://www.citrix.com/mobilitysdk/docs/cmp.net/index.html
Finally the last option is to get your customers using the latest XenDesktop 7 using Windows Server 2012. This is the latest release and it supports touch remoting, so the receiver will not perform any gesture translation that delays user input. Instead it will pass all the touch events directly up to the server for processing. The iOS receiver has implemented touch remoting, however I'm not sure if it's been added to the Android receiver yet.
So the tl;dr is use "keywords:mobile", and then when your customers eventually upgrade to XenDesktop 7 this should become a non-issue.

Is it possible to run an application automatically on boot up as background service in J2me?

I wanted to develop Location Based Service in J2me which has to start automatically on Boot up & run as background service ,which will send periodic location to the server? How can i implement it on J2me ?
Any Suggestions,tips or examples will be really helpful.
Thanks
Yes, Srizan,
It is possible using the Application Settings. You need to set the Auto Start setting to true in Application Settings.
Yes I am also trying same, I went to some extent.
Yes is possible to do ,with help of Push reg which is with MIDP 2.0 Mobile app can be called after every 10 sec or so (I didn't Coded this yet)
and. to hide app use this line Display.getDisplay (this).setCurrent (null);
it will run be shown with your tab or run app again.
I am still getting some problems like, Internet will Go Off when Mobile screen goes Off.

Is it possible to run Safari in the background on the iPhone and monitor a user's location?

Is it possible to run Safari in the background on the iPhone?
Specifically, our client would like to monitor a user's location via HTML5 GPS capabilities and measure the speed of movement.
The reason for avoiding native implementation in iOS is because the client wishes to create a cross-platform service using HTML5.
Is this possible?
I don't believe Safari continues to execute when it's backgrounded. (This is supported by a recent thread on the Apple discussion board.)
That said, it would be fairly trivial to do this in a proper iOS application, although you'd obviously need existing knowledge of Objective-C, some of the main Cocoa/UIKit classes, the Xcode environment, etc.)

Comparison mobile devices as dev. platforms iPhone, Blackberry Windows Mobile

I was trying to compare the three above mentioned platforms and what considerations one needs to think about when programming in order to create some kind of code base that could run on all three.
This is what I have collected for the iPhone - it would be great if somebody else could write something similar for the other two.
Only one application can run at any
given time. i.e. that is why the
SQLLite database is loaded as a file
into the app instead of as
traditionally having some kind of
server to connect to.
Only one fixed size window 480x320
pixels
Runs in a sandbox, when the app is
deployed a sandbox is created
"around" the app, the app can only
read/write files from within that
area. Also low-level access to the
phone is restricted.
Since a program can be stopped at
any time (see point 1) this needs to
be considered when designing the
app, at any time must the app be
able to write its current state to
disk so that it can resume later. If
this takes longer than five seconds
the app will be aborted.
128MB RAM, about half of that 64MB
is available to the app. There is
typicall 4GB storage (depends on
model), no virtual memory, if memory
is running out the app may be
aborted.
Edit: just to be clear, I am not after which platform/os is best for the developer, I am just interested in spec. comparison to know what can be expected if one has three target platforms and using native language for each (not web apps), what the memory and other considerations are.
Edit: removed language as its assumed that native language for the platform will be used.
There is an excellent article on Codeproject which would be of benefit to your question. Head on over here to read it.
Hope this helps,
Best regards,
Tom.
For Windows Mobile I want to add:
Windows Mobile in comparison to iPhone allows multiple applications to run at same time.
It comes with variable screen sizes and has different sdks (
Windows Mobile Professional for 'Windows Phones' (smartphones) with touchscreens and
Windows Mobile Standard for 'Windows Phones' with regular screens)
The framework which is generally used is .Net Compact Framework besides some people also prefer open-net which is a open source framework.
Unlike in iPhone, Windows Mobile has no private api's which means it gives more power to developers.
The memory size allowed for a program is 32 mb
You do not need a developer license for developing and shipping applications on windows mobile although windows mobile itself prompts you to avoid installing apllications which are from unknown publishers.( which is more interesting unlike in iPhone you need to have a license while you only want to debug your applcation on your device(not for the jailbroken devices.))
And for some bad things about windows mobile, see this link.
Thanks,
Madhup
I feel like the final list will be of little use, as all data points collected will differ substantially in content apart from your last one. Some corrections to your iPhone list:
1) Local databases such as SQLLite are"not traditionally" implemented as a server on other mobile platforms either (they also use various file-oriented DB's).
2) Very soon that single fixed size assumption may well be inaccurate.
3) The App is in a sandbox but can write to some areas outside of the sandbox via API calls (for instance, photo library or address book).
5) That number varies between 3Gs and 3G/2G/Touch (the older models have half the memory)
6) Monotouch is available, but I'm not sure there's anything that far along for Java based iPhone development. There's also a Flash compiler from Adobe.
Basically if you are thinking cross platform, memory/screen size/system access/common databases will all differ - so the whole thing boils down to language AND LIBRARIES. And that is where you really have an issue with a cross-platform approach, because the libraries are very different per system... in the end you MIGHT be able to share data structures and some pure data processing code across the platform binaries, with very different GUI code for each system. But is it really worth it to constrain the development of each client?
On a side-note Blackberry is Java-based, so it presents yet another hurdle for such an attempt.
If you really want to see what cross platform ends up looking like, take a look at the codebase for Waze - a cross-platform open source navigation app:
http://www.waze.com/wiki/index.php/Source_code
Client source for iPhone and Windows Mobile lives there.