Comments (12)
This would require rebuilding the app each time settings are changed? Doesn't https://github.com/bk138/droidVNC-NG?tab=readme-ov-file#how-to-pre-seed-preferences do the same?
from droidvnc-ng.
In my opinion, the local file is a different scenario. The MDM is not able to put the json file in this directory.
BUT:
The feature of trigger the vnc-server by intent and configuring the settings by the intents "datacontainer" is really great. Maybe this can be used for a workaround:
I could extend my app so it can be configured by MDM and pass these Settings to VNCServer per Intent.
I will try out and close this issue when it's working.
from droidvnc-ng.
Good morning and thanks for your answer! If you get it to work, please leave a few notes here; might be interesting to others as well.
from droidvnc-ng.
Hi again,
I just think about the approach: I need the randomly on the device generated access key to setup the settings from my app by intent. Right? When yes, this is a big problem.
The goal is to make a mass deployable configuration which can be rolled out by MDM.
When every device has a different access key, it is useless to pass the access key by MDM to my app on the device fleet so it can trigger vncServer.
The only way would be to setup the same access key on every device. There is not much saving here compared to setup the whole configuration by json-file.
My next step is to request my MDM-vendor if there is a way to drop the json-File on the described location. I let you know the answer.
from droidvnc-ng.
Hi again, I just think about the approach: I need the randomly on the device generated access key to setup the settings from my app by intent. Right? When yes, this is a big problem.
It would be, but you can preseed the access key via the JSON, see the docs at https://github.com/bk138/droidVNC-NG?tab=readme-ov-file#how-to-pre-seed-preferences
from droidvnc-ng.
The MDM-vendor confirms that there is no way to put the json file by MDM.
I tried another workaround and my app tried accessing the directory - even if MANAGE_EXTERNAL_STORAGE is definied and explicitly permitted - the app can not access this app-specific directory. This aligns with https://developer.android.com/training/data-storage/manage-all-files.
The only use case for using the json to setup the vnc-app is copy it by usb on the directory on the device.
But that is not a solution for me.
I think, configure the app by using managed settings is the only way that fits the needs of the described MDM-scenario.
Please consider about this feature.
from droidvnc-ng.
@stegl83 Are there any docs/examples/best-practices for the requested feature? Are you representing a company that would fund this?
from droidvnc-ng.
Hi,
I just prepared the restriction-files for you. In .NET MAUI / Visual Studio you have to put them like this:
In Java it will be similar. After building the App and publishing to the store, the MDM will evaluate this new metadata and the configuration UI will look like this:
restriction_values.xml:
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<string name="net.christianbeier.droidvnc_ng_config">Configuration</string>
<string name="net.christianbeier.droidvnc_ng_config_desc">Configuration for DroidVNC</string>
<string name="net.christianbeier.droidvnc_ng_EXTRA_ACCESS_KEY">Access Key</string>
<string name="net.christianbeier.droidvnc_ng_EXTRA_ACCESS_KEY_default"></string>
<string name="net.christianbeier.droidvnc_ng_EXTRA_PORT">Port</string>
<string name="net.christianbeier.droidvnc_ng_EXTRA_PORT_default">5900</string>
<string name="net.christianbeier.droidvnc_ng_EXTRA_PASSWORD">Password</string>
<string name="net.christianbeier.droidvnc_ng_EXTRA_PASSWORD_default"></string>
<string name="net.christianbeier.droidvnc_ng_EXTRA_SCALING">Scaling</string>
<string name="net.christianbeier.droidvnc_ng_EXTRA_SCALING_default"></string>
<string name="net.christianbeier.droidvnc_ng_EXTRA_VIEW_ONLY">ViewOnly</string>
<string name="net.christianbeier.droidvnc_ng_EXTRA_VIEW_ONLY_default">false</string>
<string name="net.christianbeier.droidvnc_ng_EXTRA_SHOW_POINTERS">Show Pointers</string>
<string name="net.christianbeier.droidvnc_ng_EXTRA_SHOW_POINTERS_default">true</string>
<string name="net.christianbeier.droidvnc_ng_EXTRA_FILE_TRANSFER">File Transfer</string>
<string name="net.christianbeier.droidvnc_ng_EXTRA_FILE_TRANSFER_default">false</string>
</resources>
app_restrictions.xml:
`
<restriction
android:key="EXTRA_ACCESS_KEY"
android:title="@string/net.christianbeier.droidvnc_ng_EXTRA_ACCESS_KEY"
android:defaultValue="@string/net.christianbeier.droidvnc_ng_EXTRA_ACCESS_KEY_default"
android:restrictionType="string"/>
<restriction
android:key="EXTRA_PORT"
android:title="@string/net.christianbeier.droidvnc_ng_EXTRA_PORT"
android:defaultValue="@string/net.christianbeier.droidvnc_ng_EXTRA_PORT_default"
android:restrictionType="integer"/>
<restriction
android:key="EXTRA_PASSWORD"
android:title="@string/net.christianbeier.droidvnc_ng_EXTRA_PASSWORD"
android:defaultValue="@string/net.christianbeier.droidvnc_ng_EXTRA_PASSWORD_default"
android:restrictionType="string"/>
<restriction
android:key="EXTRA_SCALING"
android:title="@string/net.christianbeier.droidvnc_ng_EXTRA_SCALING"
android:defaultValue="@string/net.christianbeier.droidvnc_ng_EXTRA_SCALING_default"
android:restrictionType="string"/>
<restriction
android:key="EXTRA_VIEW_ONLY"
android:title="@string/net.christianbeier.droidvnc_ng_EXTRA_VIEW_ONLY"
android:defaultValue="@string/net.christianbeier.droidvnc_ng_EXTRA_VIEW_ONLY_default"
android:restrictionType="bool"/>
<restriction
android:key="EXTRA_SHOW_POINTERS"
android:title="@string/net.christianbeier.droidvnc_ng_EXTRA_SHOW_POINTERS"
android:defaultValue="@string/net.christianbeier.droidvnc_ng_EXTRA_SHOW_POINTERS_default"
android:restrictionType="bool"/>
<restriction
android:key="EXTRA_FILE_TRANSFER"
android:title="@string/net.christianbeier.droidvnc_ng_EXTRA_FILE_TRANSFER"
android:defaultValue="@string/net.christianbeier.droidvnc_ng_EXTRA_FILE_TRANSFER_default"
android:restrictionType="bool"/>
<!-- add more settings if something missing -->
</restriction>
`
from droidvnc-ng.
For reading this settings in the app, you have to use RestrictionsManager-API.
Here are the Docs: https://developer.android.com/work/managed-configurations?hl=de
from droidvnc-ng.
Thanks! Will go through this when I have so spare time. If you or your company need this in an expedited form, feel free to reach out to me via email.
from droidvnc-ng.
Hey @stegl83, I'm CEO and CTO of Nomid Tech, a MDM provider.
We are evaluating alternatives for remote access and stumbled upon this project and issue. Please reach us at [email protected] so we can discuss further the usage in your company.
I'm sure we can share experience and combine efforts to either contribute with a PR or fund this feature request.
from droidvnc-ng.
@leandro-nomid @stegl83 Would happily merge a PR that's generic enough for all users, or, if that's not possible, detailed documentation of setting things up.
from droidvnc-ng.
Related Issues (20)
- Input Permissions Denied, no option to allow HOT 2
- Build Issues on Windows with Android NDK and CMake HOT 1
- How can I connect to two android devices when them are not in same local area network? HOT 3
- VNC Input not working but still able to see whats on the screen HOT 6
- Use AccessibilityService takeScreenshot API on API level >= 10 to show screen before MediaProjection is enabled
- Streaming of single app: restrict input to that app HOT 3
- sometimes when launch service with adb, the controler can not access to touch the whole screen HOT 2
- Prepare for Android 14
- droidvnc-ng can not reconnect and maintain the connection using repeater
- Viewing video of a channel from Android TV 11 HOT 3
- Does not work under Android 14 HOT 5
- Notification Sound HOT 2
- Remove confirmation at start HOT 3
- Need Cut and Paste HOT 1
- Explore use of API 33 methods to overcome Android limitiation where for some text fields only single character can be entered HOT 6
- Remote Input does not work on ChromeOS. HOT 1
- Make it possible to record phone unlock screen HOT 1
- Mouse clicks freeze connection for 1 second each and are not sent (Android 10) HOT 3
- Port it to magisk module / using root access HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from droidvnc-ng.