id
int64
28.5M
73.8M
title
stringlengths
15
150
question_body
stringlengths
69
39.4k
body_text
stringlengths
6
29.2k
tags
stringlengths
7
120
score
int64
-19
384
creation_date
stringlengths
20
24
year
int64
-1
2.02k
month
int64
-1
12
hour
int64
-1
23
dayofweek
int64
-1
6
view_count
int64
3
367k
answer_count
int64
0
34
body_len
int64
6
29.2k
title_len
int64
15
150
tag_count
int64
1
6
code_block_cnt
int64
0
17
has_code
bool
2 classes
is_unanswered
bool
2 classes
is_popular
bool
2 classes
is_viral
bool
2 classes
is_highly_voted
bool
2 classes
is_negative
bool
2 classes
score_bucket
stringclasses
5 values
60,117,589
Is there a way to turn on and off the flashlight of front camera?
<p>I googled to find front flash light to use as a torch but I am not able to find any answer. Is there a way or not if so ? How to ?</p>
I googled to find front flash light to use as a torch but I am not able to find any answer. Is there a way or not if so ? How to ?
java|android|flashlight
2
2020-02-07T16:37:14.337Z
2,020
2
16
4
129
1
130
65
3
0
false
false
false
false
false
false
low
60,117,720
Android remove navigation bar divider
<p>Is it possible to remove navigation bar divider? On android emulator there is no this divider, on xiaomi divices it appears. Using <code>window.setNavigationBarDividerColor(getColor(R.color.white))</code> does not solves problem.</p> <p><a href="https://i.stack.imgur.com/Ajty2.png" rel="nofollow noreferrer"><img sr...
Is it possible to remove navigation bar divider? On android emulator there is no this divider, on xiaomi divices it appears. Using window.setNavigationBarDividerColor(getColor(R.color.white)) does not solves problem.
android
2
2020-02-07T16:45:47.260Z
2,020
2
16
4
194
0
216
37
1
0
false
true
false
false
false
false
low
60,117,731
How do I open 'Google Settings' of an Android device programatically?
<p>I want to access 'Google Settings' in Android programatically, is there any way I can do that using Intent? </p> <p><code>"com.google.android.gms.location.settings.GOOGLE_LOCATION_SETTINGS"</code> didn't work using Intent.</p>
I want to access 'Google Settings' in Android programatically, is there any way I can do that using Intent? "com.google.android.gms.location.settings.GOOGLE_LOCATION_SETTINGS" didn't work using Intent.
android|flutter|android-intent|google-settings
1
2020-02-07T16:46:41.397Z
2,020
2
16
4
107
0
201
69
4
0
false
true
false
false
false
false
low
60,117,855
How to correctly scale custom thumb for a switch widget?
<p>I've a custom thumb set from a drawable for a <code>Switch</code> widget inside a <code>LinearLayout</code>. I can't get it to show correctly on all kinds of screens. On most screens, it looks like this-</p> <p><a href="https://i.stack.imgur.com/SvZYn.png" rel="noreferrer"><img src="https://i.stack.imgur.com/SvZYn....
I've a custom thumb set from a drawable for a Switch widget inside a LinearLayout . I can't get it to show correctly on all kinds of screens. On most screens, it looks like this- Which is fine, but on some screens (example - 440 dpi), it'd look like this- How do I get this to look uniform across all screens? I've tried...
android|xml|android-layout
5
2020-02-07T16:55:19.567Z
2,020
2
16
4
734
2
848
56
3
3
true
false
false
false
false
false
low
60,117,857
how to enable button if 2 edit text is fill?
<p>how to enable button if 2 edit text is fill use <code>'androidx.core:core-ktx:1.1.0'</code>?</p> <pre><code>override fun onActivityCreated(savedInstanceState: Bundle?) { super.onActivityCreated(savedInstanceState) editTextEmailOrPhone.doOnTextChanged { emailOrPhone, _, _, _ -&gt; if (isV...
how to enable button if 2 edit text is fill use 'androidx.core:core-ktx:1.1.0' ? [CODE] i've try. if i fill email (button is enable) <== look good but, if i delete email (button not disable) <== issue
android|textwatcher|android-textwatcher|android-ktx
0
2020-02-07T16:55:22.637Z
2,020
2
16
4
83
1
200
44
4
1
true
false
false
false
false
false
zero
60,117,960
How can ı retrieve data from sqlite and foreign key
<p>I have been stuck on foreign key problem , as normally I can retrieve data but I can't retrieve data with foreign key.</p> <p>DB.Helper</p> <pre><code> public static final String TBL_NAME="users"; public static final String COL_ID="id"; public static final String COL_NAME="name"; public static final St...
I have been stuck on foreign key problem , as normally I can retrieve data but I can't retrieve data with foreign key. DB.Helper [CODE] ViewActivity [CODE] So please help me how can I view only users task not all users tasks.
java|android|sqlite|foreign-keys|android-sqlite
0
2020-02-07T17:01:40.917Z
2,020
2
17
4
81
2
225
51
5
2
true
false
false
false
false
false
zero
60,118,072
Coroutines, async DiffUtil and Inconsistency detected error
<p>I'm having trouble putting up together Kotlin Flows and async DiffUtil.</p> <p>I have this function in my RecyclerView.Adapter that computes on a computation thread a DiffUtil and dispatch updates to the RecyclerView on the Main thread :</p> <pre><code>suspend fun updateDataset(newDataset: List&lt;Item&gt;) = with...
I'm having trouble putting up together Kotlin Flows and async DiffUtil. I have this function in my RecyclerView.Adapter that computes on a computation thread a DiffUtil and dispatch updates to the RecyclerView on the Main thread : [CODE] I call this function from my Fragment like this : [CODE] updateConversationsList()...
android|kotlin|android-recyclerview|kotlin-coroutines|android-diffutils
6
2020-02-07T17:09:16.807Z
2,020
2
17
4
1,638
1
1,035
59
5
3
true
false
false
false
false
false
medium
60,118,083
Is it possible to show Recyclerview from two lists of different types?
<p>Android Studio 3.6 </p> <p>To show list on screen (Activity) I use <code>androidx.recyclerview.widget.RecyclerView</code> and <code>androidx.recyclerview.widget.RecyclerView.</code></p> <p>Nice it's work fine.</p> <p>But now I need to show two <strong>different</strong> lists (different type of items) in one scr...
Android Studio 3.6 To show list on screen (Activity) I use androidx.recyclerview.widget.RecyclerView and androidx.recyclerview.widget.RecyclerView. Nice it's work fine. But now I need to show two different lists (different type of items) in one screen. And scroll this both lists as one list. The elements of these two l...
android|android-recyclerview
1
2020-02-07T17:09:45.370Z
2,020
2
17
4
152
2
435
70
2
1
true
false
false
false
false
false
low
60,118,182
Socket.IO clients disconnect randomly
<p>We have a turn based card game and has 10K active users daily. We are using socket.io with node.js. But our users are getting too much disconnect which have short time(About one second or two seconds). Our server ping interval is 3000ms, pingTimeout is 12000ms. At the client timeout is 20000ms as default. Our client...
We have a turn based card game and has 10K active users daily. We are using socket.io with node.js. But our users are getting too much disconnect which have short time(About one second or two seconds). Our server ping interval is 3000ms, pingTimeout is 12000ms. At the client timeout is 20000ms as default. Our clients a...
android|node.js|sockets|socket.io
0
2020-02-07T17:17:34.037Z
2,020
2
17
4
61
0
413
37
4
0
false
true
false
false
false
false
zero
60,118,259
Facing this java.lang.IllegalStateException: Bundle length is not aligned by 4: 9 in Model class which implements Parcelable
<pre><code>public class Profile implements Parcelable { @SerializedName("profileName") private String profileName; @SerializedName("paused") private boolean isPaused; @SerializedName("numberOfDevices") private int numberOfDevices; private boolean isSelected; public Profile(String profileName, Boolean isPaused, int n...
[CODE] } I would like to pass the profile object through intents so I created the model class which implements Parcelable. This is my Model class which implements Parcelable. My model class contains two boolean fields where I am having an issue with "isSelect" field and not with "isPaused" field. Don't know the reason ...
android|parcelable|illegalstateexception
2
2020-02-07T17:22:13.843Z
2,020
2
17
4
1,118
1
426
124
3
2
true
false
false
false
false
false
low
60,118,433
Android Recyclerview's last item gets updated by updating the first item
<p>There is a Recyclerview in my activity. it has always 10 items. Recyclerview's item has two buttons witch each one's click listener is defined in <code>onBindViewHolder</code> method of adapter class. after clicking any of the items's buttons it calls a callback method witch is implemented in activity's <code>onCrea...
There is a Recyclerview in my activity. it has always 10 items. Recyclerview's item has two buttons witch each one's click listener is defined in onBindViewHolder method of adapter class. after clicking any of the items's buttons it calls a callback method witch is implemented in activity's onCreate method. The callbac...
android|kotlin|android-recyclerview|position
0
2020-02-07T17:34:41.107Z
2,020
2
17
4
663
1
1,107
72
4
3
true
false
false
false
false
false
zero
60,118,531
Running background service on Android 7.1
<p>I'm experienced at development, but new to Android development. For Android 7.1 what strategy would you setup a background service (purpose is so that it can ping a server every N seconds). This is for a corporate project and not public consumption because it sounds like a bad requirement for public use.</p> <p>Hop...
I'm experienced at development, but new to Android development. For Android 7.1 what strategy would you setup a background service (purpose is so that it can ping a server every N seconds). This is for a corporate project and not public consumption because it sounds like a bad requirement for public use. Hopefully Andr...
android|xamarin.android
0
2020-02-07T17:42:09.733Z
2,020
2
17
4
143
1
1,243
41
2
2
true
false
false
false
false
false
zero
60,118,551
Trying to decode a base64 String into a PDF, but the file is always corrupt. What am I doing incorrectly?
<p>I have a pdf which has been encoded using base64. I am trying to take this encoded string, decode it, and save it to the phone as a pdf. The file saves as expected, but its unable to be opened because it is corrupted. I've tried different pdfs but still get the same result. Here is my code</p> <pre><code>val cacheP...
I have a pdf which has been encoded using base64. I am trying to take this encoded string, decode it, and save it to the phone as a pdf. The file saves as expected, but its unable to be opened because it is corrupted. I've tried different pdfs but still get the same result. Here is my code [CODE]
java|android|kotlin
1
2020-02-07T17:44:14.133Z
2,020
2
17
4
130
0
297
105
3
1
true
true
false
false
false
false
low
60,118,656
Relative Layout, textView not showing below button?
<p>I've been working on my app and i've come across an issue where in the preview, whenever i place text below the button for example the "roomservice" button it doesnt show it on the emulator when running but it does in the preview. What am i doing wrong here?</p> <p>This is my xml code as its the only coding part i'...
I've been working on my app and i've come across an issue where in the preview, whenever i place text below the button for example the "roomservice" button it doesnt show it on the emulator when running but it does in the preview. What am i doing wrong here? This is my xml code as its the only coding part i've been wor...
android-studio
0
2020-02-07T17:51:27.100Z
2,020
2
17
4
30
1
435
51
1
1
true
false
false
false
false
false
zero
60,118,708
Places API - Unable to retreive suggestions in android
<p>I am trying to create a autocomplete textview and the adapter being used is google API. When I type in the autocomplete textview, the result should have been places being suggested from what I had typed but I am getting no suggestions at all. Please help me out as I am a newbie. I tried to search couldn't find any q...
I am trying to create a autocomplete textview and the adapter being used is google API. When I type in the autocomplete textview, the result should have been places being suggested from what I had typed but I am getting no suggestions at all. Please help me out as I am a newbie. I tried to search couldn't find any ques...
java|android|autocomplete|google-places-api|autosuggest
1
2020-02-07T17:55:03.560Z
2,020
2
17
4
798
0
757
54
5
4
true
true
false
false
false
false
low
60,118,746
updating data in ListViews displayed with a FragmentPagerAdapter
<p>i try to display Datasets in severel Listview in a fragment in a FragmentPagerAdapter.</p> <p>The different datasets partly depend on each other (if displayed data in tab A get's changed, data in tab B should be changed as a result.). If data is changed in 1 Listview I give the changed data to the ParentFragment vi...
i try to display Datasets in severel Listview in a fragment in a FragmentPagerAdapter. The different datasets partly depend on each other (if displayed data in tab A get's changed, data in tab B should be changed as a result.). If data is changed in 1 Listview I give the changed data to the ParentFragment via an interf...
android|listview|fragmentpageradapter
0
2020-02-07T17:57:46.417Z
2,020
2
17
4
25
1
1,028
64
3
0
false
false
false
false
false
false
zero
60,118,747
One activity, two screens, one ImageView
<p>I'm creating an Android application, but I don't know how to manage my UI. I have a main fragment set inside the MainActivity, and at top right a button to open another Fragment. However the two classes of fragments just define layouts and toolbar. So I have a first quetion, Is that a good pratice to use Fragments o...
I'm creating an Android application, but I don't know how to manage my UI. I have a main fragment set inside the MainActivity, and at top right a button to open another Fragment. However the two classes of fragments just define layouts and toolbar. So I have a first quetion, Is that a good pratice to use Fragments or i...
java|android|android-fragments|android-activity|android-imageview
0
2020-02-07T17:57:54.150Z
2,020
2
17
4
36
0
751
40
5
0
false
true
false
false
false
false
zero
60,118,756
Getting ClassCastException or IllegalStateException at isSelected
<pre><code>@SerializedName("profileName") private String profileName; @SerializedName("paused") private boolean isPaused; @SerializedName("numberOfDevices") private int numberOfDevices; private boolean isSelected; public Profile(String profileName, Boolean isPaused, int numberOfDevices) { this.profileName = profi...
[CODE] So in the above code dont know the reason why I am getting classCastExcpetion on isSelected and not in isPaused . Both are having same datatypes and used in a similar way. Tried searching for it still not able to understand the issue. Below are the logs for it. [CODE] And the weird part is I am using that for a ...
android|parcelable
0
2020-02-07T17:58:25.803Z
2,020
2
17
4
254
2
496
65
2
3
true
false
false
false
false
false
zero
60,118,798
Mockito - Set default return string value for all mocked methods
<p>I have a class that has over 20 methods that return string values. These strings are not relevant for my test, but it's pretty time consuming to set a <code>when-&gt;thenReturn</code> case for each of the functions, specially because there are several of these classes.</p> <p>Is there a way to tell mockito to defa...
I have a class that has over 20 methods that return string values. These strings are not relevant for my test, but it's pretty time consuming to set a when->thenReturn case for each of the functions, specially because there are several of these classes. Is there a way to tell mockito to default empty string instead of ...
android|mockito|mockito-kotlin
0
2020-02-07T18:01:02.083Z
2,020
2
18
4
576
1
375
64
3
0
false
false
false
false
false
false
zero
60,118,887
How do I set placeholder if the image is null?
<p>I get an image from the server and use <code>Picasso</code> to set it in ImageView. The image can be null so I use <code>let</code>. But when the image is null I get an error. How can I use let to set placeholder if the image is null? My function:</p> <pre><code>contactsModel.images?.let { url -&gt; Picasso....
I get an image from the server and use Picasso to set it in ImageView. The image can be null so I use let . But when the image is null I get an error. How can I use let to set placeholder if the image is null? My function: [CODE] My error: [CODE]
android|kotlin|picasso|let
0
2020-02-07T18:06:50.140Z
2,020
2
18
4
1,264
2
246
46
4
2
true
false
false
false
false
false
zero
60,118,981
Showing "Finished with error: Gradle task assembleDebug failed with exit code 1". Was running Flutter in Android Studio.What should I do?
<p>This was shown in the console</p> <p>dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild Reason: image not found git: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly! git: error: You...
This was shown in the console dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild Reason: image not found git: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly! git: error: You can set the pa...
android|android-studio|flutter|dart|android-emulator
1
2020-02-07T18:14:07.067Z
2,020
2
18
4
388
1
1,787
137
5
0
false
false
false
false
false
false
low
60,119,076
Pick saving primitive Data in Android
<p>I am trying to save some arrays in an application to use them in other platform (C++) are serialized. I use a pick method to let the user choose the file name and directory, but first I am trying to define the root directory like this, since the handling of the Create Document needs Android 10 to start in the proper...
I am trying to save some arrays in an application to use them in other platform (C++) are serialized. I use a pick method to let the user choose the file name and directory, but first I am trying to define the root directory like this, since the handling of the Create Document needs Android 10 to start in the proper de...
android|file|exception|permissions|save
1
2020-02-07T18:22:56.030Z
2,020
2
18
4
182
0
1,708
37
5
6
true
true
false
false
false
false
low
60,119,108
RxJava blockingFirst/Single returns wrong exception in JUnit 5 Retrofit Test
<p>Test below is expected to return HttpException but it returns RuntimeException instead.</p> <pre><code> @Test fun `Server down returns 500 error`() { mockWebServer.enqueue(MockResponse().setResponseCode(500)) val exception: Exception = assertThrows( HttpException:...
Test below is expected to return HttpException but it returns RuntimeException instead. [CODE] Log for failed test is INFO: MockWebServer[54339] received request: GET /users/test/repos HTTP/1.1 and responded: HTTP/1.1 500 Server Error Feb 07, 2020 9:20:11 PM okhttp3.mockwebserver.MockWebServer acceptConnections INFO: M...
android|rx-java2|junit5|mockwebserver
0
2020-02-07T18:25:37.360Z
2,020
2
18
4
288
1
762
76
4
1
true
false
false
false
false
false
zero
60,119,143
Call non-static method in Static method JAVA
<p>EDITED: </p> <p>The real purpose of that is to have one activity and on class who fetch data and render it to the activity. </p> <p>The problem is I have dropdown menu. When I clicked on an item of the menu it change my url but it does not load or fetch my data to the activity but when i clicked again it works bu...
EDITED: The real purpose of that is to have one activity and on class who fetch data and render it to the activity. The problem is I have dropdown menu. When I clicked on an item of the menu it change my url but it does not load or fetch my data to the activity but when i clicked again it works but with the paramaters ...
java|android-studio
0
2020-02-07T18:28:15.090Z
2,020
2
18
4
1,238
3
895
44
2
2
true
false
false
false
false
false
zero
60,119,211
Change TimePickerDialog to show time of specific country
<p>I have a "TimePickerDialog", i want open that time picker with the current time of a specific country. Please share your suggestions. </p>
I have a "TimePickerDialog", i want open that time picker with the current time of a specific country. Please share your suggestions.
android|timepickerdialog
0
2020-02-07T18:33:58.057Z
2,020
2
18
4
30
1
133
56
2
0
false
false
false
false
false
false
zero
60,119,218
How can I add a text label to a Floating Action Button?
<p>I want to add a text to my Floating Action Buttons, like name them or put a label next to them. I have tried so many ways but couldn't find a correct answer.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/...
I want to add a text to my Floating Action Buttons, like name them or put a label next to them. I have tried so many ways but couldn't find a correct answer. [CODE] This is the output of my project:
android|floating-action-button
1
2020-02-07T18:34:44.503Z
2,020
2
18
4
4,664
1
198
55
2
1
true
false
true
false
false
false
low
60,119,308
How to do a string compare with the incoming message
<p>I know it sounds simple but I got some trouble with it. I am trying to make a system with a pic Microcontroller (MCU) and an xamarin android app. The sending part from app to the pic MCU is solved but when I want to send data from the MCU to the app it won't go as flaweless. I am using a HC-06 as a bluetooth device ...
I know it sounds simple but I got some trouble with it. I am trying to make a system with a pic Microcontroller (MCU) and an xamarin android app. The sending part from app to the pic MCU is solved but when I want to send data from the MCU to the app it won't go as flaweless. I am using a HC-06 as a bluetooth device for...
c#|android|xamarin|bluetooth
1
2020-02-07T18:41:32.063Z
2,020
2
18
4
180
1
1,218
52
4
5
true
false
false
false
false
false
low
60,119,319
Making Facebook graph API calls from Firebase Cloud Functions
<p>I have an Android app using Cloud Firestore (Blaze Plan). By calling Firebase Call functions from the Android app I can easily send text from the client and receive answers from the server. </p> <p>According to the Facebook docs regarding <a href="https://developers.facebook.com/docs/facebook-login/access-tokens/#a...
I have an Android app using Cloud Firestore (Blaze Plan). By calling Firebase Call functions from the Android app I can easily send text from the client and receive answers from the server. According to the Facebook docs regarding Access Tokens , it is possible to get information from the Facebook Graph API by using an...
android|facebook-graph-api|google-cloud-functions|facebook-javascript-sdk|facebook-access-token
4
2020-02-07T18:42:53.150Z
2,020
2
18
4
800
1
514
61
5
0
false
false
false
false
false
false
low
60,119,338
PostAdapter returning incorrect postids for posts
<p>Introduced some code that makes my <code>PostAdapter</code> return the wrong <code>postid</code> when I Log it, and the <code>post</code> isn't being liked... I am not sure how to fix it. App doesn't crash or anything, but I am unsure how to fix it. </p> <p>Post has three <code>ImageViews</code>, and when they are ...
Introduced some code that makes my PostAdapter return the wrong postid when I Log it, and the post isn't being liked... I am not sure how to fix it. App doesn't crash or anything, but I am unsure how to fix it. Post has three ImageViews , and when they are clicked on they change color. That before was happening as it i...
java|android|android-viewholder
0
2020-02-07T18:43:49.680Z
2,020
2
18
4
47
2
588
49
3
1
true
false
false
false
false
false
zero
60,119,412
Value of DTO field if is PrimaryKey autoincrement
<p>In my Room Database in my application i have a table called Messages like below.</p> <pre><code>@Entity(tableName = "messages") data class MessageDto( @PrimaryKey(autoGenerate = true) @ColumnInfo(name = "client_message_id") var clientMessageId: Long, @ColumnInfo(name = "message_id") var messag...
In my Room Database in my application i have a table called Messages like below. [CODE] So lets say that i want to insert a new message to the Database. I create a MessageDto object and then i insert it. [CODE] 1) Since the PK exists only in the local Database i have to declare it mySelf. But since its autoIncrement wh...
android|kotlin|primary-key|android-room
0
2020-02-07T18:49:58.697Z
2,020
2
18
4
465
1
471
49
4
2
true
false
false
false
false
false
zero
60,119,465
Android Gradle project sync failed due to unresolved dependency
<p>I recently added a card-stack-view dependency (implementation 'com.yuyakaido.android:card-stack-view:2.3.4') to my app level build.gradle and after that my project is giving syncing failure like:-</p> <blockquote> <p>ERROR: Failed to resolve: androidx <br> Affected Modules: app</p> </blockquote> <p>This is m...
I recently added a card-stack-view dependency (implementation 'com.yuyakaido.android:card-stack-view:2.3.4') to my app level build.gradle and after that my project is giving syncing failure like:- ERROR: Failed to resolve: androidx Affected Modules: app This is my build.gradle [CODE] Can anyone help what i might be doi...
android|build.gradle
0
2020-02-07T18:54:06.410Z
2,020
2
18
4
499
2
329
63
2
1
true
false
false
false
false
false
zero
60,119,682
How can I apply a custom shape of TextInputLayout in both the state, Focused and normal state without using librery
<p>I wanna design a custom rounded corner TextInputLayout As I shown my sample image of active TextInputLayout <a href="https://i.stack.imgur.com/7lOD1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7lOD1.png" alt="enter image description here"></a>below</p> <p>My code in xml is </p> <pre><code>&...
I wanna design a custom rounded corner TextInputLayout As I shown my sample image of active TextInputLayout below My code in xml is [CODE] Its getting me a default TextInputLayout. How can I get my view.Please help me out. Getting error in style declaration.
android|widget|android-textinputlayout|material-components-android|material-components
1
2020-02-07T19:10:28.967Z
2,020
2
19
4
1,621
2
258
115
5
1
true
false
false
false
false
false
low
60,119,741
How can I write SmallTests in android studio, the error @SmallTest cannot be resolved is disapointing me
<p>I am learning how to write Unit tests for Android, have researched and now have an idea on how to write them. I have learned that I need to use @SmallTest annotation from <code>android.test.suitebuilder.annotation.SmallTest;</code> class but this seems to have deprecated. However, am getting an error that @SmallTes...
I am learning how to write Unit tests for Android, have researched and now have an idea on how to write them. I have learned that I need to use @SmallTest annotation from android.test.suitebuilder.annotation.SmallTest; class but this seems to have deprecated. However, am getting an error that @SmallTest cannot be resol...
android|unit-testing|android-studio
1
2020-02-07T19:15:31.170Z
2,020
2
19
4
199
1
465
104
3
1
true
false
false
false
false
false
low
60,119,838
Starting activity from service not working on different devices *ANDROID*
<p>I am trying to open an activity (SecondActivity) from the foreground service. This code works fine on my device and I am able to obtain the SecondActivity. But when I try to run this code on another device it doesn't show up the SecondActivity. Please help!! P.S. Both devices are running at the same <code>API level ...
I am trying to open an activity (SecondActivity) from the foreground service. This code works fine on my device and I am able to obtain the SecondActivity. But when I try to run this code on another device it doesn't show up the SecondActivity. Please help!! P.S. Both devices are running at the same API level (API leve...
android|android-intent|android-activity|android-service|start-activity
1
2020-02-07T19:23:43.143Z
2,020
2
19
4
156
0
417
73
5
2
true
true
false
false
false
false
low
60,119,851
Why does Firebase always download all data?
<p>I am working on a question multiple answer application. There are about a thousand questions. I grouped them separately. But when I run the application and enter any question group, I think it downloads all the question groups, it downloads all the data. This will mean that my limit is filled very quickly. Can you h...
I am working on a question multiple answer application. There are about a thousand questions. I grouped them separately. But when I run the application and enter any question group, I think it downloads all the question groups, it downloads all the data. This will mean that my limit is filled very quickly. Can you help...
android|firebase-realtime-database
1
2020-02-07T19:24:29.683Z
2,020
2
19
4
347
2
390
43
2
1
true
false
false
false
false
false
low
60,119,889
Adding a shadow to a custom shape in Android
<p>I have a custom shaped view which has a top left radius of 0 and the other 3 radius are 16dp. </p> <p>I am aware that you can override the outline provider however from what I see this doesn't allow you to set an outline where the radius on the corners is different.</p> <p>Was wondering if there was any way of set...
I have a custom shaped view which has a top left radius of 0 and the other 3 radius are 16dp. I am aware that you can override the outline provider however from what I see this doesn't allow you to set an outline where the radius on the corners is different. Was wondering if there was any way of setting the outline pro...
android|kotlin|view|shadow
0
2020-02-07T19:28:24.207Z
2,020
2
19
4
99
1
398
44
4
0
false
false
false
false
false
false
zero
60,119,941
I'm getting below problem while running my React-native Application
<p><a href="https://i.stack.imgur.com/NvXDS.jpg" rel="nofollow noreferrer">Failed to connect to development server using "adb reverse": spawnSync /home/sumit/Android/platform-tools/adb ENOENT</a></p> <p>I also Tried using $ adb reverse tcp:8081 tcp:8081 but no Luck.</p>
Failed to connect to development server using "adb reverse": spawnSync /home/sumit/Android/platform-tools/adb ENOENT I also Tried using $ adb reverse tcp:8081 tcp:8081 but no Luck.
android|node.js|adb|react-native
1
2020-02-07T19:32:22.390Z
2,020
2
19
4
836
1
180
67
4
0
false
false
false
false
false
false
low
60,119,980
Android: Upgrade from Material 1.0 causing problems
<p>I recently upgraded from material 1.0 to material 1.1 to be able to use the new <code>TabLayoutMediator</code>.</p> <p>Gradle:</p> <pre><code>implementation 'com.google.android.material:material:1.1.0' </code></pre> <p>That worked out. However, I am now facing weird UI issues since the upgrade. </p> <p>[<img src...
I recently upgraded from material 1.0 to material 1.1 to be able to use the new TabLayoutMediator . Gradle: [CODE] That worked out. However, I am now facing weird UI issues since the upgrade. [ I've included four issues in the picture. The issues are: MaterialButtons have a black border. Before the upgrade they had no ...
java|android|gradle|material-design|material-components-android
2
2020-02-07T19:35:24.190Z
2,020
2
19
4
231
2
1,180
51
5
4
true
false
false
false
false
false
low
60,120,172
Android Room - Getting all base children of parent
<p>Right now, my relation hierarchy is <code>A -&gt; (A -&gt; ... -&gt; A) -&gt; B</code> where there are some amount (could also be 0) of <code>A</code> in the middle and each arrow is a one-to-many relationship. </p> <ul> <li>Each <code>A</code> "tree" will end in a <code>B</code>.</li> <li>Each <code>A</code> has ...
Right now, my relation hierarchy is A -> (A -> ... -> A) -> B where there are some amount (could also be 0) of A in the middle and each arrow is a one-to-many relationship. Each A "tree" will end in a B . Each A has either A or B as a child (but not both) My entities are: [CODE] [CODE] Currently, my method is to query ...
android|sqlite|android-room
1
2020-02-07T19:50:40.200Z
2,020
2
19
4
792
1
672
50
3
2
true
false
false
false
false
false
low
60,120,205
App crashed moving one activity to another activity after some seconds splash screen
<pre><code>package com.example.firstclasswithahmad; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import java.security.PublicKey; import javax.crypto.spec.DHPublicKeySpec; public class SplashScreen extends AppCompatActivity { @Override protected void onCrea...
[CODE]
java|android
1
2020-02-07T19:52:43.383Z
2,020
2
19
4
20
1
6
84
2
1
true
false
false
false
false
false
low
60,120,347
Android x86 on VirtualBox: App crashes on startup
<p>I am running Android x86 (64-bit) on VirtualBox. I'm able to access some apps fine, but some apps crash on startup every time. <code>logcat</code> shows this error:</p> <p><code>02-07 14:20:49.901 3083 3083 E AndroidRuntime: Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/com.chase.sig.androi...
I am running Android x86 (64-bit) on VirtualBox. I'm able to access some apps fine, but some apps crash on startup every time. logcat shows this error: 02-07 14:20:49.901 3083 3083 E AndroidRuntime: Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/com.chase.sig.android-TPinjV5wbyLsmB6IHnEPmw==/lib/a...
android|crash|virtualbox
0
2020-02-07T20:04:50.557Z
2,020
2
20
4
8,670
1
793
49
3
0
false
false
true
false
false
false
zero
60,120,647
why do previous printing statements show up in new projects build console - android studio/flutter
<p>So whenever I try to build a new flutter app, i see all the printing statements i have printed in the console from previous projects show up. while building my new project which has nothing to do with this new one, I have encountered this and many other problems since clicking the (invalidate cache and restart) but...
So whenever I try to build a new flutter app, i see all the printing statements i have printed in the console from previous projects show up. while building my new project which has nothing to do with this new one, I have encountered this and many other problems since clicking the (invalidate cache and restart) button ...
android-studio|flutter|console
0
2020-02-07T20:32:44.283Z
2,020
2
20
4
27
0
378
98
3
0
false
true
false
false
false
false
zero
60,120,696
How to use the MediaStore api to retreive a song and play it? Also, get its cover art and if possible get read its input stream?
<pre><code>package com.devrj.helium.data_model import android.content.ContentUris.withAppendedId import android.content.Context import android.net.Uri import android.os.CancellationSignal import android.provider.MediaStore.Audio.Media.* import com.devrj.helium.model.entity.TrackEntity class MediaStoreDataStream(strea...
[CODE] I recently started learning about the MediaStore API, and since I'm building a music player app I thought it would be beneficial to migrate to it due to all the performance benefits. However, I can't seem to play a single song or retrieve its cover art. How can I achieve this? This is how I try to play the song ...
android|kotlin|filenotfoundexception|mediastore
0
2020-02-07T20:35:58.327Z
2,020
2
20
4
123
1
759
128
4
4
true
false
false
false
false
false
zero
60,120,802
Flutter returns `lifecycle-common-java8.jar (androidx.lifecycle:lifecycle-common-java8:2.0.0)` error
<p>Flutter project won't run in Android Studio with <code>AndroidX</code> compatibility and returns following errors in Run/Console window:</p> <blockquote> <p>FAILURE: Build failed with an exception.</p> <ul> <li>What went wrong: Execution failed for task ':flutter_keyboard_visibility:javaPreCompileDebug'....
Flutter project won't run in Android Studio with AndroidX compatibility and returns following errors in Run/Console window: FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':flutter_keyboard_visibility:javaPreCompileDebug'. Could not resolve all files for configuration ':flutter_keyb...
android|gradle|flutter|android-lifecycle|androidx
1
2020-02-07T20:43:33.793Z
2,020
2
20
4
707
1
861
100
5
0
false
false
false
false
false
false
low
60,120,808
What is best way to store large data in local for iOS/Android
<p>I'm working on an app and I have tried to use local storage but I'm not sure if it will be OK for my project. I need to store really large data every second in my local database, and at the end of the day send to my server. This can be large data because every second write my GPS coordinates.</p> <p>What is best: SQ...
I'm working on an app and I have tried to use local storage but I'm not sure if it will be OK for my project. I need to store really large data every second in my local database, and at the end of the day send to my server. This can be large data because every second write my GPS coordinates. What is best: SQLite, loca...
android|ios|sqlite|cordova|local-storage
0
2020-02-07T20:43:45.283Z
2,020
2
20
4
706
3
398
61
5
0
false
false
false
false
false
false
zero
60,121,315
Android: Can I move a Service between foreground and background?
<p>I've implemented a <em>Service</em> that connects to a Bluetooth device and obtains data from it. I need the Service to keep alive, receiving the data, when the app is in the background. I know that I need to implement a Foreground Service, and I know how to do it. My problem is that I don't want the service's notif...
I've implemented a Service that connects to a Bluetooth device and obtains data from it. I need the Service to keep alive, receiving the data, when the app is in the background. I know that I need to implement a Foreground Service, and I know how to do it. My problem is that I don't want the service's notification to s...
java|android|foreground-service|background-foreground
1
2020-02-07T21:27:52.183Z
2,020
2
21
4
181
0
774
64
4
0
false
true
false
false
false
false
low
60,121,364
is it possible to add my customized indoor map using google map sdk for my android app?
<p>I want to develop an app using rssi of ble,wifi to set position of my users in indoor environment, or something else for example when they are near specific location send theme notification. I have to add my information and markers to google map. and my own simple map. it is like customized map for my users in my ap...
I want to develop an app using rssi of ble,wifi to set position of my users in indoor environment, or something else for example when they are near specific location send theme notification. I have to add my information and markers to google map. and my own simple map. it is like customized map for my users in my app. ...
android|google-maps-android-api-2
1
2020-02-07T21:31:36.707Z
2,020
2
21
4
1,969
1
1,298
87
2
0
false
false
false
false
false
false
low
60,121,425
Array call returns null although I have updated data
<p>I have an array with my object and Cloud Firestore. In Firestore I have 11 documents with two fields each. I take data from the cloud and set the values of the two fields in an Object that I created called Food.</p> <p>Then I want to read the value of the <code>name</code> field of each element in the array but And...
I have an array with my object and Cloud Firestore. In Firestore I have 11 documents with two fields each. I take data from the cloud and set the values of the two fields in an Object that I created called Food. Then I want to read the value of the name field of each element in the array but Android give me NullPointer...
java|android|arrays|firebase|google-cloud-firestore
0
2020-02-07T21:37:12.247Z
2,020
2
21
4
50
0
728
52
5
1
true
true
false
false
false
false
zero
60,121,466
LiveData in view model not being set and is null
<p>I have the following <code>ViewModel</code></p> <pre><code>class MainViewModel @Inject constructor(private val mainRepository: MainRepository) : ViewModel(){ private var _user: LoggedInUser? = null val allProjects: MutableLiveData&lt;Array&lt;Project&gt;&gt; = MutableLiveData() fun setUser(loggedInU...
I have the following ViewModel [CODE] When I call setUser() or getAllProjects() the data does not get set. And in the After print statement I get null. MainRepository : [CODE] Here the INSIDE print statement prints out the data, while the getAllProjects DATA prints null. In my activity I both have an observer that is t...
android|kotlin|android-livedata|mutablelivedata
0
2020-02-07T21:41:20.793Z
2,020
2
21
4
273
1
554
48
4
2
true
false
false
false
false
false
zero
60,121,506
How to develop cross platform app library
<p>We currently have the situation that we need to create an Android library (aar) and an iOS Framework. You know about the benefits, so we would like to have this done in a cross-platform manner. There is a strong React Native background in our company, but since there is no official solution to achieve this, we would...
We currently have the situation that we need to create an Android library (aar) and an iOS Framework. You know about the benefits, so we would like to have this done in a cross-platform manner. There is a strong React Native background in our company, but since there is no official solution to achieve this, we would be...
android|ios|react-native|cross-platform
0
2020-02-07T21:44:22.610Z
2,020
2
21
4
50
1
524
41
4
0
false
false
false
false
false
false
zero
60,121,524
Gradle not finding com.github.johnrengelman.shadow
<p>I am running Micronaut project using JDK12 and Gradle 6.1.1, while compiling the project, its giving this error message.</p> <p><strong>code</strong></p> <pre><code>plugins { id "java" id "groovy" id "application" id "com.github.johnrengelman.shadow" version "5.2.0" } </code></pre> <p>How to resol...
I am running Micronaut project using JDK12 and Gradle 6.1.1, while compiling the project, its giving this error message. code [CODE] How to resolve this error? [CODE]
gradle|android-gradle-plugin
3
2020-02-07T21:45:47.707Z
2,020
2
21
4
496
0
166
50
2
2
true
true
false
false
false
false
low
60,121,872
How to delete recyclerview items by id?
<p>I have displayed a data in the top view. and I don't want to display that data on recyclerview. what can I do?</p> <hr> <p>this is my adapter for deleting items, but isn't working.</p> <hr> <pre><code>override fun onBindViewHolder(holder: ViewHolder, position: Int) { val data = this.item?.get(position) ...
I have displayed a data in the top view. and I don't want to display that data on recyclerview. what can I do? this is my adapter for deleting items, but isn't working. [CODE]
android|kotlin|android-recyclerview
1
2020-02-07T22:19:20.993Z
2,020
2
22
4
233
1
175
39
3
1
true
false
false
false
false
false
low
60,121,877
How to get a gridview list with only checked items?
<p>I have a gridview list which show me all the elements from my sqlite database, I want to put a checkbox so as to view from the list only the elements which countains the words I checked.How do I do that ?</p> <p>My sqlite database has rows consisting of ImageView,and 3 TextView .</p> <p>My code: </p> <pre><code>...
I have a gridview list which show me all the elements from my sqlite database, I want to put a checkbox so as to view from the list only the elements which countains the words I checked.How do I do that ? My sqlite database has rows consisting of ImageView,and 3 TextView . My code: [CODE] My PanelList [CODE] My PanelLi...
java|android|sqlite
1
2020-02-07T22:19:33.813Z
2,020
2
22
4
25
0
336
51
3
3
true
true
false
false
false
false
low
60,121,888
Link opened by NFC tag can't redirect on Android Chrome
<p>I'm running into a major issue with NFC tags and Android. I've got a URL programmed into the tag, and the URL actually redirects to another URL or app - in this case it would open up a Facebook chatbot ref URL.</p> <p>If you browse directly to the link, it redirects with no issue. It's when the link is opened via N...
I'm running into a major issue with NFC tags and Android. I've got a URL programmed into the tag, and the URL actually redirects to another URL or app - in this case it would open up a Facebook chatbot ref URL. If you browse directly to the link, it redirects with no issue. It's when the link is opened via NFC tag that...
php|android|redirect|nfc|messenger
1
2020-02-07T22:20:24.823Z
2,020
2
22
4
354
0
1,059
55
5
0
false
true
false
false
false
false
low
60,121,903
Apps using AndroidX don't scale Text
<p>Text related fields do not scale if user change the font size from system settings. If the user set the text to the smallest size on the app keeps the same size, if it sets to be largest text size on the app keeps the same size.</p> <p>Things to consider is I'm using AndroidX and its fresh project and so far this p...
Text related fields do not scale if user change the font size from system settings. If the user set the text to the smallest size on the app keeps the same size, if it sets to be largest text size on the app keeps the same size. Things to consider is I'm using AndroidX and its fresh project and so far this problem only...
android|textview|androidx|android-7.0-nougat
2
2020-02-07T22:22:27.390Z
2,020
2
22
4
342
0
1,142
36
4
2
true
true
false
false
false
false
low
60,121,918
Flutter splash screen with logic inside it
<p>I want to make a splash screen in flutter with some logic inside it to know if the user has already signed in or not in order to direct him to the right page.</p> <p>I've made the Android and iOS splash screens separately but ofcourse I can't have any logic inside them, then made another splash screen in flutter to...
I want to make a splash screen in flutter with some logic inside it to know if the user has already signed in or not in order to direct him to the right page. I've made the Android and iOS splash screens separately but ofcourse I can't have any logic inside them, then made another splash screen in flutter to know wheth...
android|ios|flutter|splash-screen
2
2020-02-07T22:23:27.650Z
2,020
2
22
4
1,401
1
602
42
4
0
false
false
false
false
false
false
low
60,122,037
How can I detect Samsung One UI?
<h3>Background</h3> <p>I need to work around a bug that only affects devices running Samsung's <em>One UI</em>.</p> <h3>Question</h3> <p>How can I programmatically detect if a device is running One UI?</p> <h3>What I've tried</h3> <p>I've already tried the following:</p> <ul> <li>Inspecting <a href="https://devel...
Background I need to work around a bug that only affects devices running Samsung's One UI . Question How can I programmatically detect if a device is running One UI? What I've tried I've already tried the following: Inspecting android.os.Build , but I didn't see anything that clearly identified One UI Checking if Build...
android|samsung-mobile
1
2020-02-07T22:34:58.127Z
2,020
2
22
4
1,967
1
645
32
2
1
true
false
false
false
false
false
low
60,122,331
How to Select and Load saved game snapshot from google play games
<p>I am on the Saved Games screen where is shows the list of all saves. When I select a saved game the app crashes with the error: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.google.android.gms.games.snapshot.SnapshotMetadataEntity</p> <p>It's basically the same code from here <a ...
I am on the Saved Games screen where is shows the list of all saves. When I select a saved game the app crashes with the error: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.google.android.gms.games.snapshot.SnapshotMetadataEntity It's basically the same code from here https://develo...
android|google-play|google-play-services|google-play-games
2
2020-02-07T23:14:30.120Z
2,020
2
23
4
240
1
3,421
65
4
1
true
false
false
false
false
false
low
60,122,408
Can i replace my table-arranged dummy values with actual data froma database?
<p>[So as you can see in the picture, i'm a newbie in android programming and i just had an assignment concerning creating a management system app for university. The views you see in the picture are just customly made with xml(Table layout) and the data are just dummy data placed on the respective textviews in the ta...
[So as you can see in the picture, i'm a newbie in android programming and i just had an assignment concerning creating a management system app for university. The views you see in the picture are just customly made with xml(Table layout) and the data are just dummy data placed on the respective textviews in the tables...
java|android|android-sqlite
0
2020-02-07T23:24:02.367Z
2,020
2
23
4
52
1
701
77
3
0
false
false
false
false
false
false
zero
60,122,573
How to hide BottomNavigation bar in Nativescript
<p>Please how can i hide Bottom Navigation in a particular page in nativescript core? The code for my BottomNavigation is in App-root.xml file. this makes it visible on all pages, i'm trying to hide it from a specific page. Below is my app-root.xml file</p> <pre><code>&lt;BottomNavigation id="bottomNav"&gt; &lt;Ta...
Please how can i hide Bottom Navigation in a particular page in nativescript core? The code for my BottomNavigation is in App-root.xml file. this makes it visible on all pages, i'm trying to hide it from a specific page. Below is my app-root.xml file [CODE]
android|nativescript
1
2020-02-07T23:46:57.387Z
2,020
2
23
4
935
3
257
48
2
1
true
false
false
false
false
false
low
60,122,745
Android build c++ with dependency
<p>I am working on an Android application with NDK. My c++ code has some dependencies from c++ open source libraries, so I can download the source code of the dependencies and package them in my app. I have created my CMakeList files, but I don't know how to include the external library.</p> <p>I would like to build t...
I am working on an Android application with NDK. My c++ code has some dependencies from c++ open source libraries, so I can download the source code of the dependencies and package them in my app. I have created my CMakeList files, but I don't know how to include the external library. I would like to build the dependen...
android|cmake|android-ndk
0
2020-02-08T00:12:13.290Z
2,020
2
0
5
126
1
587
33
3
0
false
false
false
false
false
false
zero
60,122,776
Floating Action Button Background Blur
<p>Floating Action Button Background Blur i've been looking for a solution for days i am trying to make the background blurry when i click the floating action button but when i click the button it's not showing the options and the text is not showing when i run the program any suggestions? here's my code</p> <pre><cod...
Floating Action Button Background Blur i've been looking for a solution for days i am trying to make the background blurry when i click the floating action button but when i click the button it's not showing the options and the text is not showing when i run the program any suggestions? here's my code [CODE] here's my ...
android
2
2020-02-08T00:16:42.787Z
2,020
2
0
5
1,312
1
335
38
1
2
true
false
false
false
false
false
low
60,122,901
Is it possible to implement Google/CloudFlare DNS into an Android Webview App?
<p>I wish to add Google/CloudFlare DNS to a Webview Android App that I have, so the user will connect to the website in the app through the Google/CloudFlare DNS (8.8.8.8/1.1.1.1) If it's possible, please, please write instructions as detailed as possible. That would be super helpful Thank you and have a great weekend<...
I wish to add Google/CloudFlare DNS to a Webview Android App that I have, so the user will connect to the website in the app through the Google/CloudFlare DNS (8.8.8.8/1.1.1.1) If it's possible, please, please write instructions as detailed as possible. That would be super helpful Thank you and have a great weekend
android-studio
3
2020-02-08T00:38:30.587Z
2,020
2
0
5
265
0
316
78
1
0
false
true
false
false
false
false
low
60,122,905
How R class are handled inside aab format (android app bundle)?
<p>I have a native app (I mean compiled in ARM) made in Delphi. This app was working pretty fine in Android32 with apk package. But now I want to migrate to android 64 and then use instead aab format but when i do so and when i run the app i receive the error: <code>android.content.res.Resources$NotFoundException: Reso...
I have a native app (I mean compiled in ARM) made in Delphi. This app was working pretty fine in Android32 with apk package. But now I want to migrate to android 64 and then use instead aab format but when i do so and when i run the app i receive the error: android.content.res.Resources$NotFoundException: Resource ID #...
android|google-play|apk|android-app-bundle
0
2020-02-08T00:39:22.650Z
2,020
2
0
5
423
1
880
63
4
0
false
false
false
false
false
false
zero
60,122,949
BottomNavigationView in a fragment, getting a 'must implement OnFragmentInteractionListener' error
<p>I am using the Navigation Graph, and in one section of my app I want to use a BottomNavigationView in a fragment to navigate between three fragments, but I am getting an error: 'must implement OnFragmentInteractionListener'. The error says I should implement it in the activity but the BottomNavigationView is only fo...
I am using the Navigation Graph, and in one section of my app I want to use a BottomNavigationView in a fragment to navigate between three fragments, but I am getting an error: 'must implement OnFragmentInteractionListener'. The error says I should implement it in the activity but the BottomNavigationView is only for a...
android|android-bottomnav
0
2020-02-08T00:49:21.577Z
2,020
2
0
5
27
1
930
98
2
0
false
false
false
false
false
false
zero
60,123,110
how to export and import sqlite table?
<p>I'm working on an an app that contain sqlite table with multiple columns , so we can add items to the table and displayed in listview then each item has it's own details that could be displayed in a detail activity, how to export and import the data from the sqlite table ?</p> <p>display products <a href="https://i...
I'm working on an an app that contain sqlite table with multiple columns , so we can add items to the table and displayed in listview then each item has it's own details that could be displayed in a detail activity, how to export and import the data from the sqlite table ? display products 1 detail activity 2
java|android|sqlite
0
2020-02-08T01:18:52.833Z
2,020
2
1
5
63
1
310
38
3
0
false
false
false
false
false
false
zero
60,123,146
How to Inflate Merge
<p>I have created an accounts settings page with section titles and list view for the options via an adapter. The list view is a "merge", so that it can be included into the main file. However, it seems as thought merge files cannot be inflated. </p> <p>This is the error I get: </p> <pre><code>E/AndroidRuntime: FATAL...
I have created an accounts settings page with section titles and list view for the options via an adapter. The list view is a "merge", so that it can be included into the main file. However, it seems as thought merge files cannot be inflated. This is the error I get: [CODE] Merge ListView file layout_center_accountsett...
java|android|xml|android-studio|android-fragments
1
2020-02-08T01:26:49.840Z
2,020
2
1
5
641
1
499
20
5
3
true
false
false
false
false
false
low
60,123,152
retrofit2 connection is throwing errors when installed as apk
<p>I'm connecting to restful api with retrofit2.</p> <p>When I try the code in the emulator console, it runs fine and connect to my web api.</p> <p>But When I convert that to apk release mode and install it on my cell phone, then the code doesn't work.</p> <p>Do you know if this is an normal behavior and when I uplo...
I'm connecting to restful api with retrofit2. When I try the code in the emulator console, it runs fine and connect to my web api. But When I convert that to apk release mode and install it on my cell phone, then the code doesn't work. Do you know if this is an normal behavior and when I upload to google playstore it w...
java|android|retrofit2
0
2020-02-08T01:28:18.827Z
2,020
2
1
5
49
1
462
61
3
5
true
false
false
false
false
false
zero
60,123,182
Is there any Test App ID for your Application?
<p>I am building an Android application in Android Studio and I am implementing AdMob. So, According to the Google AdMob website, you have to add the following in your manifest:-</p> <pre><code>&lt;manifest&gt; &lt;application&gt; &lt;!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 --&gt; ...
I am building an Android application in Android Studio and I am implementing AdMob. So, According to the Google AdMob website, you have to add the following in your manifest:- [CODE] Failure to add this would result in an exception. I am just testing my app and am also using a test AD id for my ads. My question is that...
android|android-studio|admob|android-manifest
0
2020-02-08T01:34:36.113Z
2,020
2
1
5
3,526
1
491
46
4
1
true
false
true
false
false
false
zero
60,123,349
Search using voice command
<p>I got this simple problem whenever I say "search music click" its searching for 'search music click' too it's supposed to search my music file name click. I tried to put different variables but only boolean is the one that not causing an error.</p> <pre><code>if(voice_result.indexOf("search music") != -1){ voice_re...
I got this simple problem whenever I say "search music click" its searching for 'search music click' too it's supposed to search my music file name click. I tried to put different variables but only boolean is the one that not causing an error. [CODE] the voice_result here is the process result of my voice and if ever ...
java|android|android-studio
0
2020-02-08T02:14:55.220Z
2,020
2
2
5
53
1
420
26
3
1
true
false
false
false
false
false
zero
60,123,494
Method put in android.util.SparseArray not mocked
<p>I would like to run a test which contains this code:</p> <pre><code> @Test public void deleteItemWithKeyGreaterThenTest() { SparseArray&lt;String&gt; sparseArray = new SparseArray&lt;String&gt;(); sparseArray.put(0, &quot;zero&quot;); </code></pre> <p>but when I run the test I get:</p> <pre><c...
I would like to run a test which contains this code: [CODE] but when I run the test I get: [CODE] I've already read this Unit testing ArrayMap throws Method put in android.util.ArrayMap not mocked but it did not provide a clear solution. Can you please tell me what I'm doing wrong? Thank you in advance! EDIT: full code...
android-studio|junit4
1
2020-02-08T02:48:04.510Z
2,020
2
2
5
1,441
1
400
49
2
6
true
false
false
false
false
false
low
60,123,506
android button and listener. how can i get it more short
<p>I am making some buttons and listener for it. but i think it is too long and complicated. So can i get it more briefly?</p> <p>here is my code</p> <pre><code>fun init_cardView() { activity_cardview.setOnClickListener(myOnClickListener) alertdialog_cardview.setOnClickListener(myOnClickListener) animatio...
I am making some buttons and listener for it. but i think it is too long and complicated. So can i get it more briefly? here is my code [CODE] Thank you!
android|kotlin
1
2020-02-08T02:50:26.427Z
2,020
2
2
5
43
2
153
56
2
1
true
false
false
false
false
false
low
60,123,522
add multiple rewards from admob reward videos
<p>I have my code set up to when user finishes watching reward ad video, text view updates to "points : 01" . I would like this to update one point each time a video is watched for example "points : 02" etc. I have tried to just add a second .setText line but does not work . My impressions are set to 2 impressions per ...
I have my code set up to when user finishes watching reward ad video, text view updates to "points : 01" . I would like this to update one point each time a video is watched for example "points : 02" etc. I have tried to just add a second .setText line but does not work . My impressions are set to 2 impressions per use...
java|android|android-studio|admob|admob-rewardedvideoad
0
2020-02-08T02:54:09.940Z
2,020
2
2
5
122
1
411
45
5
1
true
false
false
false
false
false
zero
60,123,532
what are the differences between Widevine HDCP levels (v1,v2,v2.2) & Widevine Security levels?
<p>How does it effect android mobile phones DRM contents streaming. When i check DRMinfo in android devices some phones shows HDCP level unprotected. Some shows HDCP level Disconnected.what is the difference between them.</p>
How does it effect android mobile phones DRM contents streaming. When i check DRMinfo in android devices some phones shows HDCP level unprotected. Some shows HDCP level Disconnected.what is the difference between them.
android|drm|widevine|hdcp
2
2020-02-08T02:56:32.030Z
2,020
2
2
5
3,738
1
218
94
4
0
false
false
true
false
false
false
low
60,123,536
How to change text value using Strings.xml - AndroidX
<p>I Created Body Mass Index App, in that app, some text says, <strong>Please input your height</strong> etc.</p> <p>I set it using <code>Strings.xml</code>, In my case, I want to be able to switch the language from the text <strong>Please input your height</strong> into another language, Any Solution?</p>
I Created Body Mass Index App, in that app, some text says, Please input your height etc. I set it using Strings.xml , In my case, I want to be able to switch the language from the text Please input your height into another language, Any Solution?
java|android|string|locale
0
2020-02-08T02:57:39.043Z
2,020
2
2
5
117
2
247
53
4
0
false
false
false
false
false
false
zero
60,123,564
In Android, how can I detect if a running application is sandbox
<p>In Android, how can I detect if a running application is sandboxed? it's better in java or Kotlin. Java is recommended.</p>
In Android, how can I detect if a running application is sandboxed? it's better in java or Kotlin. Java is recommended.
android
2
2020-02-08T03:04:55.820Z
2,020
2
3
5
75
0
119
64
1
0
false
true
false
false
false
false
low
60,123,571
cast FrameLayout to Fragment
<p>I am recently trying to understand a <a href="https://github.com/aosp-mirror/platform_development/blob/master/samples/ApiDemos/src/com/example/android/apis/app/FragmentLayout.java" rel="nofollow noreferrer">sample</a> about fragment. For this <a href="https://github.com/aosp-mirror/platform_development/blob/master/s...
I am recently trying to understand a sample about fragment. For this line , concretely: [CODE] where [CODE] and the layout.xml is as follows: [CODE] My problem is why method findFragmentById that receives an argument of FrameLayout will return an object of Fragment in a way like type casting? However, FrameLayout exten...
java|android|android-layout|android-fragments
0
2020-02-08T03:05:45.633Z
2,020
2
3
5
90
1
412
28
4
3
true
false
false
false
false
false
zero
60,123,732
Cannot fit requested classes in a single dex file (# methods: 156179 > 65536) on Dialogflow SDK
<p>I'm following a 2018 tutorial on how to implement dialogflow on android app. But then when I follow that tutorial, I stumble upon a problem when putting the dependencies.</p> <p>This is what my build.gradle file looks like </p> <pre><code> android { compileSdkVersion 29 buildToolsVersion "29.0.2" defau...
I'm following a 2018 tutorial on how to implement dialogflow on android app. But then when I follow that tutorial, I stumble upon a problem when putting the dependencies. This is what my build.gradle file looks like [CODE] I got an error message saying Cannot fit requested classes in a single dex file (# methods: 15617...
android|dialogflow-es
0
2020-02-08T03:41:47.217Z
2,020
2
3
5
116
1
716
95
2
1
true
false
false
false
false
false
zero
60,123,788
Comparing Text Fields Value
<p>using the Internet, Android Studio, and your current knowledge of Android app development, create an Android app project that has two (2) text fields and one (1) button. The button will compare the input from the text fields and display a response (SAME if values are the same and NOT THE SAME if they are not) if it ...
using the Internet, Android Studio, and your current knowledge of Android app development, create an Android app project that has two (2) text fields and one (1) button. The button will compare the input from the text fields and display a response (SAME if values are the same and NOT THE SAME if they are not) if it is ...
android|android-studio|compare|textfield
-2
2020-02-08T03:55:13.117Z
2,020
2
3
5
586
1
375
27
4
0
false
false
false
false
false
true
negative
60,123,839
Custome bottom navigation bar in android
<p>I just want to create a bottom navigation bar like this. I'm not able to create that overflow button in the middle. How can I design the xml layout...pls help me... <a href="https://i.stack.imgur.com/1zqdP.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1zqdP.jpg" alt="enter image description her...
I just want to create a bottom navigation bar like this. I'm not able to create that overflow button in the middle. How can I design the xml layout...pls help me...
java|android|xml
0
2020-02-08T04:08:18.643Z
2,020
2
4
5
84
0
164
40
3
0
false
true
false
false
false
false
zero
60,123,906
Alert Dialog with EditText and positive negative button
<p>I am trying to create a DialogFragment as </p> <pre><code> public class PlaceFragment extends DialogFragment { public PlaceFragment() { } public static PlaceFragment newInstance() { PlaceFragment placeFragment = new PlaceFragment(); Bundle args = new Bundle(); args.putD...
I am trying to create a DialogFragment as [CODE] which should be called as: [CODE] But, as you can see, this is not working,as this is obviously showing the layout only, which is inflated. But I am trying to get the dialog with two line of EditText with Ok and Dissmiss button. If I use a completely manual way, then I a...
android|android-dialogfragment
0
2020-02-08T04:25:00.873Z
2,020
2
4
5
65
3
417
55
2
3
true
false
false
false
false
false
zero
60,124,036
How do I deeplink into an iOS device from the terminal?
<p>From the terminal machine, I could deeplink into an android device or simulator using</p> <p><code>adb shell am start -a android.intent.action.VIEW -d "myurl"</code></p> <p>For iOS, the below could deeplink into the Simulator </p> <p><code>xcrun simctl openurl booted "myurl"</code> </p> <p>What about for iOS dev...
From the terminal machine, I could deeplink into an android device or simulator using adb shell am start -a android.intent.action.VIEW -d "myurl" For iOS, the below could deeplink into the Simulator xcrun simctl openurl booted "myurl" What about for iOS devices connecting to terminal? I search and can't find anywhere s...
android|ios|iphone
4
2020-02-08T04:53:05.340Z
2,020
2
4
5
376
0
326
55
3
0
false
true
false
false
false
false
low
60,124,059
is there any way to find fragment id
<p>I want to use fragment's adapter to activity. and I'm trying to access this</p> <pre><code> HomeFragment fragment = (HomeFragment) getFragmentManager().findFragmentById(R.id.); </code></pre> <p>but I'm using this method to replace the fragments to the one frame.</p> <pre><code> public void replaceFragment(Fragmen...
I want to use fragment's adapter to activity. and I'm trying to access this [CODE] but I'm using this method to replace the fragments to the one frame. [CODE]
android|android-fragments
0
2020-02-08T04:59:51.640Z
2,020
2
4
5
453
1
158
36
2
2
true
false
false
false
false
false
zero
60,124,080
Filter or Search JSON Data
<p>I have created a filterable method in my adapter class. The plan is for this method to allow the user to filter through the JSON data for a specific article. Everything looks right to me but when I run the application it crashes. I am still a bit new to programming so I don't know if this code is the issue or not. A...
I have created a filterable method in my adapter class. The plan is for this method to allow the user to filter through the JSON data for a specific article. Everything looks right to me but when I run the application it crashes. I am still a bit new to programming so I don't know if this code is the issue or not. Any ...
java|android|json|search|filter
0
2020-02-08T05:06:18.467Z
2,020
2
5
5
57
0
545
26
5
4
true
true
false
false
false
false
zero
60,124,109
Show custom interstitial ad like as admob interstitial ad
<p>We are currently using admob's interstitial ad in our app. What we have in our first splash screen is:</p> <pre><code> @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.LOLLIPOP) { Window window = ge...
We are currently using admob's interstitial ad in our app. What we have in our first splash screen is: [CODE] I requested interstitial from onCreate() in our splash screen. Notice that in interstitial ad in onAdLoaded() I started MainActivity.class via intent and this will definitely start that screen without closing i...
android|interstitial
1
2020-02-08T05:13:25.250Z
2,020
2
5
5
232
0
1,254
57
2
3
true
true
false
false
false
false
low
60,124,133
Android LiveData: How to avoid data transfer from the database when an app is re-opened from the background?
<p>My Android app is listening on a Firebase Database. Whenever my activity becomes inactive, I stop the listener, and when the activity becomes active again, I restart listening. This is done using LiveData and the 'onActive' and 'onInactive' methods as below:</p> <pre><code>@Override protected void onActive() { ...
My Android app is listening on a Firebase Database. Whenever my activity becomes inactive, I stop the listener, and when the activity becomes active again, I restart listening. This is done using LiveData and the 'onActive' and 'onInactive' methods as below: [CODE] Using the debugger, I have noticed that when I press t...
android|firebase|firebase-realtime-database|android-livedata
0
2020-02-08T05:18:01.703Z
2,020
2
5
5
95
2
770
108
4
1
true
false
false
false
false
false
zero
60,124,173
adobe phonegap Google Maps not displaying
<p>I have a an app I wrote in javascript and html and I am trying to import it into adobe phone gap to make an android app. My config.xml looks liek this:</p> <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt; &lt;widget id="net.seekadventure" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http:/...
I have a an app I wrote in javascript and html and I am trying to import it into adobe phone gap to make an android app. My config.xml looks liek this: [CODE] When I install my app My google map shows very quickly for a quick instant and then it disappears and says: "Oops! Something went wrong. This page didn't load go...
android|phonegap-plugins|phonegap-build|phonegap-cli
0
2020-02-08T05:24:43.940Z
2,020
2
5
5
20
1
598
41
4
1
true
false
false
false
false
false
zero
60,124,182
How to add dynamic array to RecycleView
<p>I have an activity that I'm trying to get data from API and show the list there but I cannot get my data in the <code>adapter</code>.</p> <h1>Code</h1> <p><code>MainActivity.kt</code></p> <pre><code>override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView...
I have an activity that I'm trying to get data from API and show the list there but I cannot get my data in the adapter . Code MainActivity.kt [CODE] CategoriesAdapter.kt [CODE] Category.kt [CODE] activity_main.xml [CODE] categries_row.xml [CODE] Question what should I put in categories.adapter = CategoriesAdapter(//wh...
android|kotlin
0
2020-02-08T05:26:10.150Z
2,020
2
5
5
97
1
367
39
2
5
true
false
false
false
false
false
zero
60,124,238
Why my design gets disappear when I use <TouchableWithoutFeedback>?
<pre><code> &lt;View style={{flex:1}} &gt; &lt;ImageBackground source={require('../images/back02.png')} style={styles.bgscreen} onPress={Keyboard.dismiss} &gt; &lt;KeyboardAvoidingView behavior='position'&gt; &lt;Image style={styles.headIm...
[CODE] If I remove <TouchableWithoutFeedback> then everything is fine. Help me. Don't ask for the Child Component code. No need to know about that. Everything is fine there. I am just having a problem with the <TouchableWithoutFeedback> I have imported import { TouchableWithoutFeedback } from 'react-native-gesture-hand...
android|ios|reactjs|react-native|react-redux
0
2020-02-08T05:37:28.953Z
2,020
2
5
5
543
3
361
67
5
1
true
false
false
false
false
false
zero
60,124,248
"java.net.SocketException: Software caused connection abort" For no particular reason 30 seconds after socket connection
<p>I am facing a strange issue with Android's airplane mode and a <code>Socket</code> exception 30 seconds after opening a new <code>Socket</code> connection.</p> <p>Here's what I do on my app that creates an issue:</p> <ol> <li>Have an opened <code>Socket</code> connection and turn on and off airplane mode.</li> <li...
I am facing a strange issue with Android's airplane mode and a Socket exception 30 seconds after opening a new Socket connection. Here's what I do on my app that creates an issue: Have an opened Socket connection and turn on and off airplane mode. Reopen a new Socket connection with the server. Wait 30 seconds and get ...
android|sockets|kotlin
0
2020-02-08T05:39:11.200Z
2,020
2
5
5
619
1
762
120
3
0
false
false
false
false
false
false
zero
60,124,333
why the error thrown from callable cloud function does not trigger on failure listener?
<p>so I have callable cloud function like this:</p> <pre><code>exports.verifiedUserDeactivateTheEvent = functions.https.onCall(async (data, context) =&gt; { const eventID = data.eventID const verifiedUserID = context.auth.uid try { // check user const verifiedUserDocumentSnapshot = await db.doc(`...
so I have callable cloud function like this: [CODE] if the user is invalid or unauthorized then it will throw httpsError message 'Invalid User' I use this in callable function in my Android app [CODE] and use it like this [CODE] I expect that error message will be shown on onFailureListener , but that error string mess...
android|firebase|google-cloud-functions
0
2020-02-08T05:55:59.153Z
2,020
2
5
5
83
1
516
87
3
3
true
false
false
false
false
false
zero
60,124,444
Prevent ads from showing in background (Android Studio)
<p>so iv'e set my ad to show after every 5 minutes but the problem is that my app shows Ad even after my app is in background and i am using another app or just like keep the app at background. I want my app Ads to stop showing after i put the app on background (My Ads don't show after i close app which is fine, but in...
so iv'e set my ad to show after every 5 minutes but the problem is that my app shows Ad even after my app is in background and i am using another app or just like keep the app at background. I want my app Ads to stop showing after i put the app on background (My Ads don't show after i close app which is fine, but in ba...
java|android|android-studio|admob
0
2020-02-08T06:19:39.343Z
2,020
2
6
5
353
1
350
55
4
1
true
false
false
false
false
false
zero
60,124,478
android- how to use ViewModelProviders in custom dialog class
<p>I've a custom dialog class , this is my code :</p> <pre><code>class DialogBimegozar_new(act: Activity){ private var dialog: Dialog private var act: Activity private lateinit var viewModel:BimeGozarViewModel init { dialog = Dialog(act, R.style.DialogStyler); dialog.requestWindowFeature(Window.FEATURE_NO_TIT...
I've a custom dialog class , this is my code : [CODE] I want to use my viewmodel in my class , I've an error in this line : [CODE] the error is : non of the following option can be called with the argument supplied of (Fragment) defined... of (fragmentActivity) defined.... act in above code is my activity what is the p...
android|android-dialog|android-viewmodel
1
2020-02-08T06:27:53.067Z
2,020
2
6
5
872
1
373
61
3
2
true
false
false
false
false
false
low
60,124,493
error: cannot find symbol method getMap()
<p>I have this error: "cannot find symbol method getMap()" please help me to solve it,i use the initilizeMap() function to load map. If map is not created it will create it for you</p> <pre><code> private void initilizeMap() { if (googleMap == null) { googleMap = ((MapFragment) getFragme...
I have this error: "cannot find symbol method getMap()" please help me to solve it,i use the initilizeMap() function to load map. If map is not created it will create it for you [CODE]
java|android|android-studio
0
2020-02-08T06:30:28.437Z
2,020
2
6
5
75
0
184
41
3
1
true
true
false
false
false
false
zero
60,124,576
FileSystemNotFoundException: Provider "gs" not installed (Android)
<p>I'm attempting to connect to a public Google cloud storage bucket, using code based upon the example provided by Google at <a href="https://github.com/googleapis/java-storage-nio" rel="nofollow noreferrer">https://github.com/googleapis/java-storage-nio</a> under 'Quickstart' and 'Accessing Files'</p> <p>I added the...
I'm attempting to connect to a public Google cloud storage bucket, using code based upon the example provided by Google at https://github.com/googleapis/java-storage-nio under 'Quickstart' and 'Accessing Files' I added the following line to my app module's build.gradle (Google's documentation says to use 'compile', but...
android|google-cloud-storage
0
2020-02-08T06:45:21.223Z
2,020
2
6
5
425
0
1,069
66
2
2
true
true
false
false
false
false
zero
60,124,606
Android:How do I display data from multiple array of strings in a local JSON file?
<p>I have been trying to populate my listView from a local JSON file. The JSON file has multiple arrays of strings so I had to use the for loop multiple times but the problem now is, when I run my app, it only repeats the details of the first JSON object(id1 i.e. i=1) leaving out the rest. Any help would be much apprec...
I have been trying to populate my listView from a local JSON file. The JSON file has multiple arrays of strings so I had to use the for loop multiple times but the problem now is, when I run my app, it only repeats the details of the first JSON object(id1 i.e. i=1) leaving out the rest. Any help would be much appreciat...
java|android|json
1
2020-02-08T06:51:45.677Z
2,020
2
6
5
69
1
778
82
3
3
true
false
false
false
false
false
low
60,124,661
java.lang.RuntimeException: android.view.InflateException
<p>This is my XML file I dont know i am getting an error as </p> <blockquote> <pre><code> Caused by: android.view.InflateException: Binary XML file line #18 in com.example.booking_xml:layout/activity_main: Binary XML file line #18 in com.example.booking_xml:layout/activity_main: Error inflating class TextView Caused ...
This is my XML file I dont know i am getting an error as [CODE] I was trying to create nested layout in linear layout can someone please help why this error is coming I have also attached my xml file to have a look at it. If I am commenting the first textview then error show onto next textview I have taken reference fr...
android|android-layout
0
2020-02-08T07:01:09.750Z
2,020
2
7
5
54
1
395
57
2
2
true
false
false
false
false
false
zero
60,124,756
How can I solve this problem? Android studio update error.. jre/bin/java.exe is absent
<p><a href="https://i.stack.imgur.com/7OGKT.png" rel="nofollow noreferrer">enter image description here</a></p> <p>I want to update the latest version in android studio, but I have this problem lol... So, I try to copy java.exe(in C:\Program Files\Java\jdk1.8.0_221\jre\bin) to C:\Program Files\Android\Android Studio1\...
enter image description here I want to update the latest version in android studio, but I have this problem lol... So, I try to copy java.exe(in C:\Program Files\Java\jdk1.8.0_221\jre\bin) to C:\Program Files\Android\Android Studio1\jre\bin, But, the update isn't still working... enter image description here how can I ...
java|android
1
2020-02-08T07:17:05.077Z
2,020
2
7
5
1,198
1
339
86
2
0
false
false
false
false
false
false
low
60,124,763
How to get specific date of the month programmatically?
<p>How to get specific date of the month in android programmatically? Example, i want to get 23 april 2020 as a string or int and put it inside "if" statement.</p> <p>Example </p> <pre><code>if("23 april 2020"){ // some code } else if ("24 april 2020"){ // some code } </code></pre>
How to get specific date of the month in android programmatically? Example, i want to get 23 april 2020 as a string or int and put it inside "if" statement. Example [CODE]
android|date|if-statement|calendar|android-calendar
-1
2020-02-08T07:18:01.923Z
2,020
2
7
5
652
3
171
55
5
1
true
false
false
false
false
true
negative
60,124,766
Back Button in fragment opens up and closes navigation drawer instead of going back
<p>I have a navigation drawer which is working absolutely fine with drawer icon, however, if I move from navigation drawer activity to any of my fragment, back arrow is also displayed but on clicking of back arrow navigation drawer opens, I just want to set my action on back button click instead of an opening drawer. P...
I have a navigation drawer which is working absolutely fine with drawer icon, however, if I move from navigation drawer activity to any of my fragment, back arrow is also displayed but on clicking of back arrow navigation drawer opens, I just want to set my action on back button click instead of an opening drawer. Plea...
android|android-fragments|navigation-drawer|android-drawer|android-fragmentscenario
3
2020-02-08T07:18:37.173Z
2,020
2
7
5
130
0
638
83
5
2
true
true
false
false
false
false
low