Mark M. | has entered the room |
Mark M. | turned on guest access |
Apr 4 | 7:45 PM |
Ruairi M. | has entered the room |
Ruairi M. |
cHi Mark
|
Mark M. |
hello, Ruairi!
|
Mark M. |
how can I help you today?
|
Ruairi M. |
View paste
|
Mark M. |
you need the permissions in the manifest in all Android versions
|
Ruairi M. |
Yeah
|
Mark M. |
on Android 6.0 and higher, you *also* need the runtime permission support
|
Mark M. |
so, I do not understand your question
|
Mark M. |
if you use ContextCompat.checkSelfPermission(), it will "do the right thing" for all Android versions
|
Mark M. |
so your Java code is the same for old and new
|
Mark M. |
since your manifest is already the same for old and new... I am not certain what you need that is different
|
Apr 4 | 7:50 PM |
Ruairi M. |
Basically
|
Ruairi M. |
The app will not install on an emulator when built from Android studio on api images < marshmallow
|
Ruairi M. |
Security exception in logcat
|
Mark M. |
usually, a SecurityException occurs at runtime, not when the app is installed
|
Ruairi M. |
But it works as expected on api images >= marshmallow
|
Mark M. |
what exactly is the exception that you are seeing?
|
Ruairi M. |
2 secs...I will run it
|
Ruairi M. |
api 19
|
Ruairi M. |
View paste
|
Ruairi M. |
View paste
|
Mark M. |
is com.thenational your app?
|
Ruairi M. |
Ye
|
Mark M. |
this, however, is not a crash
|
Apr 4 | 7:55 PM |
Ruairi M. |
There is no crash
|
Mark M. |
then, I am uncertain what the problem is
|
Ruairi M. |
just wont install
|
Ruairi M. |
Because permissions have not been granted
|
Mark M. |
there is nothing in those messages that have anything to do with permissions
|
Mark M. |
how are you determining that the app is not installing, and how are you determining that it has something to do with permissions?
|
Ruairi M. | |
Mark M. |
that question, and my answer, are for an installed app
|
Mark M. |
that app crashed at runtime
|
Mark M. |
and it resulted in the stack trace shown in the question
|
Ruairi M. |
The log I posted is similar to the issue in the stackoverflow issue - so I assumed was the same
|
Mark M. |
the VFY messages are saying that your code is referencing android.security.keystore.KeyGenParameterSpec.Builder, and that class does not exist on API Level 19
|
Mark M. |
so long as you do not execute any statements that refer to that class, though, you are still OK
|
Mark M. |
so, I'm back to my earlier questions: how are you determining that the app is not installing, and how are you determining that it has something to do with permissions?
|
Apr 4 | 8:00 PM |
Ruairi M. |
Well... i have just noticed that the app icon is appearing in the app drawer - so, yeah it is installing - but the app does not start - device just sits on home screen
|
Ruairi M. |
no visual indication that it has installed - no start etc
|
Mark M. |
OK, when you tap your app's launcher icon, does a stack trace now show up in LogCat?
|
Mark M. |
indicating a crash in your app?
|
Ruairi M. |
No
|
Ruairi M. |
View paste
|
Mark M. |
OK, it looks like it thinks that it started your activity
|
Ruairi M. |
i have tried a fresh avd image, tried api level 19, 21 --> same result
|
Ruairi M. |
works perfectly for marshmallow
|
Mark M. |
if you run your app in the debugger, does you acrivity's onCreate() method get called?
|
Mark M. |
(er, that should be "activity's")
|
Apr 4 | 8:05 PM |
Ruairi M. |
The EntryActivity?
|
Ruairi M. |
I will try
|
Ruairi M. |
Doesnt hit the breakpoint - nothing in log either
|
Ruairi M. |
Strange
|
Mark M. |
I'm not sure what to tell you
|
Ruairi M. |
Only code added was permission request
|
Ruairi M. |
Ok... it's a tricky one
|
Ruairi M. |
So...basic checklist
|
Ruairi M. |
Permissions <use-permission xxx /> AND <use-permission v23 xx/>
|
Mark M. |
for the same permission?
|
Ruairi M. |
Yeah?
|
Ruairi M. |
View paste
|
Mark M. |
that is not necessary and may be causing problems
|
Mark M. |
use one or the other
|
Mark M. |
those are separate permissions
|
Mark M. |
I meant, are you using <uses-permission> and <uses-permission-sdk23> for the same permission?
|
Ruairi M. |
No
|
Mark M. |
OK
|
Ruairi M. |
At present - these are the only permissions being declared
|
Ruairi M. |
View paste
|
Mark M. |
OK, nothing unusual there
|
Ruairi M. |
It's fine - I will keep googling - thanks for your time Mark
|
Apr 4 | 8:10 PM |
Mark M. |
sorry that I did not have a quick fix for you!
|
Ruairi M. |
Many thanks
|
Ruairi M. |
One other thing - have you any released any materials/resources on dagger-android specifically
|
Mark M. |
no, sorry
|
Ruairi M. |
Ok
|
Ruairi M. |
Thanks mate
|
Ruairi M. |
Bye Mark - keep up the good work!
|
Ruairi M. |
*great
|
Mark M. |
thanks!
|
Apr 4 | 8:30 PM |
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 tomorrow at 4pm US Eastern
|
Mark M. |
have a pleasant day!
|
Ruairi M. | has left the room |
Mark M. | turned off guest access |