Office Hours Transcript: 2021-05-29

Kafran joined

Hello professor =)

hello, Kafran!

 

how can I help you today?

I don’t have too much to ask yet. I just started reading the Exploring Android. I’m here only to say hello =) and nice to meet you.

nice to meet you as well!

relaxed_soul joined

hello!

hello, relaxed_soul! how can I help you today?

Can you help me to understand the capabilities of the Administrator role in Android 11?

sorry, but I am uncertain what you are referring to specifically

 

if you are referring to a device administrator app, that is not new to Android 11

Can I manage somehow the enabled or hidden apps if my app gets Administrator permission?

AFAIK, Android does not have a concept of disabled or hidden apps

I am interested on the administrator capabilities in the Android 11, I understand that is old

Android 11 is the current production version of Android

 

a device administrator app has control over some policies: https://developer.android.com/guide/topics/admin/device-admin?hl=en#policies

 

however "enabled or hidden apps" are not among them

 

so, AFAIK, what you are seeking is not available in standard Android

Professor, I’m a little confuse about the Data Biding, this is a process which seems to have changed a lot in the past years. We had the findViewById() and now we have the ViewBinding, and also Jetpack Compose is coming… is Compose related to ViewBinding as well? And, between findViewById() and ViewBinding, which one should I use?

is Compose related to ViewBinding as well?

 

sorry, let me try that again…

Android 11 => Latest SDK :) I mean SDK 30 :)

is Compose related to ViewBinding as well?

Jetpack Compose is a totally separate UI system, unrelated to views, let alone view binding

 

between findViewById() and ViewBinding, which one should I use?

I recommend view binding, as it is easier to avoid certain types of bugs than is using findViewById() directly

 

relaxed_soul: again, sorry, AFAIK what you are seeking is not part of Android, at is not part of Android device administration

Is it possible to not touch findViewById these days? Or do I need to use it in certain circumstances?

there may be some spots that you find it to be more convenient to use findViewById(), but most of the time, it should not be necessary

So, there is no access to apps management if you have Administrator rights?

 

Is there another way to manage apps on the device? its visibility in the Launcher and on the home screen?

AFAIK, device administrator apps have no control over that sort of thing. Device owner apps might, but that is a very specialized area and requires very special installation processes at the time the phone is taken out of the box.

Is there another way to manage apps on the device? its visibility in the Launcher and on the home screen?

Write a launcher! Otherwise, no.

@Mark_Murphy Thanks. I will keep showing in these office hours as I advance through the book. See you next week =)

sounds good!

We have an app that controls the activity of the user. Of cause with their permission :) It works fine right now, but there is a problem with uninstallation of our app. If the user decides to uninstall the app, even if it is device administrator, it is still quite simple. One more step in uninstalling, but still the same.

 

many people complain in the feedback, that they are ready to provide Device Administrator permission to the app. Like it can significantly change something.

 

So, after investigation, I came up to the fact, that Device Admin doesn’t actually change a lot. We can wipe device data, yes… but it is not what we would to get access to :) also we can manage blocking of the screen, which is… bad way to block specific content only. And access to password change also is useless for us

 

I have no idea how Admin Rights can change the game for us.

Of cause with their permission :)

You smile, but "controls the activity of the user" is what ransomware does. The general objective of the developers of Android is to avoid ransomware scenarios. If you want to implement some sort of parental controls, the expectation is that you would build your own firmware.

own firmware = own launcher or own OS?

own OS (fork of Android)

We don’t block the screen. We close the apps user tries to open, if the session is active. The list of apps and websites are selected by the user. And actually if they will just send a request to the support - the session would be canceled.

 

I can reach the goal with the launcher instead.
It is quite a huge thing to uninstall for a Facebook serf…
And Launcher manages what apps should be shown in the list. So, the app is not hidden and can be opened by the link (deeplinks I mean), but that part can be blocked in other ways. So, launcher is enough in this case.

 

Changing the subject :)
Mark, do you have experience developing Flutter apps?

no – while I keep light tabs on Flutter, I have not written anything using it

The same for Kotlin native?

I keep somewhat closer eye on Kotlin/Multiplatform

 

however, I do next to nothing for iOS, so I have not yet had a need to dive into Kotlin/Native

 

my KMP interests lie more in the Android + desktop area

I was at Conference few days ago, studying Flutter testing, listening about KMM future from one of the developers there and getting some info about how Instagram and other Facebook inc apps are made

 

Flutter testing is simple but doesn’t cover the most painful for me part - the stability of the plugins imported.
Got also some details how should the structure of the project look like.

 

About KMP - they will never try to cover UI part. I mean - there would be no way to write one code for UI of several platforms. Also, they are focusing now only on Kotlin Multiplatform Mobile, as it is the most popular field to write single app for 2 platforms.

well, JetBrains is investing a fair bit into Compose, in the form of Compose for Desktop and Compose for Web

At least when I asked Speaker if they are planing in any future to work on UI part - nothing.

I am skeptical that they will do a Compose for iOS, but my understanding is that the Kotlin/Native bits that Compose needs just landed, so it is not completely out of the question

 

personally, I like the philosophy of doing native UIs for Android and iOS, with the latter presumably being done in SwiftUI

Do you have experience with SwiftUI?

not personally, though I know that it fills the same general space for iOS that Jetpack Compose does for Android

So, there is a possibility that we still need to write several times UI but it would be almost the same syntax?

"same syntax" is probably pushing it :-)

 

I would go with "same style"

yep, I mean style :)

so, you would write the iOS UI in SwiftUI, the Android UI in Jetpack Compose, and share the rest

 

and, if you wanted to tackle the desktop, Compose for Desktop is a relatively easy add-on from there

I am going to develop few similar apps for account management in the system. And it looks simpler to develop it with Flutter, because the UI part shouldn’t be stylish and magic. Simple and Functional mean that I don’t need special customization, and Flutter approach to UI building is great here.

Flutter, React Native, and similar solutions should be fine in lots of situations

Also, Flutter supports now Web already, and they started to work on Desktop versions as well. May be in the next year we will have 5 platforms made from the same code base.

 

Going back to hard question… To set a point here:
There is no way to manage access to the apps for the user with any permission granted after the first launch of the device?

 

… my sentences are hard. Sorry. :)

none that I am aware of, outside of perhaps the device owner APIs… and device owner apps are not consumer apps

 

the device owner system is designed for enterprise MDM systems (mobile device management), where you get your phone from the IT department

Yep. read about it earlier. not an option for me.

 

I am interested if there is Parential Control permission :)

not in standard Android

parent control role

it’s very possible that some device manufacturers offer proprietary APIs in this area

Samsung does. But it is special enterprise settings, also not an option.

 

I will research parent control apps in the store then, maybe their UX would highlight anything.

 

Ok, thank you for your attention and help :) I hope next time I will come with something more close to life :)

I am happy to help!

 

OK, that is a wrap for today’s chat. The transcript will be posted to https://commonsware.com/office-hours/ shortly. The next chat is Tuesday in the 8:30am US Eastern slot.

 

have a pleasant day!

you too!

relaxed_soul left