I developed one android app and transform it with ARC welder.
So app can run in chrome os.
I add the "enableExternalDirectory": true" in metadata list.
So the app can accessed the file in local storage.
But I do not want the folder selection dialog pop up while first time launching the app.
So, could I disable the enableExternalDirectory in metadata list and enable the value in runtime?
Thanks!!!!!!
Related
Initially Allow Apps to access location and my app's access precise location is off in my windows machine. I opened my app and GPS is unavailable. I enabled both Allow Apps to access location and my app's access precise location. after that, I tap the location icon and it will trigger Geolocator.RequestAccessAsync() to check GPS-enabled via dependency service. Geolocator.RequestAccessAsync() taking too much time for returning its value in UWP with Xamarin.Forms. Need to reduce the time or better alternatives with lesser timing in UWP for Xamarin.Forms.
var accessStatus = await Geolocator.RequestAccessAsync();
I'm making a WebExtension (for Firefox) that tracks lists for the user. The user can add/remove elements from a list, or switch an element from one list to another, which means the extension needs the most recent version of the lists to work with.
So to be used on both desktop and Android, the extension needs to transfer/synchronize some data (which can be stringified).
I'm trying to find a way for the user to do it as simply as possible, without using external services.
The ideal solution for that (completely transparent for the user) would be to use storage.sync, but although it does synchronize between devices, it doesn't (yet) sync between normal Firefox (desktop) and Firefox for Android (implementation tracked at https://bugzilla.mozilla.org/show_bug.cgi?id=1316442).
Another solution would be to use the bookmarks API, but it's not supported by Firefox for Android (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/bookmarks) either.
That leaves me with two solutions that I can see:
Letting the user save/retrieve the data to/from a local file, which means they need to copy the file to the other device (that's what I have in place right now).
Saving/retrieving the data to/from a third-party server (which means I would have to create a server, and have the user make an account on it).
Is there any other solution that I'm missing?
According to this support document, the following data is synced from/to Android: bookmarks, history, open tabs, form information and passwords.
This chart shows which web extension APIs are supported on Android:
Bookmarks: no API yet on Android
History: no API yet on Android
Tabs: API supported. Extensions that should occasionally or one-time sync could implement a manual process (this is a useless flow for OP as the question describes a flow where syncing should occur often):
Open a tab with a web-extension or data URL with sync data in the query parameters. In this tab, display some text asking the user to open Firefox on the other device. Keep a record that you opened this tab locally using sessionStorage.
When the tab is opened on the other device and the sessionStorage is missing, get the sync data from the query parameters and display a message that the data was synced and that both tabs can now be closed.
Form information: no API yet
Passwords: no API yet
Not mentioned in this list, but also synced is BrowserSettings. It allows overwriting some fields that are synced (homepageOverride, newTabPageOverride), but those fields have to be defined in manifest.json so they cannot be dynamic. Also, it would probably interfere with normal functioning.
In conclusion: wait for browser support or pick a server solution.
I have an app that needs to perform some actions based on a TTimer.
When the app becomes inactive (in background), the timer stops working.
I could not find any relevant options for UIBackgroundModes.
How can I make a timer keeps running?
iOS pauses your app automatically shortly after it goes into the background. You need to let iOS know that you are going to continue operating in the background.
In Project > Options > Version Info you can add to the array key UIBackgroundModes the string values for the services that require to continue running in the background. This gets added to the info.plist for your project on iOS.
You can consult Apple's documentation on what these values do . . .
Value - Description
audio - The app plays audible content in the
background.
location - The app provides location-based information to
the user and requires the use of the standard location services (as
opposed to the significant change location service) to implement this
feature.
voip - The app provides Voice-over-IP services. Apps with this
key are automatically launched after system boot so that the app can
reestablish VoIP services. Apps with this key are also allowed to
play background audio.
fetch - The app requires new content from the
network on a regular basis. When it is convenient to do so, the
system launches or resumes the app in the background and gives it a
small amount of time to download any new content. This value is
supported in iOS 7.0 and later.
remote-notification - The app uses
remote notifications as a signal that there is new content available
for download. When a remote notification arrives, the system launches
or resumes the app in the background and gives it a small amount of
time to download the new content. This value is supported in iOS 7.0
and later.
newsstand-content - The app processes content that was
recently downloaded in the background using the Newsstand Kit
framework, so that the content is ready when the user wants it. This
value is supported in iOS 5.0 and later.
external-accessory - The app
communicates with an accessory that delivers data at regular
intervals. This value is supported in iOS 5.0 and later.
bluetooth-central - The app uses the CoreBluetooth framework to
communicate with a Bluetooth accessory while in the background. This
value is supported in iOS 5.0 and later.
bluetooth-peripheral - The app
uses the CoreBluetooth framework to communicate in peripheral mode
with a Bluetooth accessory. The system will alert the user to the
potential privacy implications of apps with this key set. See Best
Practices for Maintaining User Privacy for more information on
privacy. This value is supported in iOS 6.0 and later.
Notice you need to actually select the mode that matches what you are doing. You can't just select fetch when really all you are doing is background processing.
I've installed the ARC Welder extension for Chrome. I opened it and added an apk. When I navigate to my Chrome Apps page, I see an icon of the app, and when I click on it, it launches ARC Welder and starts that app. Beautiful!
When I try to open a second copy of the app, it closes my Chrome Apps tab and sets the focus to the already-running instance of that app.
On the Chrome Apps page, I've tried right-clicking the icon to look for some option, holding control and clicking it, and opening it from a different Chrome window, but each time, it either does nothing or just directs me to the already-running instance of the app.
Is it possible to use Google ARC Welder to run multiple copies of the same app?
Thanks!
ARC Apps only allow one instance at a time. If you click the App icon it only refocuses the window.
It would be problematic if multiple App instances could be running simultaneously; for instance, they would share the same filesystem which was not necessarily designed to be accessed simultaneously like this.
If you want a second app instance at the same time, you would need to package it separately with a second App ID.
after loading it in ARC Welder
this can be done in 4 steps
click download zip instead of test.
After you save the zip file you'll have to extract it to a folder.
Then in chrome go to the extension page and select "developer mode".
finally click "load unpacked extension" and select the folder you just extracted
if you want to run multiple instances of the same app
you can simply make an copy of the folder you extracted en repeat step 4
Docker will allow you to run multiple ARC Welder containers simultaneously. Here is a Youtube clip showing how.
Is there a way to make my winRT application as a screen saver in xaml?
As Jerry says, there's no straightforward way to make a Windows Store app screensaver. However, there's a roundabout solution that might work for you on Windows 8, but not Windows RT. I have it nearly working. I'll share what I have so far.
A screensaver is just an executable with a .scr extension that's kept in C:\Windows\System32. For example, look at C:\Windows\System32\Bubbles.scr. The solution I have in mind is to create a .scr screensaver whose only purpose is to launch your Windows Store application, which you say will use XAML.
You can't launch a Windows Store app from the command line directly, so you'll create a launcher app. Take a look at a blog post called Automating the testing of Windows 8 apps by Ashwin Needamangala. Partway down the article, look for the section called Automating the activation of your app. It contains a sample C++ application which can launch Windows Store apps in the following way:
C:>Win8AppLaunch.exe Microsoft.BingNews_8wekyb3d8bbwe!AppexNews
The sample launcher on that page needs to be modified, but before you do that just copy the code into a C++ console app:
You're almost ready to test it out from the command line, but you need to specify the name of the app as an AppUserModelId. The details are in Ashwin's post, but to paraphrase you first want to allow the execution of PowerShell scripts on your system with:
PS C:> Set-ExecutionPolicy AllSigned
Then run this PowerShell script:
$installedapps = get-AppxPackage
foreach ($app in $installedapps)
{
foreach ($id in (Get-AppxPackageManifest $app).package.applications.application.id)
{
$app.packagefamilyname + "!" + $id
}
}
You might like running it in the Windows PowerShell ISE. It's pretty slick. Find the AppUserModelId of your app and then test Win8AppLaunch.exe from the command line, as shown above. This should launch your Windows Store app from command line.
Next, modify the C++ launcher to hard-code the AppUserModelId of your application instead of parsing it from a command line argument. I created a Gist of this. The important part is the line where I declare myApp.
Build the new executable, rename it MyScreenSaver.scr and put it in C:\Windows\System32. It will then appear in the Screen Saver Settings Control Panel. You can preview the screensaver there, and it works. However, if you wait for the screensaver to launch, it will briefly bring up a console window and never fully launch. I'm not sure why. I tried disabling the creation of the console window by switching the project to a Windows app, but that didn't help. You can try that yourself by changing Properties | Configuration | Linker | System | SubSystem to WINDOWS. It's a little more involved, as you'll also need to change the entry point from _tMain to _tWinMain. Contact me through my blog if you want the details. My StackOverflow profile lists it.
At this point it's almost fully working. You might try starting with a blank C++ screensaver that you know works, and then copy in the above code. If I get more time, maybe I'll try this myself.
Cool idea. But, no.
If you want your application to really do something for Windows other than run as a simple app, then you write an extension app. Here's the official word:
Extensions An extension is like an agreement between an app and Windows. Extensions lets app developers extend or customize standard Windows features primarily for use in their apps and potentially for use in other apps.
There are these types of extension apps right now:
Account picture provider (extension)
When users decide to change their account picture, they can either select an existing picture or use an app to take a new one. If your app can take pictures, you can use this extension to have Windows list your app in the Account Picture Settings control panel. From there, users can select it to create a new account picture. For more info about this extension, see the UserInformation reference topic. You can also check out our Account picture name sample.
AutoPlay (extension)
When the user connects a device to a computer, Windows fires an AutoPlay event. This extension enables your app to be listed as an AutoPlay choice for the one or more AutoPlay events.
Background tasks (extension)
Apps can use background tasks to run app code even when the app is suspended. Background tasks are intended for small work items that require no interaction with the user.
Camera settings (extension)
Your app can provide a custom user interface for selecting camera options and choosing effects when a camera is used to capture photos or video. For more info about this extension, see Developing Windows Store device apps for cameras.
Contact picker (extension)
This extension enables your app to register to provide contact data. Your app is included in the list of apps that Windows displays whenever the user needs access to their contacts.
For more info about this extension, see the Windows.ApplicationModel.Contacts.Provider reference topic. You can also check out Managing user contacts.
File activation (extension)
Files that have the same file name extension are of the same file type. Your app can use existing, well known file types, such as .txt, or create a new file type. The file activation extension enables you to define a new file type or register to handle a file type.
Game Explorer (extension)
Your app can register with Windows as a game. To do this, you must create a Game Definition File (GDF), build it as a binary resource in your app, and declare that resource in the package manifest.
Print task settings (extension)
You can design an app that displays a custom print-related user interface and communicates directly with a print device. When you highlight the features that are specific to a particular make and model of print device, you can provide a richer, more enhanced user experience.
Protocol activation (extension)
Your app can use existing protocols for communication, such as mailto, or create a custom protocol. The protocol activation extension enables you to define a custom protocol or register to handle an existing protocol.
SSL/certificates (extension)
Digital certificates are used to authenticate one entity to another. For example, certificates are often used to authenticate a user to web services over SSL. This extension enables you to install a digital certificate with your app.
cite: http://msdn.microsoft.com/en-us/library/windows/apps/hh464906.aspx
Unfortunately, nothing has to do with screen savers. The technical reason, at this time, you cannot write a Windows 8 app that functions as a screensaver is because Windows 8 apps are fundamentally tied to run inside the WinRT execution environment. That shell does not extend out past the Start menu in this current version of Windows. So, there's no way to execute outside - like as a screen saver. Screen savers are still built the "old fashion way".