android-5.0-lollipop

Hostname does not match in Lollipop devices but works fine in Postman and marshmallow devices

◇◆丶佛笑我妖孽 提交于 2019-12-25 18:13:31
问题 Recently SSL certificates were added to the server, so I have changed the url in android from http://appname.com to https://www.appname.com , this works fine on marshmallow devices and Postman, but on Lollipop devices throws javax.net.ssl.SSLException: hostname in certificate didn't match: www.appname.com != www.companyname.com OR www.companyname.com OR companyname.com I have tried adding the companyname.com in setHostnameVerifier but it did not help. here is the code: HashMap<String, String>

Navigation Drawer below Tool bar in Material Design [duplicate]

送分小仙女□ 提交于 2019-12-25 16:25:19
问题 This question already has answers here : How do I make DrawerLayout to display below the Toolbar? (6 answers) Closed 3 years ago . I want my drawer to open from the left below the tool bar. But, according to Material Design aspects that's not good. But still I want to do that. Here I have changed my XML file. ---Relative Layout -----Tool bar -----Drawer -------container -------drawer List here is my XML file. My app crashes when it opens. I don't know where I made a mistake and XML doesn't

open a sqlite database when choosing folder with ACTION_OPEN_DOCUMENT_TREE

寵の児 提交于 2019-12-25 14:09:45
问题 I have an already existing sqlite database in a folder /sdcard/myfolder/db/mydb.db . My app shows a dialog to choose a folder: Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE); startActivityForResult(intent, 42); The Dialog pops up and I can choose the folder: I choose the folder /sdcard/myfolder/db/ and press choose/ok. My onActivityResult gets called. I go through all files and if the file is my "mydb.db" then I try to open the sqlite database with SQLiteDatabase.openDatabase();

Youtube integration in android does not work in Lollipop

假如想象 提交于 2019-12-25 09:59:48
问题 I have embedded youtube API to play videos in an android app. It works completely fine in kitkat , Jellybean. But in lollipop devices as soon as click on play button the app crashes. The code is as follows. I have used 1.2.2 version of YOUTUBEPLAYER API. Link to myLogcat http://pastebin.com/jT26G7sk public class YoutubeVideo extends YouTubeBaseActivity implements YouTubePlayer.OnInitializedListener { private static final int RECOVERY_DIALOG_REQUEST = 1; // YouTube player view private

Youtube integration in android does not work in Lollipop

家住魔仙堡 提交于 2019-12-25 09:59:34
问题 I have embedded youtube API to play videos in an android app. It works completely fine in kitkat , Jellybean. But in lollipop devices as soon as click on play button the app crashes. The code is as follows. I have used 1.2.2 version of YOUTUBEPLAYER API. Link to myLogcat http://pastebin.com/jT26G7sk public class YoutubeVideo extends YouTubeBaseActivity implements YouTubePlayer.OnInitializedListener { private static final int RECOVERY_DIALOG_REQUEST = 1; // YouTube player view private

Call third party app Activity from own App

隐身守侯 提交于 2019-12-25 08:42:50
问题 I have successfully called third party apps from my app Apps like: Google Drive and Google Photos Code: btnL1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { openApp(KioskActivity.this, "com.google.android.apps.docs"); } }); btnL2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { openApp(KioskActivity.this, "com.google.android.apps.photos"); } }); public static boolean openApp(Context context, String

Cant change colorButtonNormal value to all buttons

倖福魔咒の 提交于 2019-12-25 04:11:52
问题 I am trying to make all buttons in my app have default color using colorButtonNormal in my style. It works nice on API 21 and above but under API 21 it only changes the background of some buttons and i dont know what is going wrong. styles.xml <resources xmlns:tools="http://schemas.android.com/tools"> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:windowContentOverlay">@null</item> <item name="android:textColorPrimary">@color/white</item> <item name=

NullPointerException at RecycleView

谁说胖子不能爱 提交于 2019-12-25 03:46:05
问题 i've been trying to use the TwoWay lib for a horizonal listview implemention, so i got the RecycleView lib and the TwoWay, but at both run time and the xml i receive this Exception : 09-21 01:46:52.148: E/AndroidRuntime(12471): FATAL EXCEPTION: main 09-21 01:46:52.148: E/AndroidRuntime(12471): java.lang.NullPointerException 09-21 01:46:52.148: E/AndroidRuntime(12471): at com.lifemate.lmmessenger.recycleview.RecyclerView.onMeasure(RecyclerView.java:1346) 09-21 01:46:52.148: E/AndroidRuntime

NullPointerException at RecycleView

时间秒杀一切 提交于 2019-12-25 03:46:03
问题 i've been trying to use the TwoWay lib for a horizonal listview implemention, so i got the RecycleView lib and the TwoWay, but at both run time and the xml i receive this Exception : 09-21 01:46:52.148: E/AndroidRuntime(12471): FATAL EXCEPTION: main 09-21 01:46:52.148: E/AndroidRuntime(12471): java.lang.NullPointerException 09-21 01:46:52.148: E/AndroidRuntime(12471): at com.lifemate.lmmessenger.recycleview.RecyclerView.onMeasure(RecyclerView.java:1346) 09-21 01:46:52.148: E/AndroidRuntime

android - Change Hamburger/Back icons color programaticaly during runtime

我与影子孤独终老i 提交于 2019-12-24 17:07:22
问题 I'm trying to change the style attribute "colorControlNormal" of my app programmaticaly and during runtime, but I didn't have any results. This property is the color that will tint the hamburger & back icons of the new Toolbar viewGroup. Beside, I'm using the v7 compatibility library. I heard that we cannot change app theme during runtime, but I'm looking for an answer, even if it's not so clean way. Thank you so much ! Edit : I juste figured that gmail is doing what i want, when you click on