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
44,206,420
Java Inheritance Dilemma
<p>I'm currently working on an Android SDK with essentially two variations, base variation (for third-party developers) and privileged variation (to be used internally).</p> <p>The privileged SDK just adds additional functionality that the third-party developers do not have direct access to.</p> <p>My idea was to use...
I'm currently working on an Android SDK with essentially two variations, base variation (for third-party developers) and privileged variation (to be used internally). The privileged SDK just adds additional functionality that the third-party developers do not have direct access to. My idea was to use macros to selectiv...
java|android|inheritance
0
2017-05-26T16:41:32.453Z
2,017
5
16
4
43
3
1,320
24
3
2
true
false
false
false
false
false
zero
44,166,245
how to retrieve the firebase database values only once without listening to childvalues even though they have changed
<p>I have this scenario where in my app i am trying to query the child nodes and pass it on the list to recyclerview adapter and here comes the problem when i am scrolling up the recycler view items and if some one has inserted a post, my recyclerview is again coming to first post item and also i am using the viewpager...
I have this scenario where in my app i am trying to query the child nodes and pass it on the list to recyclerview adapter and here comes the problem when i am scrolling up the recycler view items and if some one has inserted a post, my recyclerview is again coming to first post item and also i am using the viewpager wi...
android|firebase|firebase-realtime-database|android-recyclerview|fragmentstatepageradapter
2
2017-05-24T18:40:00.277Z
2,017
5
18
2
1,835
3
1,002
117
5
1
true
false
false
false
false
false
low
43,965,306
How to find out the current (top) Activity from onMessageReceived (of FirebaseMessagingService)?
<p>I have been searching everywhere but just can't figure <strong>how to get the current (top) activity of a running Android application</strong>.</p> <p>Alright, my scenario is I received a Firebase Cloud Messaging <strong>Data payload</strong> while the app is in the foreground and the <strong>​onMessageReceived</st...
I have been searching everywhere but just can't figure how to get the current (top) activity of a running Android application . Alright, my scenario is I received a Firebase Cloud Messaging Data payload while the app is in the foreground and the ​onMessageReceived (of a subclass of FirebaseMessagingService) is invoked....
android|firebase|push-notification|firebase-cloud-messaging|android-push-notification
2
2017-05-14T14:52:59.160Z
2,017
5
14
6
3,627
3
604
96
5
0
false
false
true
false
false
false
low
44,223,935
Using the right dpi on vector icons
<p>I'm new on android studio and planning to design an app for tablets and phones. Therefore my app will be mostly used on normal and large screens.</p> <ul> <li>Which dpi is best for my vector icons ?</li> <li>Should I make different dpi versions of the same icon for multiple screen support ?</li> <li>Why only making...
I'm new on android studio and planning to design an app for tablets and phones. Therefore my app will be mostly used on normal and large screens. Which dpi is best for my vector icons ? Should I make different dpi versions of the same icon for multiple screen support ? Why only making the icons wrap_content doesnt supp...
android|svg|icons|android-vectordrawable
0
2017-05-28T04:55:13.170Z
2,017
5
4
6
1,070
3
414
35
4
0
false
false
false
false
false
false
zero
44,057,578
HEX to RGB converter, Android Studio
<p>I have alredy done the converter RGB to HEX but i don't find the function to do the HEX to RGB converter. For the RGB to HEX converter i have used 3 seekbar and I've done the project(like the code).</p> <p>But now i want to use a seekbar that have only the HEX value for HEX to RGB converter.But I don't find the rig...
I have alredy done the converter RGB to HEX but i don't find the function to do the HEX to RGB converter. For the RGB to HEX converter i have used 3 seekbar and I've done the project(like the code). But now i want to use a seekbar that have only the HEX value for HEX to RGB converter.But I don't find the right function...
android-studio
0
2017-05-18T20:52:56.127Z
2,017
5
20
3
3,118
3
338
36
1
0
false
false
true
false
false
false
zero
44,237,505
android- support library BottomNavigationView not showing titles
<p>I'm using android support design widget BottomNavigationView for making my bottom navigation items. this is the result of the job : <a href="https://i.stack.imgur.com/P0rtr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/P0rtr.png" alt="enter image description here"></a></p> <p>it has 2 problems ...
I'm using android support design widget BottomNavigationView for making my bottom navigation items. this is the result of the job : it has 2 problems , first it doesn't show the titles under the items, the second problem I want the items to fill the with , I don't want to have free space on the navigation ,I just want ...
android|android-support-library|android-support-design|android-bottomnav
3
2017-05-29T08:07:26.267Z
2,017
5
8
0
3,630
3
465
64
4
2
true
false
true
false
false
false
low
43,929,209
Check whether a user used facebook sdk to login into app previously
<p>Currently I have a code where I have a facebook login button in my login page. And right now I'm trying to make a check first whether a user already logged in into my app using facebook when the facebook login button is clicked. I read the facebook documentation <a href="https://developers.facebook.com/docs/referenc...
Currently I have a code where I have a facebook login button in my login page. And right now I'm trying to make a check first whether a user already logged in into my app using facebook when the facebook login button is clicked. I read the facebook documentation here on how to do it but I have no idea where to apply th...
java|android|facebook|facebook-graph-api
0
2017-05-12T04:18:11.180Z
2,017
5
4
4
47
3
353
67
4
1
true
false
false
false
false
false
zero
44,364,152
when i try to register by my app i didn't get any respnse
<p>I am trying to save my data to server. can any one help me?</p> <p>when i am trying to save data through browser it is working fine but when i try it through this code doesn'n give any response??</p> <pre><code>public class Register extends AppCompatActivity implements View.OnClickListener { private static final ...
I am trying to save my data to server. can any one help me? when i am trying to save data through browser it is working fine but when i try it through this code doesn'n give any response?? [CODE] Here Is my server code.... [CODE]
java|android|android-volley
1
2017-06-05T07:48:21.407Z
2,017
6
7
0
47
3
229
57
3
2
true
false
false
false
false
false
low
43,998,410
Java country code. Make the first character always appear
<p>I wanna to make a country code text field. When user click text field, there preset a "+" at the first. Also, that "+" cannot be deleted. How can I make this happen. </p>
I wanna to make a country code text field. When user click text field, there preset a "+" at the first. Also, that "+" cannot be deleted. How can I make this happen.
java|android|string
-3
2017-05-16T10:05:37.677Z
2,017
5
10
1
48
3
165
57
3
0
false
false
false
false
false
true
negative
44,046,199
Split arraylist item value and put each item in different array
<p>I have one <code>ArrayList</code> value each item have <code>"="</code> symbol I want to <code>split</code> the symbol and <code>add</code> each in different <code>ArrayList</code>. I try many ways to split but not working exact my requirements.</p> <pre><code>Below my ArrayList value [COOL 35x1=AED 35, COOL PR...
I have one ArrayList value each item have "=" symbol I want to split the symbol and add each in different ArrayList . I try many ways to split but not working exact my requirements. [CODE]
android|string|arraylist
-1
2017-05-18T11:13:15.400Z
2,017
5
11
3
816
3
188
63
3
1
true
false
false
false
false
true
negative
44,201,136
What is the ViewStub inside DecorView?
<p>I found that under <code>decorView</code>, with or without title or <code>ActionBar</code>, <code>ViewStub</code> would exist. </p> <p>What's the use of it?</p> <p><a href="https://i.stack.imgur.com/vUncb.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vUncb.jpg" alt="enter image description her...
I found that under decorView , with or without title or ActionBar , ViewStub would exist. What's the use of it?
android|viewstub
2
2017-05-26T12:02:26.157Z
2,017
5
12
4
816
3
111
38
2
0
false
false
false
false
false
false
low
44,194,482
How to download a file if filename contains space or %20
<p>I am able to download file using URL Connection but if my filename contains space or %20 then i am unable to download file.</p> <p>Here is my code..</p> <pre><code>class DownloadFileFromURL extends AsyncTask&lt;String, String, String&gt; { /** * Before starting background thread Show Progress Bar Dialog ...
I am able to download file using URL Connection but if my filename contains space or %20 then i am unable to download file. Here is my code.. [CODE] Asynk task Execution [CODE]
android
0
2017-05-26T05:50:27.160Z
2,017
5
5
4
817
3
176
56
1
2
true
false
false
false
false
false
zero
44,340,397
should I install android virtual device or use mobile for debugging?
<p>I'm new android development. I need to choose a device to run my app. So that what is the best way. Somebody told me that ,AVD will slow down your Mac. ( My android phone is Moto G4 Plus ) So Suggest me what should I choose ?</p>
I'm new android development. I need to choose a device to run my app. So that what is the best way. Somebody told me that ,AVD will slow down your Mac. ( My android phone is Moto G4 Plus ) So Suggest me what should I choose ?
android-studio|debugging|avd
1
2017-06-03T04:51:09.950Z
2,017
6
4
5
3,889
3
225
68
3
0
false
false
true
false
false
false
low
44,310,170
Tracking when an Android App is open
<p>I want to track the usage of my app. Every time it's open on the device it sets a String that it's open for that day. If the user closes the app and opens it again in the same day, new value isn't send to server. So, I'm clean on this part. The part that is unknown to me is how can I test when the app is open. One s...
I want to track the usage of my app. Every time it's open on the device it sets a String that it's open for that day. If the user closes the app and opens it again in the same day, new value isn't send to server. So, I'm clean on this part. The part that is unknown to me is how can I test when the app is open. One solu...
android|usage-tracking
0
2017-06-01T14:23:53.793Z
2,017
6
14
3
306
3
521
36
2
0
false
false
false
false
false
false
zero
44,249,733
How to control the width of a recyclerview object
<p>So im building and app for school abour series and movies and Im using recyclerview, but each card ocuppies the full with of the screen and then scrolls right and left: <a href="https://i.stack.imgur.com/HtTPk.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HtTPk.jpg" alt="enter image description ...
So im building and app for school abour series and movies and Im using recyclerview, but each card ocuppies the full with of the screen and then scrolls right and left: i've search all over internet and no idea how to get it to work like: My recycler_view.xml is the following: [CODE] and my main layout: [CODE] and this...
android|android-layout|android-recyclerview
1
2017-05-29T20:08:47.860Z
2,017
5
20
0
3,123
3
483
49
3
3
true
false
true
false
false
false
low
43,927,125
Glide (bitmapTransform) - Can't get context
<p>I have problem with using glide-bitmapTransform Every time, I try using bitmapTransform, the RedLine came below context. It doesn't matter BlurTransformation, CropCircleTransformation, GrayscaleTransformation, or others.</p> <p>Here is my Code</p> <pre><code> Glide.with(mcontext) .load(R.drawa...
I have problem with using glide-bitmapTransform Every time, I try using bitmapTransform, the RedLine came below context. It doesn't matter BlurTransformation, CropCircleTransformation, GrayscaleTransformation, or others. Here is my Code [CODE] .bitmapTransform(new BlurTransformation(mcontext,8)) <- that context is my p...
android|android-glide
0
2017-05-11T23:27:58.667Z
2,017
5
23
3
1,844
3
504
43
2
1
true
false
false
false
false
false
zero
44,177,276
Android Studio. How export Live Template to file?
<p>Android Studio 2.3.2. I want to export <strong>Live Templates-->AndroidLog</strong> to file. <a href="https://i.stack.imgur.com/ePGLT.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ePGLT.png" alt="enter image description here"></a></p> <p>How I can do this? Thanks.</p>
Android Studio 2.3.2. I want to export Live Templates-->AndroidLog to file. How I can do this? Thanks.
android-studio
13
2017-05-25T09:43:14.763Z
2,017
5
9
3
4,660
3
102
49
1
0
false
false
true
false
true
false
medium
44,239,860
android app connect to mysql with PHP
<p>I have no idea of php but the code should be something like this ` <pre><code>$con = mysqli_connect($host_name, $user_name, $user_pass, $db_name); if($con) { $image = $_POST ["image"]; $name = $_POST ["name"]; $sql = "insert into imageinfo(name) values('$name')"; $upload_path = "uploads/$name.jpg"; if(mysqli...
I have no idea of php but the code should be something like this ` [CODE] I'm getting an error of unidentified objets image and name from ($image = $_POST ["image"]..) . If I use if(isset) I get the below response: Image upload failed2
php|android|image
1
2017-05-29T10:09:41.787Z
2,017
5
10
0
53
3
235
37
3
1
true
false
false
false
false
false
low
44,331,832
Android: When adding several images to a LinearLayout, the last image does not appear
<p>I created a custom adapter that has a linear layout and i am trying to add some images to it dynamically. All images are successfully inserted except for the last one.</p> <p>EDIT: The last image is added to the LinearLayout but it doesn't appear for some reason!</p> <pre><code>public View getView(int position, Vi...
I created a custom adapter that has a linear layout and i am trying to add some images to it dynamically. All images are successfully inserted except for the last one. EDIT: The last image is added to the LinearLayout but it doesn't appear for some reason! [CODE]
android
0
2017-06-02T14:54:19.433Z
2,017
6
14
4
53
3
263
85
1
1
true
false
false
false
false
false
zero
44,267,340
Logout from Spotify with the sdk spotify-android-auth
<p>I have an Android app, which the user can link to Spotify, with : AuthenticationClient.openLoginActivity(getActivity(), SPOTIFY_REQUEST_CODE, request);</p> <p>The problem is that I want the user to change his Spotify account so I want to logout the user from Spotify to log with another account. But the data of the ...
I have an Android app, which the user can link to Spotify, with : AuthenticationClient.openLoginActivity(getActivity(), SPOTIFY_REQUEST_CODE, request); The problem is that I want the user to change his Spotify account so I want to logout the user from Spotify to log with another account. But the data of the connection ...
android|sdk|token|spotify|logout
2
2017-05-30T16:21:13.157Z
2,017
5
16
1
822
3
837
53
5
0
false
false
false
false
false
false
low
44,298,191
Error:Failed to resolve: com.firebaseui:firebase-ui-auth:1.2.0 on libgdx build.gradle
<p>i'm trying to add a login with Google on my game. To do that i decide to use FirebaseUI (<a href="https://github.com/firebase/FirebaseUI-Android" rel="nofollow noreferrer">https://github.com/firebase/FirebaseUI-Android</a>). But i'm having problems to sync my Gradle file. i'm reciving the error: Error:Failed to reso...
i'm trying to add a login with Google on my game. To do that i decide to use FirebaseUI ( https://github.com/firebase/FirebaseUI-Android ). But i'm having problems to sync my Gradle file. i'm reciving the error: Error:Failed to resolve: com.firebaseui:firebase-ui-auth:1.2.0 here is my build.gradle (Project) [CODE] And ...
android|firebase|libgdx|firebaseui
0
2017-06-01T03:47:06.057Z
2,017
6
3
3
1,338
3
363
85
4
2
true
false
false
false
false
false
zero
44,061,565
Referencing views with the same id in different layouts with kotlin android extensions
<p>In my Android project I have two layouts: num_info and num_info_pack. Both have views with id "circle". So I thought referencing those views by layout_name.circle would solve the problem: </p> <pre><code>val inetView = activity.layoutInflater.inflate(R.layout.num_info_pack, parent, false) inetView.circle.setBac...
In my Android project I have two layouts: num_info and num_info_pack. Both have views with id "circle". So I thought referencing those views by layout_name.circle would solve the problem: [CODE] But circle is underlined with red and it says: Overload resolution ambiguity. All these functions match. public val View.circ...
android|kotlin|kotlin-android-extensions
8
2017-05-19T04:37:53.503Z
2,017
5
4
4
2,877
3
601
86
3
1
true
false
true
false
false
false
medium
44,094,900
Stop the audio when other is clicked
<pre><code>public class MainActivity extends AppCompatActivity { //Media Player Loops //Loops MediaPlayer dk1; MediaPlayer dk2; //Mediaplayer Location dk1 = MediaPlayer.create(this, R.raw.dholak01); dk2 = MediaPlayer.create(this, R.raw.dholak03); } //Looping and start Media Player ...
[CODE] There are two buttons in my UI ...These two buttons have two audio separately , I have mentioned it as dk1 and dk2. I want 1.To stop dk1 when dk2 is pressed 2.To repeat the procedure all time 3.I want to create another 6 audio like above dk1 and dk2 PROBLEM: I CANT PLAY LIKE THIS MORE THAT 1 TIME PLEASE HELP ME....
java|android|audio
2
2017-05-21T08:45:32.850Z
2,017
5
8
6
62
3
323
36
3
1
true
false
false
false
false
false
low
43,953,181
How to stop my preference screen giving a different font size to a custom made preference
<p>Currently my settings activity gives me two font sizes. One text size for all the predefined preferences and one for a custom preference. The preferences xml does look like this. The custom preference extended from Dialog Preference.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" d...
Currently my settings activity gives me two font sizes. One text size for all the predefined preferences and one for a custom preference. The preferences xml does look like this. The custom preference extended from Dialog Preference. [CODE] What is the reason for this? Since none of the preferences has a predefined tex...
android|android-preferences
0
2017-05-13T12:30:06.993Z
2,017
5
12
5
318
3
391
89
2
1
true
false
false
false
false
false
zero
44,257,299
In android, how can I send a string to a menu item method?
<p>I'm working on an android app where the user presses a button, a text is generated, then there is a menu option to share/export the text. </p> <p>Here are the relevant code parts (for clarity, I don't paste the entire code, but if you need anything just let me know)</p> <pre><code>FloatingActionButton button = (Fl...
I'm working on an android app where the user presses a button, a text is generated, then there is a menu option to share/export the text. Here are the relevant code parts (for clarity, I don't paste the entire code, but if you need anything just let me know) [CODE] My question: How can I actually send the string genera...
java|android|string|methods
1
2017-05-30T08:33:29.860Z
2,017
5
8
1
65
3
1,712
58
4
4
true
false
false
false
false
false
low
44,106,457
Saving switch button state isn't working
<p>I have a switch button for setting the sound of the app On and OFF, although it works normally but when I close the app then open it again.. the switch becomes <code>false</code> automatically..!? I've tried to save the last state via Shared Preference library <a href="https://github.com/orhanobut/hawk" rel="nofoll...
I have a switch button for setting the sound of the app On and OFF, although it works normally but when I close the app then open it again.. the switch becomes false automatically..!? I've tried to save the last state via Shared Preference library Hawk , but it not clear to me how to do it right.!? That's when I've tri...
android|sharedpreferences|toggle|togglebutton|android-togglebutton
0
2017-05-22T06:59:01.463Z
2,017
5
6
0
321
3
620
40
5
2
true
false
false
false
false
false
zero
44,083,492
Verify incoming registration data
<p>I've written an android app that requires users to register online. Is there a way to ensure incoming JSON registration data originated from my app? Thanks.</p>
I've written an android app that requires users to register online. Is there a way to ensure incoming JSON registration data originated from my app? Thanks.
php|android
1
2017-05-20T08:11:36.593Z
2,017
5
8
5
67
3
156
33
2
0
false
false
false
false
false
false
low
44,193,357
Fail to bind InAppBillingService when using IabHelper
<p>I'm currently developing a game and try to implement In-app billing V3 of Google Play. I had followed the In-app sample and used <code>IabHelper</code>. However, when running the app in device, something goes wrong. I found that after <code>mHelper.startSetup</code>, neither <code>onServiceDisconnected</code> nor <c...
I'm currently developing a game and try to implement In-app billing V3 of Google Play. I had followed the In-app sample and used IabHelper . However, when running the app in device, something goes wrong. I found that after mHelper.startSetup , neither onServiceDisconnected nor onServiceConnected was called. So I printe...
android|google-play|in-app-billing|in-app
1
2017-05-26T03:59:21.567Z
2,017
5
3
4
324
3
768
53
4
2
true
false
false
false
false
false
low
44,095,132
How to use Retrofit with RxJava when the status code is 400 to get me the error message?
<p>I used Retrofit with RxJava like this:</p> <pre><code> Retrofit retrofit = new Retrofit.Builder() .baseUrl(HttpURL.BASE_URL) .addCallAdapterFactory(RxJavaCallAdapterFactory.create()) .addConverterFactory(GsonConverterFactory.create()) .client(okHttpCli...
I used Retrofit with RxJava like this: [CODE] and when the request error, such as password is wrong, the status code is 400, and the error msg will int the errorBoby to get me just like {code: 1000, message: "password is wrong"}. However, the gons GsonConverterFactory will not fromJson in respone.getErrorBody , so I ch...
android|rx-java|retrofit2
1
2017-05-21T09:15:58.503Z
2,017
5
9
6
2,117
3
410
88
3
2
true
false
false
false
false
false
low
44,265,932
Android studio Gradle sync fails
<p>I recently had to reinstall Windows 10 on my laptop and only had the 32 bit Verizon available. After that I have had continuous problems with Android studio. I first installed the standard version (2.3) and it installed fine but I had to fiddle around with the jdk path it was using because apparently studio ships wi...
I recently had to reinstall Windows 10 on my laptop and only had the 32 bit Verizon available. After that I have had continuous problems with Android studio. I first installed the standard version (2.3) and it installed fine but I had to fiddle around with the jdk path it was using because apparently studio ships with ...
android|android-studio|gradle
1
2017-05-30T15:11:52.963Z
2,017
5
15
1
328
3
1,264
32
3
0
false
false
false
false
false
false
low
43,988,520
How to retrieve nested data to a java class?
<p>I´m trying to retrieve a nested data from real time database, the normal data it´s returning correctly, But the nested data is returning null. The problem it´s probably my receiver class. How can I make it work?</p> <p><a href="https://i.stack.imgur.com/xIAv4.png" rel="nofollow noreferrer"><img src="https://i.stack...
I´m trying to retrieve a nested data from real time database, the normal data it´s returning correctly, But the nested data is returning null. The problem it´s probably my receiver class. How can I make it work? And this are my classes: Receiver class [CODE] My query result [CODE] The result in Monitor is: [CODE] Parti...
android|firebase|firebase-realtime-database
0
2017-05-15T20:45:43.837Z
2,017
5
20
0
77
3
341
44
3
4
true
false
false
false
false
false
zero
44,236,518
Activity transition animation on root layout is executing on every EditText click
<p>I am applying reveal effect on activity transition, when the startActivity is called the activity displayed through reveal effect. Activity is register activity which contains 3 editText, a imageView and a button to take image.</p> <p>"<strong>The problem is whenever I select or click on editText the reveal effect ...
I am applying reveal effect on activity transition, when the startActivity is called the activity displayed through reveal effect. Activity is register activity which contains 3 editText, a imageView and a button to take image. " The problem is whenever I select or click on editText the reveal effect animation is apply...
android|android-layout|animation
1
2017-05-29T07:10:13.433Z
2,017
5
7
0
335
3
602
81
3
1
true
false
false
false
false
false
low
43,924,778
Displaced elements with LinearLayout
<p>I am making a simple calculator using <code>LinearLayout</code>. </p> <p>The problem is that it looks like this : </p> <p><a href="https://i.stack.imgur.com/FQuuQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FQuuQ.png" alt="enter image description here"></a></p> <p>Instead of like this: </p>...
I am making a simple calculator using LinearLayout . The problem is that it looks like this : Instead of like this: I simply want it to look like in the second image. I don't get why it doesn't. Please, can someone help me with this? Here's the pastie with the xml .
android|xml|android-layout
1
2017-05-11T20:15:49.177Z
2,017
5
20
3
80
3
266
36
3
0
false
false
false
false
false
false
low
71,977,184
Flutter Upgrade Breaks iOS Build
<p>After upgrading Flutter to 2.10.5 my XCode build is giving me:</p> <pre><code> Error output from Xcode build: ↳ objc[49279]: Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x1ee5a1eb0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versi...
After upgrading Flutter to 2.10.5 my XCode build is giving me: [CODE] This only happens run trying to run the app on to the simulator. When deploying to a physical device it runs fine. Does anyone have any suggestions? Here is my Flutter doctor: [CODE]
android|ios|xcode|flutter|upgrade
0
2022-04-23T05:44:05.843Z
2,022
4
5
5
520
3
252
32
5
2
true
false
false
false
false
false
zero
71,959,476
How can I generate a String in a function in a viewmodel and return to a fragment in Kotlin?
<p>I want to generate a String in a function in my viewmodel and send it to the fragment associated to this viewmodel as a LiveData, how can I do it?</p> <p>For example, my viewmodel:</p> <pre><code>class MaskViewModel : ViewModel() { var mask: MutableLiveData&lt;String&gt; = newQuestion() fun newQuestion(): ...
I want to generate a String in a function in my viewmodel and send it to the fragment associated to this viewmodel as a LiveData, how can I do it? For example, my viewmodel: [CODE] And the observer in my fragment: [CODE]
android|kotlin|viewmodel|observers
0
2022-04-21T18:45:07.723Z
2,022
4
18
3
268
3
220
92
4
2
true
false
false
false
false
false
zero
72,124,072
Async requests in Kotlin Android
<p>I often get an error <code>android.os.NetworkOnMainThreadException</code>, when I try get info from some api. I know that this problem is related to the main android thread, but I don't understand how to solve it - coroutines, async okhttp, or both? P.S I have a bad eng, sorry.</p> <p>My code:</p> <p>MainAtivity.kt<...
I often get an error android.os.NetworkOnMainThreadException , when I try get info from some api. I know that this problem is related to the main android thread, but I don't understand how to solve it - coroutines, async okhttp, or both? P.S I have a bad eng, sorry. My code: MainAtivity.kt [CODE] Api.kt [CODE]
android|kotlin|kotlin-coroutines|coroutinescope|kotlin-android
0
2022-05-05T08:21:28.233Z
2,022
5
8
3
275
3
311
32
5
2
true
false
false
false
false
false
zero
71,864,199
App launches 2 times while selecting dark mode
<p>I started to encounter this error when I upgraded the version of the project to androidx. I also upgraded the all implementation sdks. I upgraded min sdk from 16 to 19. Before making these upgrades, dark mode was working fine. After upgrading, if you start the application with dark mode selected, the application ope...
I started to encounter this error when I upgraded the version of the project to androidx. I also upgraded the all implementation sdks. I upgraded min sdk from 16 to 19. Before making these upgrades, dark mode was working fine. After upgrading, if you start the application with dark mode selected, the application opens ...
java|android|android-studio|darkmode|android-dark-theme
1
2022-04-13T21:53:26.003Z
2,022
4
21
2
280
3
504
46
5
7
true
false
false
false
false
false
low
71,846,055
How can i reset my autorization every time i relaunch the app Android
<p>I want to know how i can reset my autorisation every time a user relaunch the app if it's possible because i have a module who need for every launch of the app my permission needs to be empty.</p>
I want to know how i can reset my autorisation every time a user relaunch the app if it's possible because i have a module who need for every launch of the app my permission needs to be empty.
android
0
2022-04-12T16:17:41.083Z
2,022
4
16
1
33
3
192
69
1
0
false
false
false
false
false
false
zero
37,893,073
How to know changing data of postgresql in last 5 seconds
<p>I am developing an Odoo 8 (OpenERP) application. That application use postgresql database. In backend of Odoo 8, there is <strong>add sale order</strong> button. So, I want to know, how to know the changing data in the last 5 seconds? My need is I want to insert data from mobile apps. What tables that that changing?...
I am developing an Odoo 8 (OpenERP) application. That application use postgresql database. In backend of Odoo 8, there is add sale order button. So, I want to know, how to know the changing data in the last 5 seconds? My need is I want to insert data from mobile apps. What tables that that changing? Any query for do th...
android|postgresql|odoo-8
0
2016-06-18T03:54:55.123Z
2,016
6
3
5
258
4
451
57
3
0
false
false
false
false
false
false
zero
37,906,693
How get Button coordinate?
<p>I have a layout <code>activity_main.xml</code>: </p> <pre><code> &lt;Button android:id="@+id/button" android:layout_marginTop="50dp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal|top" android:...
I have a layout activity_main.xml : [CODE] How can i get Button's coordinate (x, y) on screen. for now I use: [CODE] but it return 0.0 , How can i achieve this. Thanks
android|android-view
0
2016-06-19T11:25:01.430Z
2,016
6
11
6
262
4
167
26
2
2
true
false
false
false
false
false
zero
38,014,048
Mockito on Android, Context.getString(id) and NullPointerException
<p>I've just started learning a Mockito testing framework, I followed official tutorial from: <a href="https://developer.android.com/training/testing/unit-testing/local-unit-tests.html" rel="noreferrer">developer.android.com</a></p> <p>The code is:</p> <pre><code>private static final String FAKE_STRING = "HELLO WORLD...
I've just started learning a Mockito testing framework, I followed official tutorial from: developer.android.com The code is: [CODE] I wrote following ClassUnderTest: [CODE] } and after running I'm getting NullPointerException: [CODE] When I replace android Context with my own class it works. Platform: IntelliJ IDEA Co...
android|unit-testing|testing|mockito
14
2016-06-24T12:59:17.753Z
2,016
6
12
4
13,831
4
372
66
4
3
true
false
true
true
true
false
medium
37,629,236
Android Google Maps API GPS location is changing even when device is at the same place
<p>I am using Google Maps API for my application. My GPS location is changing even when device is at the same place, the location is said to be updated every 6s and thus it keeps updating but it also moves a little with each update and sometimes a lot. My code is below. And I'll also add screenshots.</p> <pre><code>pa...
I am using Google Maps API for my application. My GPS location is changing even when device is at the same place, the location is said to be updated every 6s and thus it keeps updating but it also moves a little with each update and sometimes a lot. My code is below. And I'll also add screenshots. [CODE] } Do remember ...
android|google-maps|gps|locationlistener
3
2016-06-04T10:43:31.903Z
2,016
6
10
5
2,572
4
412
86
4
1
true
false
false
false
false
false
low
37,961,948
Shared Element with scaleType centerCrop transition is jumpy
<p>I'm trying to implement a shared elements transition when 2 <code>ImageViews</code> from one screen go to the next screen. one of the images has a scaleType of <code>centerCrop</code> on both screen. The problem I'm facing is that when the transition starts the image is going to it's original size (before the crop) ...
I'm trying to implement a shared elements transition when 2 ImageViews from one screen go to the next screen. one of the images has a scaleType of centerCrop on both screen. The problem I'm facing is that when the transition starts the image is going to it's original size (before the crop) just before the animating it ...
android|crop|android-transitions|android-glide|shared-element-transition
14
2016-06-22T07:59:41.030Z
2,016
6
7
2
4,621
4
987
60
5
7
true
false
true
false
true
false
medium
37,777,143
How can I pass a variable between 2 activities?
<p>I am using mysql to retrieve a code into my Main Activity, which stores as a string. This works, but when I try to pass it to another activity, it just wont work. I may be wrong, but I'm passing it as I would do with a regular c# variable.</p> <p>Whats the correct way to pass variables (string, int) from one activi...
I am using mysql to retrieve a code into my Main Activity, which stores as a string. This works, but when I try to pass it to another activity, it just wont work. I may be wrong, but I'm passing it as I would do with a regular c# variable. Whats the correct way to pass variables (string, int) from one activity to anoth...
c#|android|mysql|xamarin
1
2016-06-12T17:32:42.577Z
2,016
6
17
6
1,550
4
323
47
4
0
false
false
false
false
false
false
low
37,858,419
can`t webview load html page from assets folder
<p>in my app not load html page from assets folder and not error are occur and screen are display as blank</p> <pre><code>webView = (WebView) findViewById(R.id.htmlviewer); webView.getSettings().setJavaScriptEnabled(true); webView.loadUrl("file:///android_asset/index.html"); setCont...
in my app not load html page from assets folder and not error are occur and screen are display as blank [CODE]
android|android-webview
0
2016-06-16T11:52:49.747Z
2,016
6
11
3
1,040
4
110
47
2
1
true
false
false
false
false
false
zero
38,014,882
How to run function with broadcastreceiver in Android?
<p>I have a function in activity I want to run this function with <code>broadcastreceiver</code>. How can I make this?</p> <pre><code>public class Myclass extends BroadcastReceiver{ @Override public void onReceive(Context context, Intent intent) { } } </code></pre> <p>This is my <code>broadcastreceiver</...
I have a function in activity I want to run this function with broadcastreceiver . How can I make this? [CODE] This is my broadcastreceiver class I want to run function which is in my activty please tell me with some code how to do this.
android|broadcastreceiver
0
2016-06-24T13:41:49.220Z
2,016
6
13
4
275
4
237
54
2
1
true
false
false
false
false
false
zero
37,692,805
GCM notification cannot show when the app is closed after install before receiving any notification in com.google.android.gms:play-services-gcm:9.0.0
<p>I am testing the sample project for gcm notification from google <a href="https://developers.google.com/cloud-messaging/android/start" rel="nofollow">https://developers.google.com/cloud-messaging/android/start</a></p> <p>This project is using com.google.android.gms:play-services-gcm:9.0.0</p> <p>After I install th...
I am testing the sample project for gcm notification from google https://developers.google.com/cloud-messaging/android/start This project is using com.google.android.gms:play-services-gcm:9.0.0 After I install the app to my phone via android studio. I kill the app from my phone(not force kill from setting). Then, I tri...
android|notifications|google-cloud-messaging
1
2016-06-08T03:37:49.783Z
2,016
6
3
2
533
4
913
149
3
1
true
false
false
false
false
false
low
37,852,018
Facebook account kit - auto insert OTP code on OTP screen UI, android
<p>I am using Facebook AccountKit for OTP verification and it is working absolutely fine. </p> <p><strong>Requirement:</strong> To set OTP code on OTP verification screen automatically by reading incoming SMS. </p> <p><strong>Looking for:</strong> Is there any way that I can set text to OTP verification <a href="http...
I am using Facebook AccountKit for OTP verification and it is working absolutely fine. Requirement: To set OTP code on OTP verification screen automatically by reading incoming SMS. Looking for: Is there any way that I can set text to OTP verification screen programmatically? I didn't find any answer while searching fo...
android|facebook|account-kit
2
2016-06-16T07:01:45.363Z
2,016
6
7
3
2,838
4
475
69
3
0
false
false
true
false
false
false
low
37,804,838
How To differentiate two different Intent to same activity?
<p>Am new for android development i need to differentiate intent two different intent to same activity let me explain clearly i have one button when user press that button it will trigger to other activity in which it will carry some intent value from there based user will enter value based on that i will populate lis...
Am new for android development i need to differentiate intent two different intent to same activity let me explain clearly i have one button when user press that button it will trigger to other activity in which it will carry some intent value from there based user will enter value based on that i will populate listvie...
android|android-intent
1
2016-06-14T06:49:23.430Z
2,016
6
6
1
2,072
4
922
59
2
3
true
false
false
false
false
false
low
38,032,009
how to make click listener for images in horizontal ScrollView
<p>I m making an horizontal Scroll View to display images in Android app.But i dont know how to make click listener for each individual images.My code is</p> <pre><code> private Integer images[] = {R.drawable.mba, R.drawable.lifestylemin, R.drawable.jee,R.drawable.comic,R.drawable.defence}; // private ReaderView m...
I m making an horizontal Scroll View to display images in Android app.But i dont know how to make click listener for each individual images.My code is [CODE] I want to make individua click listener for each image so that i can perform different tast from different images. Thanxx in advance.
android
3
2016-06-25T19:05:15.687Z
2,016
6
19
5
1,566
4
291
62
1
1
true
false
false
false
false
false
low
38,038,034
Firebase on Android: How to check Firebase auth failed reason?
<p>I use Firebase on Android and Firebase Auth functions.</p> <p>I try <code>FirebaseAuth.signInWithEmailAndPassword</code> and in case it fails I want to know why the signIn process failed?</p> <p>The <code>signInWithEmailAndPassword</code> method has <code>addOnFailureListener</code> API. And I can catch the <code>...
I use Firebase on Android and Firebase Auth functions. I try FirebaseAuth.signInWithEmailAndPassword and in case it fails I want to know why the signIn process failed? The signInWithEmailAndPassword method has addOnFailureListener API. And I can catch the Exception (maybe FirebaseAuthException ) in onFailure callback m...
android|firebase|firebase-authentication
17
2016-06-26T11:26:43.273Z
2,016
6
11
6
25,375
4
879
62
3
1
true
false
true
true
true
false
medium
37,697,742
Keyboard hides content for Android React Native webview
<p>I am using React Native's <code>&lt;WebView&gt;</code> component.</p> <p>The <a href="https://facebook.github.io/react-native/docs/webview.html" rel="nofollow">documentation</a> has no mention of how to handle the keyboard hiding the webview when the webview's HTML contains an <code>&lt;input&gt;</code> which becom...
I am using React Native's <WebView> component. The documentation has no mention of how to handle the keyboard hiding the webview when the webview's HTML contains an <input> which becomes focused on in Android. Has anyone managed to solve this? I have found a library that seems to work for regular <View> , but not a <We...
android|react-native|android-webview
3
2016-06-08T08:55:10.720Z
2,016
6
8
2
10,788
4
328
55
3
0
false
false
true
false
false
false
low
37,960,935
Use a text file stored in ASSETS folder
<p>I'm trying to understand the difference between data files stored in the assets folder and those stored in the res/raw folder. My goal is to have a data file stored in the app directory structure where (in this case) test scores are stored, they can be accessed and then they can be modified. It is my understanding...
I'm trying to understand the difference between data files stored in the assets folder and those stored in the res/raw folder. My goal is to have a data file stored in the app directory structure where (in this case) test scores are stored, they can be accessed and then they can be modified. It is my understanding that...
java|android|assets
1
2016-06-22T07:11:42.253Z
2,016
6
7
2
1,318
4
844
39
3
1
true
false
false
false
false
false
low
37,624,369
Android Studio Error: Error:CreateProcess error=216, This version of %1 is not compatible with the version of Windows you're running
<p>Installed Android Studio 2.2 Preview 2 and getting this error:</p> <blockquote> <p>Error:CreateProcess error=216, This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher</p> </blockquote> <p>Screenshot: <a h...
Installed Android Studio 2.2 Preview 2 and getting this error: Error:CreateProcess error=216, This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher Screenshot: I re-installed the JDK, still same issue. I even tri...
java|android|android-studio|java-8|android-studio-2.2
73
2016-06-03T22:31:13.550Z
2,016
6
22
4
206,630
4
379
132
5
0
false
false
true
true
true
false
high
37,894,424
How to generate JSON Stringer in Android for this format
<p>I need to send data to database in this format - </p> <pre><code>{"param1":"value1", "param2":"value2", "param3": {"username": "admin", "password": "123"}} </code></pre> <p>How to generate this using JSONStringer ?</p> <p>I tried this -</p> <pre><code>vm = new JSONStringer().object().key("param1").value("value1"...
I need to send data to database in this format - [CODE] How to generate this using JSONStringer ? I tried this - [CODE] But I'm getting this error - org.json.JSONException: Nesting problem at org.json.JSONStringer.beforeValue(JSONStringer.java:415)
java|android|json
4
2016-06-18T07:23:10.977Z
2,016
6
7
5
1,066
4
248
56
3
2
true
false
false
false
false
false
low
37,744,506
When ListView is ready?
<p>I want to change the background of a TextView, which is inserted in a ListView. The ListView contains a series of TextView, and the value of each one is retrieved from a simple List. Now I show you my snippet:</p> <pre><code>@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInst...
I want to change the background of a TextView, which is inserted in a ListView. The ListView contains a series of TextView, and the value of each one is retrieved from a simple List. Now I show you my snippet: [CODE] App.towns is the list of String I was talking, and its length is greater than 0. When the app is runnin...
android|listview
0
2016-06-10T09:19:32.880Z
2,016
6
9
4
299
4
564
23
2
1
true
false
false
false
false
false
zero
37,618,862
Using Bluetooth to create an RFID Tag
<p>I have read several articles that claim that it is not possible to emulate an RFID tag using a cell phone. I am curious if it is possible to use bluetooth to send out a beacon that is compatible with an existing RFID tag reader. It is said that RFID tags work on specific frequencies making it impossible to imitate...
I have read several articles that claim that it is not possible to emulate an RFID tag using a cell phone. I am curious if it is possible to use bluetooth to send out a beacon that is compatible with an existing RFID tag reader. It is said that RFID tags work on specific frequencies making it impossible to imitate with...
android|ios|bluetooth|rfid
-1
2016-06-03T16:00:09.447Z
2,016
6
16
4
2,605
4
496
37
4
0
false
false
true
false
false
true
negative
37,891,950
Android assets - not all folders/files packaged in APK
<p>I have problem with ASSETS folder in android. I put folders and files in ASSETS, and for some folders/files I got FileNotFoundException. Then I printed all folder/file names from ASSETS folder by code, and I saw that not all folders/files are packaged into APK. Why is that happening? All files and folders have names...
I have problem with ASSETS folder in android. I put folders and files in ASSETS, and for some folders/files I got FileNotFoundException. Then I printed all folder/file names from ASSETS folder by code, and I saw that not all folders/files are packaged into APK. Why is that happening? All files and folders have names wi...
android|apk|assets|filenotfoundexception
3
2016-06-17T23:59:45.610Z
2,016
6
23
4
5,423
4
543
54
4
0
false
false
true
false
false
false
low
37,819,559
How to get the updated Apk file from the android studio.?
<p>I am developing an android application. All the things is going well when I run the application into genymotion virtual device.And Since the apk is stored in F:...\app\build\outputs\apk location. So I just want to collect it from this location and download it to install in a android phone.As I simultaneously updati...
I am developing an android application. All the things is going well when I run the application into genymotion virtual device.And Since the apk is stored in F:...\app\build\outputs\apk location. So I just want to collect it from this location and download it to install in a android phone.As I simultaneously updating t...
android|apk
-2
2016-06-14T18:29:14.850Z
2,016
6
18
1
8,240
4
667
57
2
0
false
false
true
false
false
true
negative
37,618,594
Checkboxes not getting clicked
<p>I am working on self-learning android and presently trying my hands on creating a list view with checkboxes. However when I run the program and I do see the list view with checkboxes, but I don't see checks in the checkbox when I select any of the options. Am I missing something here? </p> <p><strong><em>MainActivi...
I am working on self-learning android and presently trying my hands on creating a list view with checkboxes. However when I run the program and I do see the list view with checkboxes, but I don't see checks in the checkbox when I select any of the options. Am I missing something here? MainActivity: [CODE] activity_main...
android|checkbox
1
2016-06-03T15:45:51.100Z
2,016
6
15
4
49
4
353
30
2
3
true
false
false
false
false
false
low
38,040,353
ExoPlayer: How to play http live stream?
<p>i want to use ExoPlayer library for my Android application to play live streaming videos.</p> <p>I was looking through the exoplayer website and documentation as well as Github page but i wasn't satisfied with the explanations.</p> <p>Anyone can give me a hint how do you play a http live streaming video through E...
i want to use ExoPlayer library for my Android application to play live streaming videos. I was looking through the exoplayer website and documentation as well as Github page but i wasn't satisfied with the explanations. Anyone can give me a hint how do you play a http live streaming video through ExoPlayer? Thanks in ...
android|video-streaming|exoplayer
4
2016-06-26T15:58:23.387Z
2,016
6
15
6
10,291
4
328
40
3
0
false
false
true
false
false
false
low
37,963,356
firebase (fcm) says 401 unauthorized
<pre><code>private void sendMsg() { DBManager dbManager = DBManager.getInstance(); ArrayList&lt;String&gt; firebaseIds; try { ResultSet rs= dbManager.getRegisteredFirebaseDevice(); while(rs.next()){ System.out.println(rs.getString(1)); firebaseIds.add(rs.getString(1)...
[CODE] When I call the above code, it gives me response as 401 Unauthorized . I am not able to understand why I am getting this error. I have used proper server key. Is there any syntax error or anything wrong in the strategy used by me. I have followed the https://firebase.google.com/docs/cloud-messaging/server#implem...
android|jakarta-ee|firebase|firebase-authentication|firebase-cloud-messaging
6
2016-06-22T09:05:44.613Z
2,016
6
9
2
17,717
4
372
36
5
1
true
false
true
true
false
false
medium
37,807,542
Click on number Textview Box and call that number
<p>I want to on click number On Textview box call the number, I knew I need to put my text box clickable its already done, and I need to do a code to put onclick do some stuff but I need help in that part.</p> <p>This is my <code>XML</code> for java class:</p> <pre><code>&lt;TextView android:layout_width="wrap_co...
I want to on click number On Textview box call the number, I knew I need to put my text box clickable its already done, and I need to do a code to put onclick do some stuff but I need help in that part. This is my XML for java class: [CODE] This is my Java class [CODE]
android|numbers|call
0
2016-06-14T09:05:47.977Z
2,016
6
9
1
1,079
4
269
49
3
2
true
false
false
false
false
false
zero
38,049,536
Gradle dependencies in Xamarin
<p>Is it possible to integrate dependencies from Gradle inside Xamarin project?</p> <p>A have some libraries, which I need to install, they look like this</p> <pre><code>dependencies { compile (name: '&lt;aar fileName&gt;', ext:'aar') compile 'com.koushikdutta.async:androidasync:2.1.6' compile 'com.android.support:ap...
Is it possible to integrate dependencies from Gradle inside Xamarin project? A have some libraries, which I need to install, they look like this [CODE] Can I expose them to Xamarin somehow?
xamarin|gradle|xamarin.android
25
2016-06-27T08:49:15.950Z
2,016
6
8
0
26,430
4
189
30
3
1
true
false
true
true
true
false
high
37,869,418
Espresso intent test failing
<p>I'm learning android instrumentation testing with espresso. I have an app which has a drawer menu and there is a menu called About. I was testing click on that menu item and contents of activity. </p> <p>testfunction:</p> <pre><code> @Test public void testNavigationDrawerAboutMenu() { onView(withId(R.id.drawe...
I'm learning android instrumentation testing with espresso. I have an app which has a drawer menu and there is a menu called About. I was testing click on that menu item and contents of activity. testfunction: [CODE] now the last textview has weblink embedded in it. so when you click on it, it opens the link(www.suppor...
android|android-intent|android-testing|android-espresso
35
2016-06-16T21:11:56.140Z
2,016
6
21
3
15,426
4
573
28
4
3
true
false
true
true
true
false
high
37,717,671
How to send a double value from fragment to other
<p>I have a dialog fragment which pass a double value to a other fragment by using interface but in my other fragment it getting invalid double value.</p> <p>Interface:</p> <pre><code>public interface Receive { public void onDataReceive(Double out); } </code></pre> <p>my fragment1:</p> <pre><code>public class ...
I have a dialog fragment which pass a double value to a other fragment by using interface but in my other fragment it getting invalid double value. Interface: [CODE] my fragment1: [CODE] In my main activity calling interface: [CODE] In my another fragment2: public void getData(double out) { result = Double.toString(out...
android|android-fragments
0
2016-06-09T05:38:27.217Z
2,016
6
5
3
325
4
371
49
2
5
true
false
false
false
false
false
zero
37,839,536
How to draw a circle on a bitmap without filling it?
<p>I am ddrawing a circle on the bitmap and setting this bitmap to ImageView. the circle is drawn correctly but i dont want it to be a filled circle is there any way to make the filled area transparent? i am using the following code</p> <pre><code>Bitmap bmp = RasterImageConverter.convertToBitmap(_loadedImage, Convert...
I am ddrawing a circle on the bitmap and setting this bitmap to ImageView. the circle is drawn correctly but i dont want it to be a filled circle is there any way to make the filled area transparent? i am using the following code [CODE]
java|android|canvas|bitmap
1
2016-06-15T15:21:20.643Z
2,016
6
15
2
1,094
4
236
52
4
1
true
false
false
false
false
false
low
37,726,309
After app installation I can't open it
<p>I have created an simple app with a few activities. After successful installation I can't open the app. I can just see it in device's apps.</p> <p>Yes of course a read all the answers telling "You have to set launcher activity". But I set launcher activity.</p> <p>Here is AndroidManifest.xml</p> <pre><code>&lt;ma...
I have created an simple app with a few activities. After successful installation I can't open the app. I can just see it in device's apps. Yes of course a read all the answers telling "You have to set launcher activity". But I set launcher activity. Here is AndroidManifest.xml [CODE] Never before happened to me... Can...
android|launch
0
2016-06-09T12:41:45.277Z
2,016
6
12
3
73
4
358
38
2
1
true
false
false
false
false
false
zero
37,722,544
Android - What to use in place of AccountPicker.newChooseAccountIntent because its deprecated
<p>I am working on a project where I have to show the account chooser so that a user can select an email account which is stored in his device. Problem is I have got <code>AccountPicker.newChooseAccountIntent</code> which is deprecated. </p> <blockquote> <p>Is there any alternate way to show the account chooser inst...
I am working on a project where I have to show the account chooser so that a user can select an email account which is stored in his device. Problem is I have got AccountPicker.newChooseAccountIntent which is deprecated. Is there any alternate way to show the account chooser instead of getting the email manually, and s...
android|android-account
3
2016-06-09T09:52:20.750Z
2,016
6
9
3
3,401
4
375
93
2
1
true
false
true
false
false
false
low
38,054,929
ViewPager and FragmentPagerAdapter: how to notify the fragment instance that it's being switched to another fragment?
<p>I have a <code>ViewPager</code>, <code>FragmentPagerAdapter</code> and a couple fragments. I need to notify the fragment when the user switches to a different one (so that the first one can finalize its work). I'm looking into <code>ViewPager.OnPageChangeListener</code> but can't see any way to get the current fragm...
I have a ViewPager , FragmentPagerAdapter and a couple fragments. I need to notify the fragment when the user switches to a different one (so that the first one can finalize its work). I'm looking into ViewPager.OnPageChangeListener but can't see any way to get the current fragment instance when the change occurs. Even...
android|android-fragments
0
2016-06-27T13:13:15.930Z
2,016
6
13
0
846
4
583
117
2
0
false
false
false
false
false
false
zero
53,606,359
How to Avoid ProGuard obfuscation in Request Header Model in Retrofit 2 Android?
<p>1.without proguard Everything working fine. while enabling the Proguard, all the header and body models are getting obfuscated.</p> <p>2.Retrofit2 not able to pass data with model objects.</p> <pre><code>D/OkHttp: Content-Type: application/json Content-Length: 80 {"a":{"a":"123","b":"***","c":"","d":"Data","f":"1...
1.without proguard Everything working fine. while enabling the Proguard, all the header and body models are getting obfuscated. 2.Retrofit2 not able to pass data with model objects. [CODE] below mentioned Proguard rules are already added in my code still getting same problem, kindly help me to fix this issue. [CODE] Up...
android|retrofit|retrofit2|android-webservice
3
2018-12-04T05:40:55.187Z
2,018
12
5
1
2,569
4
359
80
4
3
true
false
false
false
false
false
low
53,371,579
Display TextView when EditText is not empty
<p>I'm working with an Android application and have encountered the following problem.</p> <p><strong>Problem:</strong> I want a TextView to display some text when two edittext fields are not empty (when there are text written in the edittext fields).</p> <p><strong>What I have done:</strong></p> <pre><code>@Overrid...
I'm working with an Android application and have encountered the following problem. Problem: I want a TextView to display some text when two edittext fields are not empty (when there are text written in the edittext fields). What I have done: [CODE] This does not work. The text view never pops up. Any ideas why?
android|android-studio
2
2018-11-19T09:24:02.160Z
2,018
11
9
0
522
4
313
43
2
1
true
false
false
false
false
false
low
53,572,083
How or why do listener interfaces work? And do interfaces have any other use rather than being a listener?
<p>Whenever we want to create a listener, we implement a listener interface. For example, lets implement <code>SensorEventListener</code>. </p> <p>Now we have to override the methods of this listener interface. </p> <p><code>public void onSensorChanged(SensorEvent event);</code> </p> <p>and </p> <p><code>public voi...
Whenever we want to create a listener, we implement a listener interface. For example, lets implement SensorEventListener . Now we have to override the methods of this listener interface. public void onSensorChanged(SensorEvent event); and public void onAccuracyChanged(Sensor sensor, int accuracy); What I don't underst...
java|android|listener|implements
1
2018-12-01T15:04:46.093Z
2,018
12
15
5
1,293
4
760
106
4
0
false
false
false
false
false
false
low
53,610,208
Turkish Identity Number Verification
<p>How can I make sure that the given text is Turkish Identity Number? I have seen <a href="https://gist.github.com/onury/7a380f906b1eb46dc2f0bb089caf7d12" rel="nofollow noreferrer">js version here</a> and <a href="https://gist.github.com/canerbasaran/5935004" rel="nofollow noreferrer">phthon version here</a></p> <p>A...
How can I make sure that the given text is Turkish Identity Number? I have seen js version here and phthon version here Also, posted a question couple of days ago for swift version here . Turkish Identity Verification is not checks only if its numeric, it has some other functions too. Let me be more clear, It is numeri...
java|android|numbers
2
2018-12-04T09:58:31.403Z
2,018
12
9
1
1,806
4
693
36
3
2
true
false
false
false
false
false
low
53,490,116
Show (slide in) or hide (slide out) flutter AppBar on screen tap
<p>Please I am trying to create this effect where the AppBar slides out when the screen is tapped and slides in when it is tapped again. </p> <p><a href="https://i.stack.imgur.com/RBOcH.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RBOcH.gif" alt="sample image"></a></p> <p>I am able to create so...
Please I am trying to create this effect where the AppBar slides out when the screen is tapped and slides in when it is tapped again. I am able to create something similar in SliverAppBar by setting floating and snap to true. The difference is that the appBar shows when scrolling down and hides when screen is tapped or...
android|flutter|dart|flutter-layout
3
2018-11-26T22:31:59.093Z
2,018
11
22
0
4,137
4
553
64
4
1
true
false
true
false
false
false
low
53,794,754
Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter convertView
<p>I got this error just after converted the adapter code to Kotlin:</p> <pre><code>java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter convertView at ...MyAdapter.getView(Unknown Source:35) at android.widget.Head...
I got this error just after converted the adapter code to Kotlin: [CODE] The error fires when inflating the row: [CODE] Apparently, some parameter that shouldn't be null is null, and kotlin check it. Problem is i can't even debug the new kotlin code.
android|kotlin|adaptor
31
2018-12-15T15:49:09.383Z
2,018
12
15
5
29,494
4
250
125
3
2
true
false
true
true
true
false
high
53,411,220
Pass activity result into a react native module
<p>I am trying to do some speech to text recognition using react native. I wrote a react module to start a recognizer intent </p> <pre><code>public class SpeechToTextModule extends ReactContextBaseJavaModule { ... @ReactMethod public void startListening(Callback errorCallback, Callback successCallback) { In...
I am trying to do some speech to text recognition using react native. I wrote a react module to start a recognizer intent [CODE] The mainactivity looks like this : [CODE] MainActivity receives the result from the voice intent, but I cant figure out how I can pass it over to the module.
android|react-native
8
2018-11-21T11:35:15.623Z
2,018
11
11
2
6,218
4
286
47
2
2
true
false
true
false
false
false
medium
44,141,076
compileKotlin block in build.gradle file throws error "Could not find method compileKotlin() for arguments [...]"
<p>I'm trying to configure Kotlin to work with Java 1.8 in my Android project. I've tried adding the <code>compileKotlin</code> block at the bottom of my <code>build.gradle</code> file, but I get an error if I do so.</p> <p>The error that occurs is the following:</p> <blockquote> <p>Error:(38, 0) Could not find met...
I'm trying to configure Kotlin to work with Java 1.8 in my Android project. I've tried adding the compileKotlin block at the bottom of my build.gradle file, but I get an error if I do so. The error that occurs is the following: Error:(38, 0) Could not find method compileKotlin() for arguments [build_dvcqiof5pov8xt8flfu...
android|gradle|kotlin
73
2017-05-23T17:09:28.320Z
2,017
5
17
1
34,820
4
533
113
3
1
true
false
true
true
true
false
high
44,099,951
How to make view "wrap_content but not larger than" with ConstraintLayout?
<p>I'm having 3 view in a row: title, version and imageview (working as button):</p> <ol> <li>title should be <code>wrap_content</code> but respecting the following rules</li> <li>version should be <code>wrap_content</code>, to right of the title and to left of imageview</li> <li>imageview has fixed size and is at rig...
I'm having 3 view in a row: title, version and imageview (working as button): title should be wrap_content but respecting the following rules version should be wrap_content , to right of the title and to left of imageview imageview has fixed size and is at right top corner of the parent The problem is if title is too l...
android|android-constraintlayout
41
2017-05-21T17:44:49.297Z
2,017
5
17
6
21,510
4
886
74
2
2
true
false
true
true
true
false
high
44,179,175
Stop initial triggering if device is already inside Geofence android
<p>I am using Geofencing on android, and when creating a geo-fence the device is getting notified if the user was already inside the geo-fence, which is not the behavior I'm looking for, I only want to notify on transition ENTER and EXIT.</p> <p>This is how I'm creating the geofence request:</p> <pre><code>private Ge...
I am using Geofencing on android, and when creating a geo-fence the device is getting notified if the user was already inside the geo-fence, which is not the behavior I'm looking for, I only want to notify on transition ENTER and EXIT. This is how I'm creating the geofence request: [CODE] And inside my GeofenceTransiti...
android|geolocation|location|geofencing|android-geofence
2
2017-05-25T11:14:18.473Z
2,017
5
11
3
2,569
4
527
68
5
2
true
false
false
false
false
false
low
44,224,989
How to check when battery gets 100% charged?
<p>This is the function which I have at the moment which is exexcuted when a button on UI is clicked &amp; it shows the string str (the status of charging) on the TextView.</p> <pre><code>public void checkStatus (View view) { IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED); Context conte...
This is the function which I have at the moment which is exexcuted when a button on UI is clicked & it shows the string str (the status of charging) on the TextView. [CODE] Now what I want to do is to check the battery periodically & once it is 100% (fully charged) then to call a function, let's call it DiscntCharger()...
android|android-service
0
2017-05-28T07:51:57.820Z
2,017
5
7
6
783
4
685
44
2
1
true
false
false
false
false
false
zero
43,963,217
How get all files in folder in Java
<p>I have project and I don't know how to get all file names in folder. I work in Andoid Studio. I just need to make function getAllFilesInFolder(string folderPath). I'd be happy if you write all the imports that it needs too. Code I use:</p> <pre><code>package com.my.appPackage; import android.app.Activity; import a...
I have project and I don't know how to get all file names in folder. I work in Andoid Studio. I just need to make function getAllFilesInFolder(string folderPath). I'd be happy if you write all the imports that it needs too. Code I use: [CODE]
java|android|arrays|file|directory
1
2017-05-14T11:13:03.940Z
2,017
5
11
6
7,695
4
242
35
5
1
true
false
true
false
false
false
low
44,338,835
Start fragment in BottomNavigationView
<p>I'm working with a simple app with Bottom Navigation View. I have 3 fragment with text, and i want to start their when i select a item in Botton Navigation, but i don't know what to write in the MainActivity.java; All the fragments have a .xml layout and .java. I searched in some codes, i wrote them, i search videos...
I'm working with a simple app with Bottom Navigation View. I have 3 fragment with text, and i want to start their when i select a item in Botton Navigation, but i don't know what to write in the MainActivity.java; All the fragments have a .xml layout and .java. I searched in some codes, i wrote them, i search videos, b...
java|android|android-fragments
3
2017-06-02T23:46:42.567Z
2,017
6
23
4
8,465
4
1,026
38
3
4
true
false
true
false
false
false
low
44,295,795
FacebookSdk not starting android
<p>I have tried everything from tutorials, answers all around, even with examples from <a href="https://github.com/facebook/facebook-android-sdk/tree/master/samples" rel="nofollow noreferrer">https://github.com/facebook/facebook-android-sdk/tree/master/samples</a>. I have tried with test app and normal app in developer...
I have tried everything from tutorials, answers all around, even with examples from https://github.com/facebook/facebook-android-sdk/tree/master/samples . I have tried with test app and normal app in developers.facebook.com/apps But i always get this error A valid Facebook app id must be set in the AndroidManifest.xml ...
android|facebook-sdk-4.x|android-runtime
1
2017-05-31T22:42:35.933Z
2,017
5
22
2
4,372
4
414
32
3
1
true
false
true
false
false
false
low
44,246,110
Android Error While using ExifInterface
<p>I am trying to check the orientation of bitmap and flip it if there is a need, but I have error while applying the code. Here is my code while i am trying to flipp the image using ExifInterface:</p> <pre><code>@RequiresApi(api = Build.VERSION_CODES.N) public void flipping(Bitmap b) { ByteArrayOutput...
I am trying to check the orientation of bitmap and flip it if there is a need, but I have error while applying the code. Here is my code while i am trying to flipp the image using ExifInterface: [CODE] And here is the error: [CODE]
android
24
2017-05-29T15:34:53.823Z
2,017
5
15
0
17,945
4
231
39
1
2
true
false
true
true
true
false
high
44,179,029
How to define arralist globally in kotlin
<p>For java class in android we used to declare an int array at top of Activity like <code>int[] intarray;</code> and the create the object where ever required with intArray = new Int(size).</p> <p>What I do know that in kotlin to use array I need to do something like </p> <pre><code>val numbers: IntArray = intArr...
For java class in android we used to declare an int array at top of Activity like int[] intarray; and the create the object where ever required with intArray = new Int(size). What I do know that in kotlin to use array I need to do something like [CODE] What I am not able to do is only declare the object globally ie [CO...
android|kotlin
0
2017-05-25T11:06:45.813Z
2,017
5
11
3
4,122
4
716
41
2
2
true
false
true
false
false
false
zero
44,098,759
Android - Imageview in listview how to reduce the lag?
<p>I'm coding an app with android studio. This is a todolists manager in which you can also add images.</p> <p>I have a Listview containing items with an ImageView in each. But when there are images to display the listview scrolls really slowly and the app lag. </p> <p>I saw that I need to do something on a separate ...
I'm coding an app with android studio. This is a todolists manager in which you can also add images. I have a Listview containing items with an ImageView in each. But when there are images to display the listview scrolls really slowly and the app lag. I saw that I need to do something on a separate thread but how can I...
android|image|listview|imageview
2
2017-05-21T15:44:55.753Z
2,017
5
15
6
1,307
4
478
54
4
0
false
false
false
false
false
false
low
44,351,878
How to Remove Background Color of Button to get Default Background in Android
<p>I am Working on a Test Application in which every question is presented with Four options [those options are via Button]. When a User clicks a button and his answer is correct then background of that button Turns Green, and if his answer is incorrect it turns Red. What i want to do is Reset the Button Background on ...
I am Working on a Test Application in which every question is presented with Four options [those options are via Button]. When a User clicks a button and his answer is correct then background of that button Turns Green, and if his answer is incorrect it turns Red. What i want to do is Reset the Button Background on Nex...
android|button|background-color
4
2017-06-04T07:47:29.690Z
2,017
6
7
6
6,430
4
696
77
3
3
true
false
true
false
false
false
low
43,987,946
How can I keep session open after login?
<p>I have a login in my project but always when I open my app after I close it, have to login again. I use Firebase to authenticate, but I want something like:</p> <pre><code>check if user is logged -&gt; if not - open login, else - open my main activity" </code></pre> <p>I don't know if I have to use SQLite or som...
I have a login in my project but always when I open my app after I close it, have to login again. I use Firebase to authenticate, but I want something like: [CODE] I don't know if I have to use SQLite or something or exist how to keep session alive even you close the application if user doesn't log out.
android|sqlite|firebase|firebase-authentication
2
2017-05-15T20:08:07.707Z
2,017
5
20
0
1,316
4
304
40
4
1
true
false
false
false
false
false
low
44,371,927
What is the Best way to handle a lot of data on a Recycleview
<p>I need to load a long list of data (5000-1000) on a <code>RecycleView</code>, and each items of the <code>RecycleView</code> has many details, so 5 <code>TextView</code>, 1 <code>ImageView</code> and a <code>ProgressBar</code>. All the data are stored on the <code>SQLite DB</code>. Is it better to load an <code>Arra...
I need to load a long list of data (5000-1000) on a RecycleView , and each items of the RecycleView has many details, so 5 TextView , 1 ImageView and a ProgressBar . All the data are stored on the SQLite DB . Is it better to load an ArrayList<Object> which contains all the data and them set it to the adapter or is it b...
android|sqlite|android-recyclerview|adapter
2
2017-06-05T15:04:49.803Z
2,017
6
15
0
3,627
4
515
61
4
0
false
false
true
false
false
false
low
44,188,157
Stop the toast while quitting the app
<p>I was doing an application which uses some Toasts. </p> <p>If a Toast appears and in the meanwhile I quit the app, it normally doesen't disappear.</p> <p>Is there a way to stop the Toast if I quit the app on my phone?</p>
I was doing an application which uses some Toasts. If a Toast appears and in the meanwhile I quit the app, it normally doesen't disappear. Is there a way to stop the Toast if I quit the app on my phone?
android|toast
1
2017-05-25T19:12:42.533Z
2,017
5
19
3
45
4
202
37
2
0
false
false
false
false
false
false
low
44,094,901
.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList
<p>when I share my app to other one then my app crash but when I run my app direct fron studio then app run properly but I have seen all solution but nothing works for me.</p> <blockquote> <p>java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotF...
when I share my app to other one then my app crash but when I run my app direct fron studio then app run properly but I have seen all solution but nothing works for me. java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find cla...
android
1
2017-05-21T08:45:35.330Z
2,017
5
8
6
8,500
4
2,515
115
1
0
false
false
true
false
false
false
low
44,107,348
item images get mixed after listview scrolls down
<p>i have an activity to show user contacts list. if contact exists in my app i want to show a follow button , else i want to show a whatsapp and telegram icon to invite them.</p> <p>when i open the activity every thing is fine as i want , but when i scroll down and come back up follow buttons and whats app icons get ...
i have an activity to show user contacts list. if contact exists in my app i want to show a follow button , else i want to show a whatsapp and telegram icon to invite them. when i open the activity every thing is fine as i want , but when i scroll down and come back up follow buttons and whats app icons get mixed for d...
android|listview|listadapter
0
2017-05-22T07:45:04.663Z
2,017
5
7
0
54
4
737
49
3
1
true
false
false
false
false
false
zero
43,940,205
Keeping variable value in different activities Android Studio
<p>I have tabbed activities in my app. In each tab I have a (switch) button which toggles to on and off by clicking. As I move to another tab and come back to the same, it gets off. I want to keep its value so that it doesn't change when switching to other activities. </p> <p>Layout(XML) code of the button:</p> <pre>...
I have tabbed activities in my app. In each tab I have a (switch) button which toggles to on and off by clicking. As I move to another tab and come back to the same, it gets off. I want to keep its value so that it doesn't change when switching to other activities. Layout(XML) code of the button: [CODE] The related tab...
android|variables
1
2017-05-12T14:28:21.587Z
2,017
5
14
4
2,107
4
526
61
2
2
true
false
false
false
false
false
low
44,021,774
Set clicklistener on specific part of spannable textview in android
<p>I am having a difficulty in setting a <code>ClickListener</code> in specific part of Text in <code>SpannableTextView</code> in android.</p> <p>I have this text:</p> <blockquote> <p>By registering you agree to the <strong>Terms And Services</strong></p> </blockquote> <p>I want to set clicklistener to the bold pa...
I am having a difficulty in setting a ClickListener in specific part of Text in SpannableTextView in android. I have this text: By registering you agree to the Terms And Services I want to set clicklistener to the bold part only? Is it possible?
android
1
2017-05-17T10:06:30.083Z
2,017
5
10
2
1,596
4
245
67
1
0
false
false
false
false
false
false
low
44,226,220
Update recyclerView
<p>In my fragment, I want to update my recyclerView when I select some language in my recyclerView. Now it is updated only when I move to another fragment and then return to it.</p> <p>This is code of my fragment:</p> <pre><code>public View onCreateView(LayoutInflater inflater, ViewGroup container, ...
In my fragment, I want to update my recyclerView when I select some language in my recyclerView. Now it is updated only when I move to another fragment and then return to it. This is code of my fragment: [CODE] In my method initializeAdapter i tried to write: [CODE] but this is doesn't work.
java|android|android-fragments|android-recyclerview
0
2017-05-28T10:22:54.380Z
2,017
5
10
6
322
4
292
19
4
2
true
false
false
false
false
false
zero
44,110,054
How to set mendaroty Field * color for inputtextlayout hint?
<p>This is my xml file.</p> <pre><code>&lt;android.support.design.widget.TextInputLayout android:id="@+id/input_layout_password" android:layout_width="match_parent" android:layout_height="wrap_content"&gt; &lt;EditText android:id="@+id/input_password" android:layout_width="match_parent" an...
This is my xml file. [CODE] i need "*" in RED color. How to do that??
android|material-components-android|android-textinputlayout
0
2017-05-22T10:02:05.943Z
2,017
5
10
0
69
4
69
60
3
1
true
false
false
false
false
false
zero
44,286,895
Can a stopped Activity which belong to a foreground task be destroyed by the system?
<p>From <a href="https://developer.android.com/guide/components/activities/tasks-and-back-stack.html" rel="nofollow noreferrer">official doc</a>:</p> <blockquote> <p>When Activity A starts Activity B, Activity A is stopped, but the system retains its state (such as scroll position and text entered into forms). I...
From official doc : When Activity A starts Activity B, Activity A is stopped, but the system retains its state (such as scroll position and text entered into forms). If the user presses the Back button while in Activity B, Activity A resumes with its state restored. Activity A is not destroyed at this point. However, i...
android|android-activity
0
2017-05-31T14:01:39.697Z
2,017
5
14
2
326
4
1,056
84
2
0
false
false
false
false
false
false
zero
44,127,163
RecyclerView pagination not working
<p>I am trying to load more items when scroll down after last item of RecyclerView but nothing happens. It just calls only once at the time of screen load &amp; after nothing happens though I scrolled down &amp; move to last item.</p> <p>Below is my code</p> <pre><code> inspectionRecyclerView = (RecyclerView) view...
I am trying to load more items when scroll down after last item of RecyclerView but nothing happens. It just calls only once at the time of screen load & after nothing happens though I scrolled down & move to last item. Below is my code [CODE] Scroll part code [CODE] Please help me.
android|pagination|android-recyclerview|android-scroll
1
2017-05-23T06:19:52.500Z
2,017
5
6
1
3,914
4
283
35
4
2
true
false
true
false
false
false
low
44,019,872
How to detect eye blink using Google vision API in android ?
<p>i'm using the vision API for face detection, now i want to implement eye blink but still vision api detect eye blinking in image(photo) of a person(not live).</p> <p>In addition, I am using a Tracker to keep track of the eye state over time, to detect the sequence of events that indicate a blink of left eye:</p> <...
i'm using the vision API for face detection, now i want to implement eye blink but still vision api detect eye blinking in image(photo) of a person(not live). In addition, I am using a Tracker to keep track of the eye state over time, to detect the sequence of events that indicate a blink of left eye: left eyes open ->...
android|google-play-services|google-vision|android-vision
2
2017-05-17T08:47:21.770Z
2,017
5
8
2
9,802
4
855
60
4
3
true
false
true
false
false
false
low