Accessing ExternalStoragePublicDirectory in Google Chrome ARC app - google-chrome-arc

We have a feature in our app which can save file to ExternalStoragePublicDirectory. Below is the directory path we are using.
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
It looks like file is getting saved in the directory. But I cant locate the saved file in Desktop or Chromebook. Can anybody please point me to right direction?

Under ARC, your external storage files are being read and written to the HTML5 filesystem. Under Chrome app (yours included) gets its own filesystem.
You can view this filesystem with Chrome (desktop or Chromebook) using some experimental developer tools. You have to enable them and then restart the browser. Here is how:
Visit "chrome://flags" in your browser.
Search for "Enable Developer Tools experiments", and click the "Enable" link.
A prompt to restart your browser should have appeared. Go ahead and click it to restart your browser.
Go ahead and launch your app. It needs to be running so that you can browse the filesystem.
Next visit the "chrome://inspect/#apps" page in your browser, and find your app in the list. Click the "inspect" link to bring up the inspector window.
Click the gear icon in the upper right of the window.
Click the "Experiments" tab listed on the left side of the popup. This is only visible if you enabled the experimental features at all.
Click the "Filesystem Inspection" checkbox to enable the filesystem viewer.
Finish up by closing the options page with the "x" at the top left.
Now you can view your app's filesystem.
From the inspector window for your app, click the "Resources" tab along the top.
You should see a "FileSystem" option appear in the list on the left side. Click it to expand it.
Click the "persistent -chrome extension:" subpanel.
You should be able to then navigate to the download directory by expanding the view that appears. I believe for downloads you want "/storage/sdcard/Download".
Selecting the directory will display basic metadata on all the files in the directory. Selecting the file might display it if it is supported. Or you might just get a "Binary File" message if not.
If you want to actually manipulate the data beyond that, you will need to connect with the browser with the Android adb command/shell, and you should be able to "adb pull" the file. See https://developer.chrome.com/apps/getstarted_arc#bestpractices to get going on that.
You can also add {"enableExternalDirectory": true} to your application's metadata. Enabling this option means that ARC will prompt you for the directory to use for for the external directory, and you can pick a real directory on your system to use. But if you already download a file prior to enabling this feature, you will have to download it again.

Related

How to open a saved .asm file in MARS on MacOS

I am new to using MIPS and I can't find how to open a file that I saved. I saved a .asm file under my downloads folder but when I try to open a file in MARS and navigate to the same downloads folder, the .asm file does not appear.
I'm using MARS on MacOS.
As stated above, you need to allow Full Disk Access in your System Preferences in macOS. Here they mention that you need to search for 'JavaLauncher.app'. This is an issue due to macOS changes with security management.
To give Full Disk Access to JAR files on macOS:
Go to System Preferences.
Click on Security and Privacy.
Search for 'Full Disk Access'.
Click on the lock at the bottom left to be able to make changes.
Click on the '+' icon at the bottom left of the FDA panel and a Finder prompt will appear.
Go to System/Library/CoreServices/JavaLauncher.app
Select the JavaLauncher.app and click 'Open'
That's it. You should be able to access files through your Java application. This helped to fix my issue with MARS MIPS not saving files properly on my laptop. I constantly needed to save it elsewhere.
I figured out that I had to allow access to finder directories for jar files. Mac didn't allow mars to initially access any of my directories.

How can I make downloaded files appear in "Recent" in Finder?

I'd like files downloaded via browser to also appear in "Recent" in Finder, as well as the normal content there. I really miss this functionality from Ubuntu and am aware of how much time and clicks it costs to not have it. How can that be achieved?
Recent folder is not connected with download folder. But you can drag download folder to the dock, then right click on folder and choose your settings you want.

Issues opening project file in tfs?

I am trying to open a project/website for edit in TFS and I'm having a lot of issues. TFS is proving a learning curve for me...
I'm trying to access files in the 'forms' root...
These are the steps I’m taking…
Right-click on ‘forms’ and click on “Get Latest Version”
Then this screen pops up…
When I hit OK, then I right click again, and click “Check Out for Edit”
I hit “Check Out”
Then to open the site, I go to File > Open > Web Site…
Then the File System comes up… I selected ‘forms’, as you suggested…
Once it opens, I see this…
I double-click on ‘Default.aspx’, and this comes up…
When I view in Browser, this is the screen I get…
Where am I going wrong?
Here's the best way to accomplish what I was trying to do. This was after several hours of trial/error...
Open a Web Site…
Select Source Control Project…
Choose the site root.
It may prompt you to receive a local copy. Do this.
If it asks you to change frameworks, say no.
In the Solution Explorer, a new .sln file should be generated, with properly bound files:

Make the file download manager window the front window in Firefox/Safari

If Safari/Firefox have already downloaded files then they keep a download manager window open. When the user downloads a new file from my site, is there any way to force that download manager window to the front of all windows?
I don't think so. The Download manager is not under the site's control. Maybe through a Firefox extension, but definitely not using normal JavaScript.
Can't you make the download window close on completion? Then it will re-open each time, which usually results in it being on top.

On publishing a click once installer through install from web, the installer does not appear on the webpage

I am creating a clickonce installer using the deployment strategy of Install from the Web or network share, on one of my project. I am learning how to use click once installers. When i publish my project it gets succeeded. i gave the URL of my website that i had created through google so that anyone can install from that URL. After publish gets succeeded the URL should be launched automatically but it is not. Moreover. When i check my website and in it that page whose URL i had given, there is nothing there. No installer. Please help.
Right Click on Publishing Project
Click Properties
Click "Publish"
In "Publishing Folder Location" is anything set there?
Click the button with ellipsis (...) to the right of the combobox
Click "FTP Site" (not Remote site, as this needs FrontPage extensions)
Enter the Server information, Directory (that you have access to), keep it as passive mode, uncheck the Anonymous option and put in the valid FTP instructions.
Click Open, and Republish. All should work 100% with this.
If not, have a look in your wwwroot/ folder and find the application information (if it's there) and you will have to manually upload the files.
EDIT for comment:
The website that you are uploading to, does it have FTP access? Meaning a place that you would upload file to for display on the website, even like your html content? (index.html etc.)
If not, you will need to get these details from your website hosting provider and fill in the appropriate fields for the FTP upload.
It's a while since I did this, but I'm fairly sure that you have to upload the files manually.
The installer needs the location so it can build the web page etc. All the files should be in an output folder in your project.
EDIT: I've just checked and the output folder is the one you specify on the first step of the Publish Wizard. If you specify a local folder the files will be put there for you to FTP to your website later. You can also specify a remote address as and FTP or HTTP location (which I'd forgotten when I posted my original answer). You'll have to enter the user name and password for connecting to the remote location later in the process.
Are you using Visual Studio 2008? The default behaviour of deploying a "publish.htm" page has changed.
Bring up your project's properties and switch to the "Publish" tab. Click the "Options" button and switch to the "Deployment" section of the dialog. You'll see by default that the "Deployment web page" TextBox is empty. You'll need to give that a value and also check the "Automatically generate deployment web page after every publish" CheckBox.
I've taken to filling that in with "default.htm" so that whichever folder you deploy your app into will have the ClickOnce publish page as its default page.

Resources