How to make a service application in Firefox OS? - firefox-os

I need a service application in Firefox OS which should start at boot time. I searched several sites but didn't get anything useful. Also I would like to know what all changes should be made in the manifest file and js file. Also the requirement of index.html file.

There is the Background Services, but it's not available yet, and tagged a certified app right now. So it's not possible at the moment.

The most relevant API that could act as 'service' is alarm API, which allow app to trigger itself periodically and do some stat checking. Calendar/Email App use that technique to pull new event/mail from internet.
Ref: http://tech.mozilla.com.tw/posts/2223

Related

Problems running large command line program (Inkscape) in Azure Function app or App Service

I wasn't sure whether to ask this in an Inkscape specific forum or here in Azure. I tagged both.
My goal is to run a windows build of Inkscape in a cloud function preferably or in an App Service to open up different vector files and send them back to the user as a plain SVG.
I've downloaded the binary archive (https://inkscape.org/en/release/0.92.2/windows/32-bit/) and extracted it in Kudu on both a paid App Service and in a Function App.
When I run inkview.com it seems to be working. It outputs info to cmd
But when I run inkscape.com it just stays open for a couple of seconds and quits. (Just outputs a blank line and exits) I've tried -V and -? and many other commands (also using the -Z without GUI command).
Does anybody have an idea of what's going on here? Is Azure perhaps missing some dependencies that Inkscape needs to run? Any ideas on how to troubleshoot?
Thanks in advance.
Azure Functions, like WebApps and Mobile Apps, run in an App Service. The App Service runs in a secure environment called a sandbox which imposes certain limitation. Amongst them, is the use of GDI+.
With Inkspace being a graphics program, I can only imagine that it is making use of GDI+, so it would be blocked.
You can see the list of limitation https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#unsupported-frameworks
In order to be able to run inkspace in Azure, you need to host in something other than App Service, such as a VM, Cloud Service, Service Fabric, Containers... etc.

is there any way i can use Application Loader on windows?

I have just created an iPhone app and need to upload the .ipa file, but I downloaded application loader and I am not able to open it via windows 7. is there any way around this?
I know this is an old question, but it came up on my search for a solution to the same problem. I wanted to share that I found a service that offers remote access to Mac OS called macincloud.com
I gave it a try, and it's surprisingly easy. Documentation isn't great, but it's not that difficult once you have access to the remote mac. Depending on how much time you're going to need to spend, there are a few pricing options, the cheapest of which is $12/week, but you can cancel any time (we'll see).
Of course it's very late for answering this, but maybe someone need this service. There is a desktop application that allows you to send your generated .ipa as well as Application Loader.
See here: http://appuploader.net/index.php
You can have Mac OS on your PC Virtual Machine, then easily install Application Loader there
When in search "Application Uploader" in Google, the following result http://www.appstoreuploader.com/ comes at no. 3. Apparently they charge $5 to upload your app.

Launch a local file with default file handler from chrome packaged app (or extension)

I'm building a launcher for internal use with a Chrome packaged app which includes links to internal resources (databases, web links, etc.).
The problem is with local files. I want them to launch using whatever program is the default handler for them. For example, access databases open in Access, etc.
I've tried:
Creating a file link file:///. Nothing happens in this scenario on click and the link is not followed.
I found an extension (locallinks) here: https://code.google.com/p/locallinks/, which will open local file links. I've tried borrowing from that extension and passing the file link to the background script in my packaged app which would then open a new window with that url. Unfortunately, that results in a file not found, even for simple types such as text files. So obviously the local filesystem is sandboxed. Not surprising.
I thought maybe it would work to pass the link to an extension to open, but in that case, the file would be opened in Chrome and if Chrome does not support it, it would attempt to download the file locally.
The reason I'm using Chrome Packaged Apps is:
1. This will be updated often and the Chrome Web Store update feature would make it easy to keep clients updated without having to build our own update mechanism.
2. We can restrict installation of the app through CWS to internal users.
3. The app would be used in a Windows, Linux and Mac environment. Obviously the file paths here would be different but since they would point to a samba share, and mount points and network share drive's are known this is an easy problem to overcome.
4. There is additional functionality we will be building into the Chrome app in the future other than the launcher which fits very well with how Chrome Apps are designed.
My thoughts are:
Native Client? I have read a bit about these, but I think I would end up with the same limitations where the native client app would be sandboxed and may not actually have any better way of launching a local file.
Sockets? Maybe a simple Qt app listening on a socket to launch apps? Since the Qt app would be run with user permissions, and the socket would only accept connections from localhost, I guess the socket could in theory be used by a non-privileged app to launch something with user-level permissions. Is there a way for me to limit connections through the socket to only be accessible from my extension?
The sockets solution isn't ideal but may work since the app would not be updated often (if ever) since functionality is so simple.
Am I missing an obvious way of doing this that wouldn't require another component (a Qt app?)
Relating to your thought #2, not sure what local installation footprint you are willing to tolerate, but you may consider:
Hosting a miniscule local web server, or Qt app as you mention, which can also launch local programs (any of those lightweight web server frameworks). Have your packaged app, or your own chrome extension rewrite links such that they point at your web server along with the url of the original link, which can easily launch whatever program. Downsides: this may cause bypassing some browser security screening of the original links in some forms of implementation.
You may also look at this stackoverflow question if it helps.
You can limit access by confirming the requests originate from the local machine, or by embedding a key or hash inside your chrome extension. You may generate the key upon installation so that it's unique per machine. None of this will pass very proper security scrutiny so it depends on your risk profile. You will have a hard time justifying how each part is secure and clean of exploitation attack potential.
It seems you will need both a chrome extension and a local miniscule web server to make this work. Maybe it's easier to let users just download the files and click them...
Sorry if this isn't help enough, but basically you are trying to do something that is by design not made possible in Chrome, so at this state of affairs there would likely not be a simple solution.

Azure website node process lifecycle

I 've found out that Azure websites (trial version) doesn't autostart my node sever process (it starts only when I load the url in the web browser); and that when there are no requests in a while, the process is killed.
I mean, when I git push my server, I would like it to start running immediately and continuously.
I read (here, for example) that this might have to do with the way iisnode manages azure websites, and that I can't do anything to change it. Is this the actual way Azure websites work? Is there any way I can deal with this?
Thanks in advance,
Bruno.
You've find the answer. There is no other answer.
The process termination because of inactivity comes from IIS - there is Idle Timeout setting. Which to my knowledge is not configurable in Azure Web Sites (at least not Free tier). Check out also this SO question and its answer to get better understanding on why you can't change this timeout on the FREE and STANDARD tiers.
And here is an interesting workaround to avoid this idle timeout. Actually if you use technique, you will also have kind-of "auto start", in terms that when your scheduler hits your site after a new deployment, it will "boot up".
This can get a little complicated, but if you don't want to use their 5-min ping service, you can keep these always on by doing the following:
Create an app setting on your website configuration tab within the portal:
WEBSITE_PRIVATE_EXTENSIONS and give it a value of 1
Create a text file named applicationhost.xdt and populate it with:
<?xml version="1.0"?><configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"><system.applicationHost><applicationPools><add name="DefaultAppPool" managedRuntimeVersion="v4.5" startMode="AlwaysRunning"><processModel identityType="ApplicationPoolIdentity" /></add></applicationPools></system.applicationHost></configuration>
ftp into your website and create a folder on the root directory called Site Extensions. (there should now be 3 folders in your root: LogFiles, site, & SiteExtensions)
Create another folder within 'Site Extensions', named ASPLimits
Upload the applicationhost.xdt into the ASPLimits folder
Restart your website using the portal

How to turn off Internet Explorer enhanced security settings in Azure

My site is hosted on Azure. I need to programmatically turn off Internet Explorer's default enhanced security configuration settings whenever I repave or redeploy a new box on Azure.
How do I do this?
I found this article on another site http://jetlounge.net/blogs/teched/archive/2009/10/25/fix-ie-esc-won-t-turn-off-internet-explorer-enhanced-security.aspx. It included the following command line syntax, but on my local box I couldn't find the IEHARDEN.INF file it referred to. I also don't think this solution is Azure-specific.
rundll32.exe setupapi.dll,InstallHinfSection IESoftenAdmin 128 %windir%\inf\IEHARDEN.INF
I need to turn off these default hardening settings under Azure because I have a 3rd party IE screen capture DLL that needs to execute Javascript on webpages.
I think that this approach, shaped in a Windows Azure StartupTask running in Elevated execution context will help you.
Just remember that the .bat or .cmd file you create needs to be UTF8 encoded. There used to be some issues with the batch files if they are not UTF8.
UPDATE
I decided to update the answer, because it would have been too long for a second comment. I want to first make clear that I do not intend to offend anyone and the next is just mine personal view and thoughts.
Well, I mine vision might be (is) distorted through mine prism. But, I think that these specifics has nothing to do with Windows Azure itself.
These are OS related configuration specifics and the approach would be one and the same (with some variations) regardless of a (hosting/cloud) provider. If you had to deploy your solution to a dedicated (or virtual) server, you would had to create some kind of scheduled task, or startup task to make these configuration changes. Or even interactively login to make these changes.
Since Windows Azure offers the StartUp Task, it is up to us (developers) to decide what to do and how to shape the OS according to our needs.
The OS configuration changes that one can possibly need are only limited by the total ammount of all available Windows Server 2008/R2 configuration options. I personally do not believe that these needs to be reflected in Windows Azure documentation by any means. They have their place in Windows Server documentation. It is arguable which are "commonly used", because what might be common for one, might also be "never needed" for others ...

Resources