Feb 11 | 8:55 AM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Feb 11 | 9:05 AM |
Jamshaid A. | has entered the room |
Mark M. |
hello, Jamshaid!
|
Mark M. |
how can I help you today?
|
Jamshaid A. |
hello
|
Jamshaid A. |
i wanted to ask you regarding schedullling time on and off for android.
|
Jamshaid A. |
is it possible i came across an android tablet that has this setting
|
Jamshaid A. |
u can set a fix time for turning on the tablet and a fix time to turn the tablet off
|
Jamshaid A. |
but i looked around alarmmanager is it possible do something like this , if ever u came across i was wondering i ask
|
Mark M. |
you cannot turn a device on or off from an ordinary Android SDK app
|
Mark M. |
you cannot hold the permissions to do this
|
Mark M. |
and, if the device is truly powered off, it cannot be powered on automatically, any more than it could if the battery were removed
|
Feb 11 | 9:10 AM |
Jamshaid A. |
is there a way i can find a list of system permissions across android
|
Jamshaid A. |
as i work on a system app i was wondering if its possible
|
Mark M. |
if by "system permissions", you mean permissions with a protectionLevel of "system", the best place is in the manifest for the version of Android that you are working on
|
Mark M. | |
Mark M. |
that links to the master branch of the manifest defining permissions
|
Mark M. |
you might want to choose a different tag to constrain to the particular version of Android your app ships on
|
Jamshaid A. |
i use android 4.4 , and shareuserid= system n the app is signed with system signature
|
Jamshaid A. |
is it the same as protectionlevel system
|
Jamshaid A. |
and could you point me where i could learn more about the security architecture n the permission system of android
|
Mark M. |
there is a separate protectionLevel for "signature"
|
Mark M. |
though you will find some permissions with a protectionLevel of "signature|system", at least on Android 5.1 and below
|
Feb 11 | 9:15 AM |
Mark M. |
I do not know how sharedUserId affects permissions, as that's not used much outside of scenarios like yours, so I have no real experience with it
|
Jamshaid A. |
have u come across documentation where i could learn more about this
|
Mark M. |
you might try books on Android internals
|
Mark M. | |
Mark M. |
Karim Yaghmour's book might get into it
|
Jamshaid A. |
thanks i will check it out :)
|
Jamshaid A. |
i m going through how the content provider abstraction works in android in general .Though i still have to go through your chapter of content provider.now the oppertunity si there so i was wondering
|
Jamshaid A. |
do u think is the best approach to share data with toher apps
|
Feb 11 | 9:20 AM |
Mark M. |
that depends on the structure of the data
|
Mark M. |
if the data looks like database entries (rows and columns), or the data looks like a stream of bytes, then yes
|
Jamshaid A. |
more like rows and colums
|
Mark M. |
then a ContentProvider is probably a good choice
|
Mark M. |
you could attempt to offer an API through an AIDL-defined service binding
|
Mark M. |
on the plus side, you get a lot more control over exactly the structure of what gets published to other apps
|
Mark M. |
however, it is more work, both for the client side and the service side
|
Jamshaid A. |
for now we just add some hardware to android tablet over bluetooth .so instead of home app replace the launcher app with ours
|
Jamshaid A. |
n have our own update system no google
|
Jamshaid A. |
so i figured one can have a launcher app that makes sure all the connected harware is working over belutooth or wifi
|
Jamshaid A. |
n then have a seperate user app that gets launched
|
Jamshaid A. |
n regsiter to events to the launcher app
|
Feb 11 | 9:25 AM |
Jamshaid A. |
so there is no invovlement of someone else developing for the launcher app.so i guess great control over the structure of published to other apps is not really required as we build the system n dont include third party
|
Mark M. |
while we typically use "third-party" to refer to other firms, in a large organization, "third-party" might refer to other teams within the same firm
|
Jamshaid A. |
thanks for the correction in this context i meant outside the firm.And considering its a small team i didnt think but like you shared it might be good decision for future
|
Mark M. |
while you may have greater opportunities for coordination with those teams (e.g., permissions), you still may wish to think in terms of APIs and contracts for how apps from one team interact with apps from another team
|
Jamshaid A. |
if i understand correctly
|
Mark M. |
yes, in that case, use whatever makes you comfortable, on the whole
|
Jamshaid A. |
by the way to your knowledge how could something like powering on a device at schedulled time be even possible...
|
Jamshaid A. |
is there a system clock one can register with n that invokes and starts up the system
|
Mark M. |
again, technically, that's not possible
|
Mark M. |
you might be able to move a device from a very deep sleep into an "on" state
|
Mark M. |
but to me, "off" is no different than if the battery were removed
|
Mark M. |
and you cannot go automatically from "off" to "on"
|
Mark M. |
beyond that, none of this is possible at the Android SDK level, though I am sure there are options for this in custom firmware
|
Mark M. |
however, that is beyond my areas of expertise
|
Feb 11 | 9:30 AM |
Jamshaid A. |
i have asked the OEM who put the app inside the tablet ..its in the settings panel.. i will inquire with them
|
Jamshaid A. |
another thing apart from the google IO app
|
Jamshaid A. |
which other opensource apps you think are a good idea to look over for general apps design ?
|
Jamshaid A. |
good design i mean
|
Mark M. |
sorry, but I do not have any recommendations to make in that area
|
Jamshaid A. |
another long shot and the last inquiry i saw your talk on having plugins
|
Jamshaid A. |
but then i havent gone through dashclock source code yet .but what i was wondering about if it were possible to add UI elements for instance ... the navigation drawer where a new plugin once added is shown in the navigation drawerlist
|
Mark M. |
having an entry in a navigation drawer based on plugins is certainly possible
|
Jamshaid A. |
i hope i make sense with my inquiry do i ?
|
Mark M. |
the key is that you cannot readily blend UIs from multiple apps together
|
Mark M. |
to put it in Web terms, there is no <iframe> equivalent in Android, to allow you to embed another app's UI in your own
|
Mark M. |
that means that tapping on the navigation drawer entry could lead to an activity supplied by a plugin, but you are jumping to a completely different activity
|
Feb 11 | 9:35 AM |
Mark M. |
whereas for other entries in your navigation drawer, perhaps you are swapping around fragments
|
Feb 11 | 9:35 AM |
Mark M. |
so, getting a consistent UI flow may be difficult
|
Jamshaid A. |
so adding fragments would not be possible as plugins ?
|
Mark M. |
correct
|
Mark M. |
you cannot pass a fragment through any sort of IPC mechanism
|
Mark M. |
while the host app could load resources from the plugin, it cannot readily load code from the plugin
|
Mark M. |
now, in your particular case, because you have complete control over your environment, you may have more options
|
Mark M. |
I tend to write for ordinary Android SDK app developers, not developers working on custom firmware or hardware
|
Mark M. |
and I have not thought about plugins in your sort of situation
|
Jamshaid A. |
tahnks but u helped alot.I was just thinking that rather then updating the app make one app with navigation drawer.as different customers from us want different services.they can use those services as plugings .But still have a consistent simple UI which i can control
|
Jamshaid A. |
how its designed. the idea is to have dedicated simple consistent experience but only those services are installed as plugins based on user choice.navigation drawer seemed like a simple UI for this purpose
|
Feb 11 | 9:40 AM |
Jamshaid A. |
as i figured developing now with limited resources a navigation system might get complex n confusing as ppl have familiary with navigation drawer
|
Mark M. |
you are certainly welcome to experiment with it
|
Jamshaid A. |
thanks i wil.i guess thats all i have to ask for today.i will get the book n go over it.Have a goodday greetings from germany
|
Mark M. |
OK, have a pleasant day!
|
Jamshaid A. | has left the room |
Feb 11 | 9:45 AM |
Nikhil | has entered the room |
Nikhil |
Hello Mark sir
|
Mark M. |
hello, Nikhil!
|
Mark M. |
how can I help you today?
|
Nikhil |
Quick question - If I change minsdkverion in Gradle file only and not in manifest will it work ?
|
Mark M. |
yes
|
Mark M. |
for values that can exist in both places, the value in Gradle will be used, overriding what is in the manifest
|
Mark M. |
now, you might get a build error, if your minSdkVersion is lower than one requested by
|
Mark M. |
er, requested by a library
|
Nikhil |
ok
|
Feb 11 | 9:50 AM |
Nikhil |
and I am on ActiobarNative chapter, in that it I started a new project and by default AppCompact is extended . Do I have to remove Appcompact from root to work with ActionBArnative
|
Mark M. |
you would need to have your activity not inherit from AppCompatActivity
|
Mark M. |
and you would need to have that activity's theme in the manifest not inherit from Theme.AppCompat
|
Mark M. |
and, if you have an existing menu resource (e.g., set up by a new-project wizard), things like app:showAsAction would change to android:showAsAction
|
Nikhil |
ok thanks
|
Mark M. |
at that point, you should be able to remove the appcompat-v7 dependency from your build.gradle file
|
Nikhil |
yes I did all that , had to confirm from you that all that is necessary
|
Nikhil |
thank you
|
Nikhil |
that's all from my side
|
Mark M. |
OK
|
Feb 11 | 10:00 AM |
Mark M. |
that's a wrap for today's chat
|
Mark M. |
the transcript will be posted to https://commonsware.com/office-hours/ shortly
|
Mark M. |
the next chat is Tuesday, at 9am US Eastern
|
Mark M. |
have a pleasant day!
|
Nikhil | has left the room |
Mark M. | turned off guest access |