Android Management API - Single App in Kiosk Mode - How to hide status and navigation bar? - fullscreen

What I would like to achieve?
For internal purposes only / within our enterprise only, I would like to have Android tablets, which run only one single app (made with Ionic/Angular) which even appears after restarting the tablet and the user is not able to leave it.
I think the technical description of what I would like to achieve is called a dedicated devices (formerly called corporate-owned single-use, or COSU).
How would I like to achieve it?
I would like to achieve this with Android Management API, which looks like a great choice for a MDM (Mobile Device Management) solution.
Here Google shows how to achieve this with an Android Management API policy.
The Problem?
I am not able to get rid of the status and navigation bar.
For testing purposes I tried to achieve this with the regular YouTube app. With "statusBarDisabled": true, I was able to disable the status bar, so the user can not interact with it, but it is still visible.
And same goes for the navigation bar with
"persistentPreferredActivities":[
{
"receiverActivity":"com.google.android.youtube",
"actions":[
"android.intent.action.MAIN"
],
"categories":[
"android.intent.category.HOME",
"android.intent.category.DEFAULT"
]
}
]
I was able to hide the home and recents buttons, but the back button is still there and the whole navigation bar is visible.
The following image visualises the problem:
Anyone an idea how I can get rid of the status and navigation bar completely?
This is how my whole policy looks like:
import json
policy_name = enterprise_name + '/policies/policy1'
policy_json = '''
{
"safeBootDisabled": true,
"statusBarDisabled": true,
"keyguardDisabled": true,
"screenCaptureDisabled": true,
"factoryResetDisabled": true,
"cameraDisabled": true,
"blockApplicationsEnabled": true,
"systemUpdate": {
"type": "WINDOWED",
"startMinutes": 120,
"endMinutes": 240
},
"policyEnforcementRules": [{
"settingName": "persistentPreferredActivities",
"blockAction": {
"blockAfterDays": 0
},
"wipeAction": {
"wipeAfterDays": 3,
"preserveFrp": true
}
}],
"applications": [
{
"packageName": "com.google.android.youtube",
"installType": "FORCE_INSTALLED",
"lockTaskAllowed": true,
"defaultPermissionPolicy": "GRANT"
}
],
"persistentPreferredActivities": [
{
"receiverActivity": "com.google.android.youtube",
"actions": [
"android.intent.action.MAIN"
],
"categories": [
"android.intent.category.HOME",
"android.intent.category.DEFAULT"
]
}
]
}
'''
androidmanagement.enterprises().policies().patch(
name=policy_name,
body=json.loads(policy_json)
).execute()

The two bars you've highlight are actually part of the youtube app NOT part of the android OS/UI. So you can't hide those using the device management API.

Related

Microsoft Teams - Sharepoint list - Deep link to place call

I have created a sharepoint list which contains contact information (name, phone number, ...). I have set conditional formatting on the column to include a phone icon with a hyperlink (deep link) to https://teams.microsoft.com/l/call/0/0?users=4:%2B to call the phone number. So far so good ;-)
Condittional formatting applied to the column containing the phone number:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"children": [
{
"elmType": "span",
"style": {
"padding-right": "8px"
},
"txtContent": "#currentField"
},
{
"elmType": "a",
"style": {
"text-decoration": "none"
},
"attributes": {
"iconName": "=if(substring(#currentField,0,1) == '+','phone','')",
"class": "sp-field-quickActions",
"href": {
"operator": "+",
"operands": [
"https://teams.microsoft.com/l/call/0/0?users=4:",
"=replace(#currentField,'+','%2B')"
]
}
}
}
]
}
The SharePoint list is added as a tab in my Teams client and opening correctly showing all the entries but when I click the phone button the Teams client will show the "stay better connected with the Teams desktop app" window (see screenshot) instead off opening the pop-up box asking if it may call the number.
Picture showing Teams asking what client to use:
I also created a power automate flow which uses the same info to post an adaptive card to a user with a button to call the number and there everything works as expected with the same URL format.
Opening the SharePoint list as a webpage and clicking on the phone icon results in the Teams desktop client asking for permission to call the number but a webpage tab is kept open with the message "stay better connected with the Teams desktop app ..." (not clean)
Am I doing something wrong? Should this be working and have I stumbled on a bug?

JupyterLab 3.0.14 How to disable code style highlights (pycodestyle)

I just installed WPy64-3940 that comes with JupyterLab 3.0.14 .
To my surprise, now my code comes decorated with things called "pycodestyle".
As you can see below, the code is underlined in orange and a popup can appear.
I do not like that at all, it perturbs my reading.
Would you know where this comes from and how I can disable this?
Thanks
Michel
This is not a built-in feature of JupyterLab, but an extension called jupyterlab-lsp. As one of the authors I am surprised to see it included by default on the WPy64 distribution, and sorry you don't like it. Here are three potential solutions:
Ignore this specific diagnostic message (recommended). Right click to bring up context menu and select "Show diagnostics panel"; hover mouse over the row with diagnostic message that you do not like, right click, select "Ignore diagnostics like this".
Disable pycodestyle diagnostic provider completely in setting of the language server. Click on "Settings" menu (top menu bar) → "Advanced Settings Editor" and choose "Language Servers" tab. Copy paste the following settings ("pyls" is the old server, "pylsp" is the new one - only one is needed but I do not know which one you are using); you can also disable other sources of diagnostics for this language server here:
{
"language_servers": {
"pyls": {
"serverSettings": {
"pyls": {
"plugins": {
"pydocstyle": {
"enabled": false
},
"pyflakes": {
"enabled": true
},
"flake8": {
"enabled": false
}
}
},
"pylsp": {
"plugins": {
"pydocstyle": {
"enabled": false
},
"pyflakes": {
"enabled": true
},
"flake8": {
"enabled": false
}
}
}
}
}
}
}
Disable all diagnostics by going to "Diagnostics" tab and adding a catch-all regular-expression rule like this:
{
"ignoreMessagesPatterns": [".*"]
}
Disable the LSP extension altogether. It is probably best to consult whoever creates WPy64-3940 on how to do this.

Customize categories Fluxstore WooCommerce app

I am working on fluxstore WooCommerce app on Android Studio
So I want to change categories and add my own category icons.
(FROM SOURCE CODE because the Flutter inspector is taking too much time to load I waits the debuggingprocess to finish like an hour!)
go to lib/config/config_X.json (X is the language)
Under the HorizonLayout, you can change the categories and the icon; ie:
{
"category": Category ID (u can get from the url: th tagID),
"image": "the url or the path to your local icon",
"colors": [
"#00796b",
"#00796b"
],
"originalColor": false
},

Google Home app with account linking option

I'm developing a google home speaker app using DialogFlow.
My scenarios is if a user signed in then the app shows user's specific information or if a user is not signed, it should show general information.
I filled account linking section (Linking type : OAuth)
(DialogFlow -> Integrations -> Google Assistant -> MANAGE ASSISTANT APP -> Account Linking)
I also unchecked "Sign in required" in the DialogFlow's Google assistant Integration option window.
My intent code is using conv.ask(), not conv.close()
But when I run test on the simulator
It shows it is not linked and you can set account with Google Home app, after that the conversation ends.
What I want to do is even if a user has not done account linking, the user can use the app.
(user sign in should be optional, not mandatory)
Any ideas?
Thanks.
EDITED
I am using "Default Welcome Intent" with "Enable webhook call for this intent" checked.
My Intent looks like this. It worked well before setting account Linking.
app.intent('Default Welcome Intent', conv => {
conv.ask('Welcome');
});
and my screenshot.
Screenshot of Actions on Google simulator
(sorry for none-English text in the screenshot. It tells it needs account linking and terminated the conversation. )
Here is the log message in Actions on Google simulator's debug tab.
{
"request": {
"response": "テスト用アプリ とリンクしていません。Google Home アプリからテスト用アプリ と Google アカウントをリンクできます。",
"expectUserResponse": false,
"conversationToken": "GidzaW11bG...",
...
"debugInfo": {
"sharedDebugInfoList": [
{
"name": "Account Linking Url",
"debugInfo": "https://gala-demo.appspot.com/app?login_hint=..." // removed sensitive information from the string
"subDebugEntryList": []
}
]
},
"visualResponse": {
"visualElementsList": [],
"suggestionsList": [],
"agentLogoUrl": ""
},
"clientError": 0,
"is3pResponse": 1
},
"response": {
"response": "テスト用アプリ とリンクしていません。Google Home アプリからテスト用アプリ と Google アカウントをリンクできます。",
"expectUserResponse": false,
"conversationToken": "GidzaW11bG...",
"visualResponse": {
"visualElementsList": [],
"suggestionsList": [],
"agentLogoUrl": ""
},
"clientError": 0,
"is3pResponse": 1
},
"debug": {
"sharedDebugInfoList": [
{
"name": "Account Linking Url",
"debugInfo": "https://gala-demo.appspot.com/app?login_hint=...", // removed sensitive information from the string
"subDebugEntryList": []
}
]
},
"errors": []
}
I found that when I run a simulator from integration menu in DialogFlow,
The simulator starts with old version which I set Sign-In Required.
And when I run a simulator from the Actions on Google TEST section, it starts with current setting (Sign-In Not Required).
You can check version from the simulator screen

Drupal 7 Search Autocomplete module never loads "suggestions"

I am attempting to use the module Search Autocomplete 7.x-4.0-alpha2.
I have added a form in the "search_autocomplete" configuration section.
It is enabled.
I created a view that returns taxonomy in json format.
Here is an example of the json output from the json view
[{
"value": "aquaculture",
"fields": {
"name_i18n": "aquaculture"
},
"group": {
"group_id": "aquaculture",
"group_name": "aquaculture"
}
}, {
"value": "climate change",
"fields": {
"name_i18n": "climate change"
},
"group": {
"group_id": "climatechange",
"group_name": "climate change"
}
}, {
"value": "coastal development",
"fields": {
"name_i18n": "coastal development"
},
"group": {
"group_id": "coastaldevelopment",
"group_name": "coastal development"
}
}, {
"value": "deforestation",
"fields": {
"name_i18n": "deforestation"
},
"group": {
"group_id": "deforestation",
"group_name": "deforestation"
}
}, {
"value": "extinction",
"fields": {
"name_i18n": "extinction"
},
"group": {
"group_id": "extinction",
"group_name": "extinction"
}
}]
I set the Suggestion Source to be the view. I used the autocomplete feature of it so I know that my "search autocomplete" suggestion source is configured right. The id selector of a form in a different view (not the json taxonomy one) is used. The permissions for the module are correct.
Now, when I load my view that has the search api form I see a little blue circle icon that is circling to the right of the search api form field. It is circling the whole time and no suggestions are ever populated in the search text box.
I know I have the right form configured because if I set a different form id for the "searchautocomplete" configuration and reload the view page, the circling blue circle is missing.
Does anyone have any idea what might be wrong?
UPDATE: I was going to my modules page and saw this error (i wasn't changing anything on the modules page, just going there) and saw the error on the top of the modules page regarding the Search Autocomplete module
Update: I changed the Search Autocomplete configuration section to not point to my json view but point to an outside url, http://google.com. Of course this is not a valid json endpoint, but I wanted to see if I could see it at least attempt to get it's json data from google.com. Watching through firebug has shown that it doesn't even attempt to go to google.com for it's json data. I think something similar is happening with my json views (it's just not even going there for the data).
That was probably due to a bug in the alpha-version? When you configure the JSON Endpoint by using the Views UI, you should see a list of items in the "preview"-section underneath. The items that are listed there should be the ones that appear as suggestions in the search.

Resources