NDK fopen() in the common storage of Android API 31 - android-ndk

The common storage of Android API 31 is not accessible without the picker and that changes the environment for many old apps updating.
A basic problem is that the NDK (25.1.8937393) is not integrated with the Java picker and will hardly be so in the future. So getting the filename from the picker of the general storage and open with fopen() and the new policies will not work.
However fopen() can still be used in the apps own storage.
What to do about it?

The picker intent.getData() and OutputStream for reading and wring has to be used instead. The NDK fopen() can't be used.
But the resolver and URL can be stored to make file update writing without a new picker session, on a picker opened file.

Related

Publish a new version of a Chrome Extension to just testers (initially)

I have an unlisted extension published through the Chrome web store which is already being used. I have a new version which I would like to release just to testers initially, before a full roll out to everyone. Can this be done?
The same thing has been asked here but it was almost 9 years ago, and the answers disagree on whether it's possible or not:
How to publish new version of Chrome Extension only to testers
The short answer is "No, it can't be done for a published extension".
According to Chrome Web Store visibility descriptions, you must unpublish an extension before it can be published to trusted testers. Users who already have it installed will get updated to the new version.
In your case, you have to create a new extension with the new code, and a different name like "MyApp Beta" and publish it privately to the list of trusted testers.
Maybe you already know this, but you can install a chrome extension manually.
Go to chrome://extensions/ and check the box for Developer mode in the top right.
Click "Load unpacked exention"
Select the folder where your unzipped extension resides in.
So, you can send a zip/rar to your testers, let them follow the procedure and test the extension. Might be that you have to give it another name so as to not conflict with your earlier eversion, or you could ask your testers to delete the existing extension to avoid conflicts.
Well, the simplest way is to pack a .crx file of the tester-only extension then link to it via some cloud-hosting service like Google Drive. There is no way to do this through the Web Store. You could release a different extension as a beta channel though.
Not strictly related to publishing a full extension, but ... you could use feature toggling to control the visibility of new functionality? So wrap the new functionality in toggle checks and only turn the feature on based on some criteria you can decide in a custom roll-out strategy. See enter link description here for an open-source implementation of a feature toggle control system.
If you have a developer account and want to publish it on the chrome web store privately to just testers this is what you have to do:
Go to the Pricing and Distribution page of the extension during the publishing process
Click "Private"
Go to your developer account settings, and in the "Management" section, you can add trusted tester accounts.
You can change the status to public whenever your extension is ready.

How to download original source-code from chrome web store

I have an extension in Chrome Webstore I would like to download original files that used to be uploaded. Is there any direct way to download it straight from the store, since I am the creator and I do have access to my account?
You can download the current / past version of an extension on https://chrome-stats.com/. You can also just inspect the source code directly on that website.

Picture in photo gallery no longer exists once I restart Flutter app (within Android Studio development environment)

Within Android Studio Flutter development environment, I'm choosing a picture from its Photo Gallery, getting its file path and saving the path in database as text, and later retrieve the file path to refer back to the picture in the Photo Gallery.
This works fine, but once I restart the app (again, all within Android Studio), then the picture no longer loads as that file path is no longer valid.
Is Photo Gallery somehow specific to each Flutter session or something? Thanks.
That will depend on how the native part is implemented and the plugin you are using. On Android when you request an image from the Gallery using an Intent, you may receive 'temporal access' to the file.
If you do not copy the image you may lose that permission to access the photo. You can ask the maintainer of the plugin or check if they use grantUriPermission to give access to the image file.

chrome webstore: what are the possible ways to publish older version of the extension?

I have published a private extension to Chrome webstore. Only people with URL can download this extension.
Some of the users in my organization want to switch to the older version of the extension for sometime. what is the best way to do?
I am aware that chrome webstore doesn't support multiple versions on the same URL.
Sending .crx file is not an option (due to the bug https://bugs.chromium.org/p/chromium/issues/detail?id=638725)
I was thinking to publish the older version of the plugin (with different ID) to the store and give them the new link to download. Does the webstore allow?
are there other ways to do this?
I was thinking to publish the older version of the plugin (with different ID) to the store and give them the new link to download. Does the webstore allow this?
Yes, there should be no problem, especially for the same developer account. It's not atypical to have a "stable" and "testing" versions of the same extension in the Store.
Consider making a mechanism to migrate user settings before you do this (for example, using External Messaging between the two versions or some sort of copy-paste export/import).

Localhost code editor in Google Chrome tab - like Notepad++?

I looked into very many Google Chrome extensions and apps in order to find one that matches the following requirements:
runs in a Google Chrome tab
editor for any code, PHP, CSS, HTML
can load and save files (on my computer) and create new ones
works with local files on my computer
Is there any? kodingen, cloud9, shiftedit does not seem to make it on the localhost.
Maybe SourceKit will do?
SourceKit is an extension to your Google Chrome browser which runs in a separate tab. The files are stored in your Dropbox account, so not only can you access the files from your computer - you can access them from anywhere! It uses syntax highlighting like Notepad++ for a limited number of languages (you said php, css, and html - they are all supported). It can load, save, and edit text files locally on your computer if you install the Dropbox Desktop Application. This will also synchronize the files with your online account and thereby make them accessible from anywhere in the world.
That sounded more like a salesman's advertisement than intended.
Both Dropbox and SourceKit are free.
There are four catches as far as I can see:
Dropbox "only" offers 2GB for free, however, you can upgrade at any time if you're willing to pay.
Dropbox Desktop will only synchronize one folder (and all of its contents), but that's really not any different from a web site.
SourceKit will not debug your code, but will it highlight wrong syntax(only for certain languages).
EDIT Does not work offline.
I've tried it out, and it works well.
Sympathy Editor
Sympathy uses the npapi-file-io plugin mentioned in an answer above to allow you to edit local files.
Pros
Allows you to edit local files
Full syntax highlighting
Bookmark local files for easy access
Cons
Uses npapi plugin to read files, which means it has access to all your data
Unavailable on Chrome Webstore
Still under development
Only works on linux/windows as of the moment (not in mac)
If you are interested, you can see the README, or Manual on github.
Disclosure: I'm the primary developer of the extension.
Don't any of these extensions you have mentioned work with the file:/// protocol? They will work for the http:// protocol only if you are going to edit files inside your local webserver.
Instead of writing http://localhost/(...) you write file:///(...), where (...) is the full path.
In UNIX systems it is file:///home/jens/file.txt. In Windows it should be file:///C:\(...).
#Berk Demirkir may be right.
Here are the resources I found that may be of use;
32 Google Chrome Extensions For Smart Designers
Chrome Web Developer Tools No. 7 on the above list
There's no extension for editing local files.
But you can write one!
Acesses to local filesystem cannot be done using Chrome's Extension API.
But you can use HTML5's File API (which is draft) or Local Storage. If none of these storage methods sufficient for you, you can build a NPAPI Plugin. Chrome supports NPAPI Plugins. There's also a project called npapi-file-io in Google Code which aims to access local files from Google Chrome Extension context.
Edit:
Now, there's one usable editor, Symphaty. You can use Capt.Nemo's Symphaty editor.
Edit 2:
NPAPI plugins are phased out from Chrome since version 42. The only alternative would be to use a wrapper native app and communicate using Native Messaging API.
ShiftEdit can be used to work locally, you will need to have XAMPP or equivalent installed.

Resources