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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
37,075,088 | Camera2Basic : Application:transformClassesWithDexForDebug | <p>I am using the <a href="https://github.com/googlesamples/android-Camera2Basic" rel="nofollow">Camera2Basic example</a> by Google to test an application in Android Studio. I am getting this error when I run the project:</p>
<blockquote>
<p>Error:Execution failed for task ':Application:transformClassesWithDexForDeb... | I am using the Camera2Basic example by Google to test an application in Android Studio. I am getting this error when I run the project: Error:Execution failed for task ':Application:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.p... | java|android|android-camera2 | 1 | 2016-05-06T14:34:05.950Z | 2,016 | 5 | 14 | 4 | 138 | 1 | 734 | 58 | 3 | 1 | true | false | false | false | false | false | low |
37,075,239 | getTimeinMillis returns a negative value | <p>I am making an app which can show time left to some date, and an elapsed time after some date. But I endure some difficulties with dates less than 1970 and bigger than 3300. I have found an explanation why it happens.</p>
<blockquote>
<p>The problem is this sentence from getTimeInMillis:
the current time as UTC... | I am making an app which can show time left to some date, and an elapsed time after some date. But I endure some difficulties with dates less than 1970 and bigger than 3300. I have found an explanation why it happens. The problem is this sentence from getTimeInMillis: the current time as UTC milliseconds from the epoch... | java|android|time | 0 | 2016-05-06T14:41:25.527Z | 2,016 | 5 | 14 | 4 | 565 | 1 | 675 | 40 | 3 | 1 | true | false | false | false | false | false | zero |
37,075,354 | Cordova Media plugin fails with mp3 internet audio streaming on Android 6 (Marshmallow) | <p>My internet radio station player app failed with the upgrade to Android 6 (Marshmallow). To test I copied the example code (below) from the docs for the Media plugin and built a tiny test app on latest Cordova (6.1.1), Android platform (5.1.1), Browser platform (4.1.0) and Media plugin (2.3.0). I also added necessar... | My internet radio station player app failed with the upgrade to Android 6 (Marshmallow). To test I copied the example code (below) from the docs for the Media plugin and built a tiny test app on latest Cordova (6.1.1), Android platform (5.1.1), Browser platform (4.1.0) and Media plugin (2.3.0). I also added necessary w... | android|cordova|audio|streaming|android-6.0-marshmallow | 2 | 2016-05-06T14:48:02.537Z | 2,016 | 5 | 14 | 4 | 973 | 1 | 1,223 | 87 | 5 | 2 | true | false | false | false | false | false | low |
37,075,381 | tab activity in toolbars? or should i say, drawer + tabbed activity in a tool bar. How can i achieve this? | <p>so i am trying to create like a social media kind of tool bar, check this out. <a href="http://i.stack.imgur.com/Wh8I1.png" rel="nofollow">This is like the toolbar </a> that includes a navigation drawer slider and when you swipe around, it becomes just like a tabbed activity.</p>
<p><em>(sorry for only 1 picture, s... | so i am trying to create like a social media kind of tool bar, check this out. This is like the toolbar that includes a navigation drawer slider and when you swipe around, it becomes just like a tabbed activity. (sorry for only 1 picture, stackover flow is not allowing me to post more than 3 links) I have been thinking... | android|android-fragments|navigation-drawer|floating-action-button|android-tabbed-activity | 0 | 2016-05-06T14:49:19.917Z | 2,016 | 5 | 14 | 4 | 152 | 1 | 960 | 106 | 5 | 0 | false | false | false | false | false | false | zero |
37,075,433 | Capitalize letter of a string[] value in Java (Android) | <p>I need some help with something, if someone is willing to help a newbie.</p>
<p>I have this piece of String[] here</p>
<pre><code>String [] localitate = new String[]{"abrud", "aiud", "alba iulia", "albac", "almasu mare", "arieseni", "avram iancu"};
</code></pre>
<p>and this piece of code here to capitalize the fi... | I need some help with something, if someone is willing to help a newbie. I have this piece of String[] here [CODE] and this piece of code here to capitalize the first letter (I'm creating an AutoCompleteTextView) [CODE] Now, the thing is that, this code capitalizes only the first letter of the first word, but on the va... | java|android|arrays|string | -1 | 2016-05-06T14:51:29.443Z | 2,016 | 5 | 14 | 4 | 471 | 1 | 451 | 55 | 4 | 2 | true | false | false | false | false | true | negative |
37,075,601 | Wrong Image Load Order In Dynamic List View - Android | <p>I am trying to load images dynamically in a list view in android. The code below loads the image according to the viewed position and loads the image in that array position. However, as it gets the data in background, sometimes the image in the first array is loaded in the second imageview position, second in third ... | I am trying to load images dynamically in a list view in android. The code below loads the image according to the viewed position and loads the image in that array position. However, as it gets the data in background, sometimes the image in the first array is loaded in the second imageview position, second in third etc... | android|listview|imageview|android-arrayadapter|dynamic-tables | 1 | 2016-05-06T14:59:26.530Z | 2,016 | 5 | 14 | 4 | 194 | 2 | 608 | 53 | 5 | 1 | true | false | false | false | false | false | low |
37,075,667 | MediaRouteButton - XML binary #34 exception | <p>I was com.android.support:appcompat-v7:22.2.1' for my project and was able to get the mediaRouteButton to showup and work just fine. I recently updated all my libraries to 23.3.0 and now whenever I start the application it will crash with this exception:</p>
<pre><code>Caused by android.view.InflateException: Binar... | I was com.android.support:appcompat-v7:22.2.1' for my project and was able to get the mediaRouteButton to showup and work just fine. I recently updated all my libraries to 23.3.0 and now whenever I start the application it will crash with this exception: [CODE] I have looked at the other questions/answers regarding thi... | android|chromecast | 1 | 2016-05-06T15:02:53.657Z | 2,016 | 5 | 15 | 4 | 280 | 0 | 749 | 43 | 2 | 1 | true | true | false | false | false | false | low |
37,075,871 | Can i bind an error message to a TextInputLayout? | <p>I would like to bind a error message directly to a <code>android.support.design.widget.TextInputLayout</code>. I cannot find a way to set the error through the layout. Is this even possible?</p>
<p>This is how I imagined it working:</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<layout xmlns:andro... | I would like to bind a error message directly to a android.support.design.widget.TextInputLayout . I cannot find a way to set the error through the layout. Is this even possible? This is how I imagined it working: [CODE] | android|android-layout|android-databinding | 34 | 2016-05-06T15:14:18.760Z | 2,016 | 5 | 15 | 4 | 18,748 | 3 | 220 | 49 | 3 | 1 | true | false | true | true | true | false | high |
37,075,941 | Android device's Uptime not restarting after rebooting it programmatically | <p>I developed an app that has system priveleges. It is able to successfully reboot the device and also shut it down. The problem is that after rebooting the device its <code>uptime</code> (<code>SystemClock.uptimeMillis()</code>) counter does not go back to <code>0</code> instead it keeps adding to its former value.</... | I developed an app that has system priveleges. It is able to successfully reboot the device and also shut it down. The problem is that after rebooting the device its uptime ( SystemClock.uptimeMillis() ) counter does not go back to 0 instead it keeps adding to its former value. For instance, if the uptime value before ... | android|service|android-4.4-kitkat|reboot|uptime | 0 | 2016-05-06T15:17:36.533Z | 2,016 | 5 | 15 | 4 | 601 | 1 | 771 | 74 | 5 | 2 | true | false | false | false | false | false | zero |
37,076,036 | ListView items are empty in higher API | <p>I'm new to Android. </p>
<p>My problem is that my ListView items Views aren't appearing on API higher than 19. </p>
<p>While I was creating project I set target API to KitKat (API 19) but now when I look at build.app the <code>targetSdkVersion</code> is 23 and <code>minSdkVersion</code> is 14.</p>
<p>Then I upgra... | I'm new to Android. My problem is that my ListView items Views aren't appearing on API higher than 19. While I was creating project I set target API to KitKat (API 19) but now when I look at build.app the targetSdkVersion is 23 and minSdkVersion is 14. Then I upgraded my phone to Marshmellow and now while I want to deb... | android|listview|android-studio | 0 | 2016-05-06T15:22:34.523Z | 2,016 | 5 | 15 | 4 | 69 | 1 | 781 | 38 | 3 | 4 | true | false | false | false | false | false | zero |
37,076,079 | How to: Allow a ViewPager to function normally whilst passing touch events to a view the ViewPager is overlapping | <p>I have a TabLayout and a ViewPager which contains the tabs. </p>
<p>The ViewPager is positioned above the TabLayout so that the ViewPager overlaps the TabLayout, and as a result, the TabLayout buttons which navigate between the different tabs do not work because the ViewPager is intercepting the touch events. </p>
... | I have a TabLayout and a ViewPager which contains the tabs. The ViewPager is positioned above the TabLayout so that the ViewPager overlaps the TabLayout, and as a result, the TabLayout buttons which navigate between the different tabs do not work because the ViewPager is intercepting the touch events. I've tried to fix... | android|android-viewpager|ontouchlistener|android-tablayout|android-touch-event | 1 | 2016-05-06T15:24:45.927Z | 2,016 | 5 | 15 | 4 | 561 | 0 | 1,535 | 113 | 5 | 2 | true | true | false | false | false | false | low |
37,076,301 | generating notification when time matches, even without running application - ANDROID | <p>In my android application, I want to generate a notification when current time matches with the time that I have retrieved from my database. And the notification should be generated even if the application is not running. For this I have done something like this, but this is not working (no notification is being gen... | In my android application, I want to generate a notification when current time matches with the time that I have retrieved from my database. And the notification should be generated even if the application is not running. For this I have done something like this, but this is not working (no notification is being genera... | android | 0 | 2016-05-06T15:35:48.153Z | 2,016 | 5 | 15 | 4 | 35 | 2 | 602 | 85 | 1 | 2 | true | false | false | false | false | false | zero |
37,076,353 | Is there a way to automate Android OS testing (not just the apps)? | <p>Preface:</p>
<p>I'm working with small company that make its own devices with custom flavored Android OS (eBooks and one model of smartphone). I have the experience of browser, API and mobile apps (iOS | Android) automation.</p>
<p>Problem:</p>
<p>But today i've heard the idea from my manager. He offered me to fi... | Preface: I'm working with small company that make its own devices with custom flavored Android OS (eBooks and one model of smartphone). I have the experience of browser, API and mobile apps (iOS | Android) automation. Problem: But today i've heard the idea from my manager. He offered me to find tool or just a way to au... | android|automation|appium | 2 | 2016-05-06T15:38:42.080Z | 2,016 | 5 | 15 | 4 | 559 | 1 | 1,070 | 66 | 3 | 0 | false | false | false | false | false | false | low |
37,076,363 | Android, Open GL ES, crop and scale texture | <p>I have some troubles with video processing. I'm using Surface with Texture to process video with MediaCodec and MediaMuxer (decode, crop, encode with lower quality).<br>
And on middle-step, which is cropping, I've got problems. Basically, what I want to do is to take lesser dimension of video, then, based on this si... | I have some troubles with video processing. I'm using Surface with Texture to process video with MediaCodec and MediaMuxer (decode, crop, encode with lower quality). And on middle-step, which is cropping, I've got problems. Basically, what I want to do is to take lesser dimension of video, then, based on this side, def... | android|opengl-es | 1 | 2016-05-06T15:39:08.953Z | 2,016 | 5 | 15 | 4 | 1,873 | 1 | 1,063 | 43 | 2 | 1 | true | false | false | false | false | false | low |
37,076,567 | voice intraction command xamarin android | <p>i have a problem with the voice interaction in xamarin app.
in android project i have added Intent.CategoryVoice in intentFilter, then on onResume i have an if(!isvoiceInteraction) that is always false.
the app don't answer me because isvoiceInteraction is false. Why?? have I need permission?? what else???</p>
<pre... | i have a problem with the voice interaction in xamarin app. in android project i have added Intent.CategoryVoice in intentFilter, then on onResume i have an if(!isvoiceInteraction) that is always false. the app don't answer me because isvoiceInteraction is false. Why?? have I need permission?? what else??? [CODE] | android|xamarin|command|voice|interaction | 0 | 2016-05-06T15:50:24.913Z | 2,016 | 5 | 15 | 4 | 458 | 0 | 314 | 40 | 5 | 1 | true | true | false | false | false | false | zero |
37,076,616 | Create New Android Project In Eclipse Fails | <p>When I want to create a new project in eclipse it gives me this error every time.</p>
<p><a href="https://i.stack.imgur.com/Pvw31.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Pvw31.png" alt="Creating new project"></a></p>
<p><a href="https://i.stack.imgur.com/vD0ln.png" rel="nofollow noreferr... | When I want to create a new project in eclipse it gives me this error every time. I have installed ADT using Eclipse->Help->Install New Software. I have installed sdk and jdk and. What is problem? it really gets me sick. I will throw my computer away. | java|android|eclipse|eclipse-adt | 0 | 2016-05-06T15:52:37.640Z | 2,016 | 5 | 15 | 4 | 378 | 2 | 251 | 43 | 4 | 0 | false | false | false | false | false | false | zero |
37,076,835 | MediaPlayer.Prepare() has been thrown when I try to next track | <p>If I replace a "prepare()" method into a "prepareasync()" that's fine but Media will not play.</p>
<p>If I use a "prepare()"then I got error's has been thrown .
Please help me</p>
<pre class="lang-C# prettyprint-override"><code> OnCreate(....)
//Media
player = new MediaPlayer ();
player.Stop ();
</code></pre>
<p... | If I replace a "prepare()" method into a "prepareasync()" that's fine but Media will not play. If I use a "prepare()"then I got error's has been thrown . Please help me [CODE] [CODE] [CODE] I have tried some ways but that is not success. | android|xamarin|xamarin.android | 1 | 2016-05-06T16:03:30.950Z | 2,016 | 5 | 16 | 4 | 44 | 1 | 237 | 62 | 3 | 3 | true | false | false | false | false | false | low |
37,076,939 | Trying to replace Fragment but it keeps on showing the same Fragment | <p>I have two Fragments. For examples like Fragment A and Fragment B, As the Activity starts, Fragment A is started. Now I enter some input which should start Fragment B, it reaches in Fragment B(executes its code) but it keeps on showing Fragment A.
What could possibly be going wrong ? Any help would be appreciated.</... | I have two Fragments. For examples like Fragment A and Fragment B, As the Activity starts, Fragment A is started. Now I enter some input which should start Fragment B, it reaches in Fragment B(executes its code) but it keeps on showing Fragment A. What could possibly be going wrong ? Any help would be appreciated. [COD... | android|android-fragments | 0 | 2016-05-06T16:09:38.987Z | 2,016 | 5 | 16 | 4 | 32 | 1 | 518 | 68 | 2 | 2 | true | false | false | false | false | false | zero |
37,077,046 | Code Error: AndroidRuntime:FATAL EXCEPTION:main | <p>my code is:
AddContact.java :</p>
<pre><code>package com.example.averm.contactmanager;
import android.app.Activity;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Editable;
... | my code is: AddContact.java : [CODE] And DatabaseHelpler.java : [CODE] I am Getting this Error while inserting Data in Database, please help!! [CODE] | java|android|nullpointerexception | 0 | 2016-05-06T16:15:51.940Z | 2,016 | 5 | 16 | 4 | 117 | 2 | 149 | 47 | 3 | 3 | true | false | false | false | false | false | zero |
37,077,110 | How to pass custom call object from service to activity? | <p>I am implementing a Video calling application using KandySDK. I have implemented the incoming call listener in service so when my application is not visible or crashed , service can receive all incoming calls. Now, I want to pass the incoming call object ,which I received in service, to activity. I came to know that... | I am implementing a Video calling application using KandySDK. I have implemented the incoming call listener in service so when my application is not visible or crashed , service can receive all incoming calls. Now, I want to pass the incoming call object ,which I received in service, to activity. I came to know that pa... | android|service | 1 | 2016-05-06T16:19:07.933Z | 2,016 | 5 | 16 | 4 | 212 | 1 | 608 | 56 | 2 | 1 | true | false | false | false | false | false | low |
37,077,127 | SQLite cursor returning IllegalStateException? | <p>I am trying to add elements to a DB and then search for a particular entry. But I get a cursor error. Here is my code for the DB class. The database contains only a single column. Thanks in advance.</p>
<pre><code>public class DataB extends SQLiteOpenHelper {
private static final String db_name = "testing.db";
... | I am trying to add elements to a DB and then search for a particular entry. But I get a cursor error. Here is my code for the DB class. The database contains only a single column. Thanks in advance. [CODE] The error is Caused by: java.lang.IllegalStateException: Couldn\'t read row 0, col -1 from CursorWindow. Make sure... | android|cursor | 0 | 2016-05-06T16:20:34.803Z | 2,016 | 5 | 16 | 4 | 115 | 1 | 387 | 46 | 2 | 1 | true | false | false | false | false | false | zero |
37,077,176 | Why does context not have the activity's primary color attribute? | <p>I'm writing a library that has an activity for photo editing. When the user is done editing, there is a "done" button with a color background. I want to be able to customize the color of the button so I have static methods in a <em>different class</em> that create drawables with different colors. Something that I wa... | I'm writing a library that has an activity for photo editing. When the user is done editing, there is a "done" button with a color background. I want to be able to customize the color of the button so I have static methods in a different class that create drawables with different colors. Something that I want to do in ... | android|kotlin | 1 | 2016-05-06T16:23:16.263Z | 2,016 | 5 | 16 | 4 | 75 | 0 | 969 | 65 | 2 | 2 | true | true | false | false | false | false | low |
37,077,205 | i m trying to get response from server and retrieving it using JSON. java.lang.string cannot be convert into jsonObject | <p>i m trying to get response from server and retrieving it using JSON everything is going great without any error but my IF statement is not executing, program is jumping on other execution task, when i debug my app it says that java.lang.string cannot be converted to jsonObject that's why it is not executing it.... i... | i m trying to get response from server and retrieving it using JSON everything is going great without any error but my IF statement is not executing, program is jumping on other execution task, when i debug my app it says that java.lang.string cannot be converted to jsonObject that's why it is not executing it.... i m ... | java|android|json|string|object | 0 | 2016-05-06T16:24:41.770Z | 2,016 | 5 | 16 | 4 | 243 | 1 | 539 | 119 | 5 | 1 | true | false | false | false | false | false | zero |
37,077,341 | Instant run does not work with layout-21 | <p>Here is a case that instant run in AS is not working:</p>
<pre><code>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
toolbar.setElevation(visible ? getResources().getDimension(R.dimen.elevation_toolbar) : 0);
} else {
View toolbarShadow = findViewById(R.id.toolbar_shadow);
toolbarShadow.... | Here is a case that instant run in AS is not working: [CODE] The view in layout has the R.id.toolbar_shadow . All good. However if you have a view in layout-21 which does not contain the R.id.toolbar_shadow then when you compile the app to an e.g. Api 23 device gradle will fail with : [CODE] Any ideas to solve this? Up... | android|android-studio|android-gradle-plugin|android-studio-2.0|android-instant-run | 0 | 2016-05-06T16:33:21.123Z | 2,016 | 5 | 16 | 4 | 93 | 1 | 423 | 40 | 5 | 4 | true | false | false | false | false | false | zero |
37,077,430 | AlarmManager schedule Alarm on application start | <p>this is a very dumb question and I still cannot figure out how does <code>AlarmManager</code> work in Android. Suppose I want to schedule a repeating task every half an hour. I want to schedule it at activity <code>onCreate()</code>. I do something like this:</p>
<pre><code> @Override
protected void onCreate... | this is a very dumb question and I still cannot figure out how does AlarmManager work in Android. Suppose I want to schedule a repeating task every half an hour. I want to schedule it at activity onCreate() . I do something like this: [CODE] Now my question is how does OS knows that this alarm has already been schedule... | android|alarmmanager|repeatingalarm|android-os-handler | 0 | 2016-05-06T16:38:47.100Z | 2,016 | 5 | 16 | 4 | 343 | 1 | 550 | 48 | 4 | 1 | true | false | false | false | false | false | zero |
37,077,463 | How to stack notifications in Android? | <p>I'm new to Android Development, I'm creating an app that receieves messages from a Server (using WebSockets) and I want to receive notifications when it sends a message. I did it and all works, the only thing that I would like is to have a single notification that can be expandex (like Gmail or WhatsApp one). I sear... | I'm new to Android Development, I'm creating an app that receieves messages from a Server (using WebSockets) and I want to receive notifications when it sends a message. I did it and all works, the only thing that I would like is to have a single notification that can be expandex (like Gmail or WhatsApp one). I searche... | android|android-studio|push-notification | 2 | 2016-05-06T16:40:56.643Z | 2,016 | 5 | 16 | 4 | 2,194 | 1 | 805 | 38 | 3 | 2 | true | false | false | false | false | false | low |
37,077,483 | Temasys android integration issue: "No value for version" V0.9.5 | <p>I have integrated <a href="https://temasys.com.sg/" rel="nofollow">Temasys lib</a> to integrate Video calling feature. everything was working fine but suddenly stop. Following error log I'm facing while connecting for room after connection made between sender and receiver:</p>
<blockquote>
<p>[onMessage] error: N... | I have integrated Temasys lib to integrate Video calling feature. everything was working fine but suddenly stop. Following error log I'm facing while connecting for room after connection made between sender and receiver: [onMessage] error: No value for version org.json.JSONException: No value for version at org.json.JS... | android|webrtc|skylink|temasys | 1 | 2016-05-06T16:42:09.413Z | 2,016 | 5 | 16 | 4 | 86 | 0 | 3,019 | 64 | 4 | 0 | false | true | false | false | false | false | low |
37,077,509 | Cant Return Data From a Sub-Activity (setResult) | <p>In my project, ActivityTwo is launched as a sub-activity of ActivityOne, which has, in turn, been modified to handle data returned from ActivityTwo. </p>
<p>TextView in ActivityOne should retrieve the text entered into the EditText added to intent object as a key-value in ActivityTwo.
Despite of the successful ... | In my project, ActivityTwo is launched as a sub-activity of ActivityOne, which has, in turn, been modified to handle data returned from ActivityTwo. TextView in ActivityOne should retrieve the text entered into the EditText added to intent object as a key-value in ActivityTwo. Despite of the successful launch, it does ... | android|android-intent|startactivityforresult|subactivity | 0 | 2016-05-06T16:43:19.670Z | 2,016 | 5 | 16 | 4 | 110 | 2 | 730 | 48 | 4 | 2 | true | false | false | false | false | false | zero |
37,077,657 | Kotlin performance of Interface vs Function Invocation | <p>In Kotlin, as we can use functions as variables, i tend to replace interfaces with function calls like this:</p>
<pre><code>class A {
private var listener: AA? = null
var callThis: (() -> Unit) ? = null)
fun somethingHere() {
callThis?.invoke()
listener?.callThis2()
}
fun a... | In Kotlin, as we can use functions as variables, i tend to replace interfaces with function calls like this: [CODE] As I'm pretty new to Kotlin, i would like to know the differences and in what scenarios should i use function calls vs interfaces, except for the (obviously) abstraction. Or is it the same, and the functi... | java|android|interface|kotlin|function-calls | 1 | 2016-05-06T16:52:11.140Z | 2,016 | 5 | 16 | 4 | 694 | 1 | 502 | 54 | 5 | 1 | true | false | false | false | false | false | low |
37,077,686 | Unable to implement Google sign up for android | <p>Tried implementing Google sign up for android app, the code is as below:</p>
<pre><code>public class MainActivity extends AppCompatActivity implements View.OnClickListener, GoogleApiClient.OnConnectionFailedListener {
//Signin button
private SignInButton signInButton;
//Signing Options
private Goo... | Tried implementing Google sign up for android app, the code is as below: [CODE] I have rechecked all the prerequisites as per the google directives but I am getting a login failed toast as the result.isSuccess() is false again and again. I have seen many people wondering with this error but no clear solution anywhere. ... | android | 0 | 2016-05-06T16:54:02.513Z | 2,016 | 5 | 16 | 4 | 66 | 2 | 360 | 46 | 1 | 1 | true | false | false | false | false | false | zero |
37,077,747 | Android - XML or SQLite for static data | <p>I am making Android app for practicing driving licence theory tests. I will have about 3000 questions. Question object would have several atributes (text, category, subcategory, answers, group). I will create them and put in app, so data won't ever change. When user chooses category, app would go througt data, look ... | I am making Android app for practicing driving licence theory tests. I will have about 3000 questions. Question object would have several atributes (text, category, subcategory, answers, group). I will create them and put in app, so data won't ever change. When user chooses category, app would go througt data, look whi... | android|sql|xml|sqlite | 4 | 2016-05-06T16:58:17.903Z | 2,016 | 5 | 16 | 4 | 715 | 5 | 1,103 | 39 | 4 | 0 | false | false | false | false | false | false | low |
37,077,828 | Replace fragment with another | <p>I have one activity and tow fragments. When application starts I load fragment one in activity.</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:l... | I have one activity and tow fragments. When application starts I load fragment one in activity. [CODE] I have button in fragment one and I want when it was clicked, substitute it with fragment tow (load parent fragment container). The layout of fragment one and tow are like this: [CODE] I get error and application stop... | android|android-fragments | -1 | 2016-05-06T17:03:25.137Z | 2,016 | 5 | 17 | 4 | 66 | 3 | 356 | 29 | 2 | 2 | true | false | false | false | false | true | negative |
37,077,836 | How to set imageview.getDrawable in android | <p>I am trying to make an image blur but I am getting a null point Exception error on running the app I came to know that it may happen by setting the backgroung instead of src so I changed it to src but then also getting the same error here is my code</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<Re... | I am trying to make an image blur but I am getting a null point Exception error on running the app I came to know that it may happen by setting the backgroung instead of src so I changed it to src but then also getting the same error here is my code [CODE] my java code is [CODE] | android|imageview|android-studio-2.1|android-blur-effect | 0 | 2016-05-06T17:03:40.553Z | 2,016 | 5 | 17 | 4 | 780 | 2 | 279 | 43 | 4 | 2 | true | false | false | false | false | false | zero |
37,077,977 | Android app internet status after oncreate() | <p>I use this function isOnline() oncreate method to check if there is internet connection when the app is lunched and is working fine!</p>
<pre><code> public boolean isOnline() {
ConnectivityManager cm =
(ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo netInfo = cm.... | I use this function isOnline() oncreate method to check if there is internet connection when the app is lunched and is working fine! [CODE] Now i want to check the internet connection after the app is starting and if there is no internet connection show alert! i try to use this one but i don't know what im doing wrong.... | android | -1 | 2016-05-06T17:11:19.053Z | 2,016 | 5 | 17 | 4 | 75 | 2 | 360 | 44 | 1 | 3 | true | false | false | false | false | true | negative |
37,078,069 | Android Studio Error:Execution failed for task ':flypandroid:transformClassesWithJarMergingForDebug' | <p>getting this error after upgrading to Studio 2.1 and building against API 23:</p>
<blockquote>
<p>Error:Execution failed for task ':flypandroid:transformClassesWithJarMergingForDebug'. >
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/annotation/... | getting this error after upgrading to Studio 2.1 and building against API 23: Error:Execution failed for task ':flypandroid:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/annotation/NonNull.class I have tried: B... | android|android-studio|android-6.0-marshmallow | 0 | 2016-05-06T17:17:37.257Z | 2,016 | 5 | 17 | 4 | 518 | 1 | 504 | 100 | 3 | 2 | true | false | false | false | false | false | zero |
37,078,083 | spinner in android xml layout | <p>I'm trying to design a layout for an android app.
this is the xml:</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_paren... | I'm trying to design a layout for an android app. this is the xml: [CODE] and it looks like this: but when I add an id value for the spinner: [CODE] for some reason it ruins the layout: Does anyone know why does it happen? The only thing I'm changing is a value of an id, not something graphic. How can I fix it? Or how ... | android|xml|android-layout|spinner | 0 | 2016-05-06T17:18:27Z | -1 | -1 | -1 | -1 | 261 | 2 | 569 | 29 | 4 | 2 | true | false | false | false | false | false | zero |
37,078,120 | Previous EditText value clears as requested but does not allow for new user input | <p>I am working on a fragment that holds a seek bar, the seek bar value is updated in the editText element if used . User can also update seekbar by typing in the value on the editText.(this all works, until i implemented the clearing of the previous value)</p>
<p>the seekbar is defaulted to 500 (midpoint) and the ... | I am working on a fragment that holds a seek bar, the seek bar value is updated in the editText element if used . User can also update seekbar by typing in the value on the editText.(this all works, until i implemented the clearing of the previous value) the seekbar is defaulted to 500 (midpoint) and the textView shows... | android-fragments|android-edittext|user-input | 0 | 2016-05-06T17:21:13.293Z | 2,016 | 5 | 17 | 4 | 56 | 1 | 990 | 81 | 3 | 3 | true | false | false | false | false | false | zero |
37,078,182 | Open a Sub-Preference Screen of SettingsActivity on button click | <p>My <strong><code>SettingsActivity</code></strong> has sub-preference screens. I want to directly open one of the nested <strong><code>PreferenceScreen</code></strong> in <code>SettingsActivity</code> from another <strong><code>Activity</code></strong> on button click.</p>
<p>Basically, I want the user to be redirec... | My SettingsActivity has sub-preference screens. I want to directly open one of the nested PreferenceScreen in SettingsActivity from another Activity on button click. Basically, I want the user to be redirected from an Activity to the sub-section of the SettingsActivity screen. Is there a way to do it? [CODE] | android|android-activity|preferenceactivity|preferencescreen|android-settings | 1 | 2016-05-06T17:25:21.153Z | 2,016 | 5 | 17 | 4 | 1,150 | 1 | 309 | 64 | 5 | 1 | true | false | false | false | false | false | low |
37,078,236 | Unable to populate recycler viiew from Firebase DB | <p>Though this question was answered a few times, any of the answers were not able to solve my problem.</p>
<p>I have a firebase DB which only has two key-value pairs. Below is the json.</p>
<pre><code>{
"route" : {
"routeA" : {
"stop" : "Street 1",
"time" : "11:00 PM"
}
}
}
</code></pre>
<p>The follo... | Though this question was answered a few times, any of the answers were not able to solve my problem. I have a firebase DB which only has two key-value pairs. Below is the json. [CODE] The following is my code to get data from firebase DB [CODE] This is the simple code without any recyclerview as suggested by Frank. The... | android|firebase|android-recyclerview|firebase-realtime-database|firebaseui | 1 | 2016-05-06T17:29:31.037Z | 2,016 | 5 | 17 | 4 | 1,159 | 2 | 934 | 50 | 5 | 5 | true | false | false | false | false | false | low |
37,078,246 | Android LinearLayout: Give the first element remaing width | <p>I am trying to achieve the following layout for 2 elements in a LinearLayout:</p>
<p><a href="https://i.stack.imgur.com/UWQYq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UWQYq.png" alt="enter image description here"></a></p>
<p>So to sum up:
- The second element should be allowed to fill as ... | I am trying to achieve the following layout for 2 elements in a LinearLayout: So to sum up: - The second element should be allowed to fill as much as it needs - The first element should be shortened down (textview ending on "...") if it is necessary. - On bigger devices, both elements should be visible (if possible of ... | android|android-layout|android-linearlayout | 0 | 2016-05-06T17:30:32.120Z | 2,016 | 5 | 17 | 4 | 199 | 3 | 553 | 58 | 3 | 1 | true | false | false | false | false | false | zero |
37,078,364 | GSON exception: Expected BEGIN_ARRAY but was BEGIN_OBJECT | <p>I'm getting a JSON response (list of items) from a .NET WS, so that I want to transform to a List in my Android app. But when using GSON library, I get the following exception:</p>
<blockquote>
<p>com.google.gson.JsonSyntaxException: java.lang.IllegalStateException:
Expected BEGIN_ARRAY but was BEGIN_OBJECT at ... | I'm getting a JSON response (list of items) from a .NET WS, so that I want to transform to a List in my Android app. But when using GSON library, I get the following exception: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $ JSON ... | java|android|json|gson | -1 | 2016-05-06T17:37:28.937Z | 2,016 | 5 | 17 | 4 | 1,177 | 1 | 523 | 57 | 4 | 2 | true | false | false | false | false | true | negative |
37,078,403 | BroadcastReceiver is not starting Service in Android | <p>I have created a <code>Service</code> in my Android application and I want to run it even when the application is not running. I have written this code (given below) for that. This code should continuously generate notifications with 5 seconds' intervals. I have extended <code>BroadcastReceiver</code> class, and I h... | I have created a Service in my Android application and I want to run it even when the application is not running. I have written this code (given below) for that. This code should continuously generate notifications with 5 seconds' intervals. I have extended BroadcastReceiver class, and I have overridden its method pub... | android | 0 | 2016-05-06T17:40:25.013Z | 2,016 | 5 | 17 | 4 | 42 | 0 | 695 | 52 | 1 | 4 | true | true | false | false | false | false | zero |
37,078,547 | Background in Android Studio doesn't work | <p>I'm trying to setup an image as background of my app. I see it in Android Studio preview but if I load the app on my phone (Android 5) I can't see the image. This is the code. I'm new in Android world.</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xm... | I'm trying to setup an image as background of my app. I see it in Android Studio preview but if I load the app on my phone (Android 5) I can't see the image. This is the code. I'm new in Android world. [CODE] Thanks in advance and sorry for my bad English. | android|background | 0 | 2016-05-06T17:48:36.577Z | 2,016 | 5 | 17 | 4 | 729 | 1 | 256 | 41 | 2 | 1 | true | false | false | false | false | false | zero |
37,078,710 | How Do We Inherit Test Classes Across Android Library Modules? | <p>I have an Android Studio project with two library modules: <code>foo-module</code> and <code>bar-module</code>. Each implements a library, with <code>foo-module</code> defining a strategy interface and <code>bar-module</code> depending upon <code>foo-module</code> and implementing such a strategy. <code>foo-module</... | I have an Android Studio project with two library modules: foo-module and bar-module . Each implements a library, with foo-module defining a strategy interface and bar-module depending upon foo-module and implementing such a strategy. foo-module has instrumentation tests ( foo-module/src/androidTest/ ) to test its core... | android|android-gradle-plugin | 23 | 2016-05-06T18:00:20.307Z | 2,016 | 5 | 18 | 4 | 2,836 | 1 | 1,946 | 62 | 2 | 0 | false | false | true | false | true | false | high |
37,078,821 | Rest api return list of images with Node JS to Android user | <p>Good evening,</p>
<p>I seek how to retrieve the result of a c ++ file (main.cpp) then I send it to an android user, I'm talking about JSON (REST).
that is to say, after storing the image on the server (sent by the user) I have to run the main.cpp file and I get the result (of the image sets) and then I send it to u... | Good evening, I seek how to retrieve the result of a c ++ file (main.cpp) then I send it to an android user, I'm talking about JSON (REST). that is to say, after storing the image on the server (sent by the user) I have to run the main.cpp file and I get the result (of the image sets) and then I send it to user (androi... | android|c++|node.js | 0 | 2016-05-06T18:07:43.757Z | 2,016 | 5 | 18 | 4 | 189 | 0 | 553 | 59 | 3 | 2 | true | true | false | false | false | false | zero |
37,078,822 | Android Studio: Error: Expected resource of type styleable [ResourceType] | <p>in android studio, when i want generate signed apk, Leads to the following error:</p>
<p><code>Error:Error: Expected resource of type styleable [ResourceType]</code></p>
<p>this Class is: <a href="https://github.com/astuetz/PagerSlidingTabStrip" rel="nofollow">https://github.com/astuetz/PagerSlidingTabStrip</a></p... | in android studio, when i want generate signed apk, Leads to the following error: Error:Error: Expected resource of type styleable [ResourceType] this Class is: https://github.com/astuetz/PagerSlidingTabStrip How can I fix the error? PagerSlidingTabStrip class: [CODE] values/attrs.xml [CODE] | android|android-studio|android-resources | 4 | 2016-05-06T18:07:44.330Z | 2,016 | 5 | 18 | 4 | 7,636 | 3 | 292 | 73 | 3 | 2 | true | false | true | false | false | false | low |
37,078,855 | How to setup the environment for android instrumentation tests and make a sample Activity UI test? | <p><strong>Disclaimer</strong>
Recently I’ve need to start testing my Android Applications and I’ve found many problems during my way through a successful test. The answers for my troubles weren’t easy to find, therefore, I’ve decided to share what I’ve learned from the community to the community. </p>
<blockquote>
... | Disclaimer Recently I’ve need to start testing my Android Applications and I’ve found many problems during my way through a successful test. The answers for my troubles weren’t easy to find, therefore, I’ve decided to share what I’ve learned from the community to the community. Can I answer my own question? Yes! Stack ... | android|unit-testing|android-studio|testing | 1 | 2016-05-06T18:10:18.237Z | 2,016 | 5 | 18 | 4 | 1,167 | 1 | 783 | 98 | 4 | 0 | false | false | false | false | false | false | low |
37,078,892 | ListView stealing focus form EditText after reload | <p>So I have an <code>EditText</code> and a <code>ListView</code> below it. I'm listening for the <code>KEYCODE_ENTER</code> to be pressed and after that, I'm adding an entry to the listview's adapter and call <code>notifyDataSetChanged()</code> method. Surprisingly, but after that, the very first item in the listview ... | So I have an EditText and a ListView below it. I'm listening for the KEYCODE_ENTER to be pressed and after that, I'm adding an entry to the listview's adapter and call notifyDataSetChanged() method. Surprisingly, but after that, the very first item in the listview becomes focused instead of previously focused EditText ... | android|listview|android-edittext|focus | 0 | 2016-05-06T18:12:18.543Z | 2,016 | 5 | 18 | 4 | 1,144 | 2 | 727 | 50 | 4 | 2 | true | false | false | false | false | false | zero |
37,079,080 | Increasing PermGen space for Jenkins/gradle | <p>I am running a Jenkins build of an Android project on a Mac Mini (10.9.5). The Jenkins build is failing with error messages like this:</p>
<pre><code><package>.myTest > test_myTest FAILED
org.mockito.cglib.core.CodeGenerationException at test_myTest.java:65
Caused by: java.lang.reflect.InvocationTargetExc... | I am running a Jenkins build of an Android project on a Mac Mini (10.9.5). The Jenkins build is failing with error messages like this: [CODE] This is sometimes followed by messages like [CODE] It usually fails at the same point in the build. According to the Jenkins wiki Do you consistently see OOME around the same pha... | android|jenkins|android-gradle-plugin|permgen | 1 | 2016-05-06T18:25:33.233Z | 2,016 | 5 | 18 | 4 | 2,487 | 2 | 1,539 | 43 | 4 | 3 | true | false | false | false | false | false | low |
37,079,218 | Receive broadcast from notification | <p>I try to send broadcast to fragment when notification arrived. I think I've done everything ok, but it doesn't work. Could you tell me what am I doing wrong ? This is how I send broadcast:</p>
<pre><code>if (code == 1) {
int id = Integer.parseInt(data[1]);
int idMessage = Integer.pa... | I try to send broadcast to fragment when notification arrived. I think I've done everything ok, but it doesn't work. Could you tell me what am I doing wrong ? This is how I send broadcast: [CODE] and this is how I receive it in my fragment : [CODE] | android|push-notification|notifications | 1 | 2016-05-06T18:34:12.950Z | 2,016 | 5 | 18 | 4 | 947 | 2 | 248 | 35 | 3 | 2 | true | false | false | false | false | false | low |
37,079,254 | Android - Activity Typecasting into an Interface Type | <p>This is code from Head First Android. Inside onAttach method, I'm wondering how the Activity activity variable is being typecast into WorkoutListListener. Is there a super-sub relationship?</p>
<pre><code>public class WorkoutListFragment extends ListFragment {
public WorkoutListFragment() {
// Required empty p... | This is code from Head First Android. Inside onAttach method, I'm wondering how the Activity activity variable is being typecast into WorkoutListListener. Is there a super-sub relationship? [CODE] } | android | 0 | 2016-05-06T18:36:38.227Z | 2,016 | 5 | 18 | 4 | 920 | 2 | 198 | 53 | 1 | 1 | true | false | false | false | false | false | zero |
37,079,416 | Can I use Stetho with Spring RestTemplate for Android? | <p>Facebook's stetho seems to only have great support for OKHTTP and very little for all the other networking frameworks for Android: <a href="http://facebook.github.io/stetho/#integrations" rel="nofollow noreferrer">http://facebook.github.io/stetho/#integrations</a> </p>
<p>I'm using Spring RestTemplate and I'm wonde... | Facebook's stetho seems to only have great support for OKHTTP and very little for all the other networking frameworks for Android: http://facebook.github.io/stetho/#integrations I'm using Spring RestTemplate and I'm wondering how I can get stetho to play nicely with Spring. I do know I can use OKHTTP with Spring Restte... | android|spring|facebook|resttemplate|stetho | 1 | 2016-05-06T18:47:22.013Z | 2,016 | 5 | 18 | 4 | 157 | 0 | 2,011 | 54 | 5 | 0 | false | true | false | false | false | false | low |
37,079,440 | Register media button on xamarin not working | <p>I have been trying to register to receive broadcast events from media button. I have successfully done in java and now I was porting it to Xamarin. But no matter what I try, its not recording anything. I have implemented receivers of all kinds, but for some reason, media button is just not working for me.</p>
<p>I ... | I have been trying to register to receive broadcast events from media button. I have successfully done in java and now I was porting it to Xamarin. But no matter what I try, its not recording anything. I have implemented receivers of all kinds, but for some reason, media button is just not working for me. I have tried:... | android|xamarin|xamarin.android | 0 | 2016-05-06T18:48:45.837Z | 2,016 | 5 | 18 | 4 | 408 | 0 | 464 | 44 | 3 | 3 | true | true | false | false | false | false | zero |
37,079,449 | Duplicate entry: org/hamcrest/BaseDescription.class | <p>There is another <a href="https://stackoverflow.com/questions/32543197/error-json-simple-java-util-zip-zipexception-duplicate-entry-org-hamcrest-bas">question that has an answer</a> that does not work for me (as I don't have the library the selected answer has).</p>
<p>I have searched through all my project for the... | There is another question that has an answer that does not work for me (as I don't have the library the selected answer has). I have searched through all my project for the BaseDescription and there is only 1 occurrence of the BaseDescription and another for a subclass: I also went through my android.iml file and made ... | android|android-studio|android-gradle-plugin|dex|hamcrest | 0 | 2016-05-06T18:49:33.130Z | 2,016 | 5 | 18 | 4 | 1,400 | 1 | 638 | 51 | 5 | 1 | true | false | false | false | false | false | zero |
37,079,491 | Android - Wait for Volley response to complete and continue executing | <p>I need execute a Volley request and wait for the response to parse it and return it, but have no idea on how to achieve this.
Can someone help?
here is my code :</p>
<pre><code>public void getWord(){
final JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, "http://ent-ifsi.com/Proj... | I need execute a Volley request and wait for the response to parse it and return it, but have no idea on how to achieve this. Can someone help? here is my code : [CODE] There is 7 word in each array but when i'm trying to get acess into my initGame function, it said they are empty, i guess it's because volley request i... | android|android-volley | 3 | 2016-05-06T18:52:28.107Z | 2,016 | 5 | 18 | 4 | 4,495 | 1 | 414 | 69 | 2 | 2 | true | false | true | false | false | false | low |
37,079,626 | Populate listview from SQLite returns memory address | <p>I am trying to populate listview from my SQLite db using Java in AndroidStudio 2.1</p>
<p>The problem I have is that the data being returned is a memory address and not the object as shown below</p>
<p><a href="http://i.imgur.com/03ktUhs.jpg" rel="nofollow">http://i.imgur.com/03ktUhs.jpg</a></p>
<p>Here is my Mai... | I am trying to populate listview from my SQLite db using Java in AndroidStudio 2.1 The problem I have is that the data being returned is a memory address and not the object as shown below http://i.imgur.com/03ktUhs.jpg Here is my MainActivity class: public class MainActivity extends ListActivity { [CODE] } Here is the ... | android|sqlite|listview | 0 | 2016-05-06T19:00:16.433Z | 2,016 | 5 | 19 | 4 | 84 | 1 | 549 | 52 | 3 | 2 | true | false | false | false | false | false | zero |
37,079,771 | Android Studio Basic's First Exercise Visualization and HEX Kernel | <p>I have an AMD E1 Radeon processor and get the following message:</p>
<blockquote>
<p>ERROR: x86 emulation currently requires hardware acceleration!<br>
Please ensure Intel HAXM is properly installed and usable.<br>
CPU acceleration status: HAX kernel module is not installed!</p>
</blockquote>
<p>There are tw... | I have an AMD E1 Radeon processor and get the following message: ERROR: x86 emulation currently requires hardware acceleration! Please ensure Intel HAXM is properly installed and usable. CPU acceleration status: HAX kernel module is not installed! There are two options: Android Documentation (BIOS Option) Before attemp... | java|xml|android-studio | 1 | 2016-05-06T19:09:00.633Z | 2,016 | 5 | 19 | 4 | 47 | 0 | 1,627 | 66 | 3 | 0 | false | true | false | false | false | false | low |
37,079,841 | Android layout: place a view between two views | <p>I am trying to make a screen, preferably with XML only, to look like this:
<a href="https://i.stack.imgur.com/D3Flm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D3Flm.png" alt="enter image description here"></a></p>
<p>I followed <a href="https://stackoverflow.com/a/26688395/2819864">this appr... | I am trying to make a screen, preferably with XML only, to look like this: I followed this approach, but using FrameLayout I only have the option to position the "orange" view using layout_gravity , and as I try to explain in the image, I don't know the layouts' height, because both measure with layout_weight. My layou... | android|xml|android-layout|overlap|android-layout-weight | 6 | 2016-05-06T19:13:35.697Z | 2,016 | 5 | 19 | 4 | 3,858 | 2 | 361 | 46 | 5 | 1 | true | false | true | false | false | false | medium |
37,079,912 | Input stream corruption android | <p>I'm working on an app in Android Studio, and I have a file in the assets folder. Though it doesn't have a path and I need a File object to be created from it, I've written this code:</p>
<pre><code>InputStream asset = assetManager.open("databases/file.txt");
BufferedReader br = new BufferedReader(ne... | I'm working on an app in Android Studio, and I have a file in the assets folder. Though it doesn't have a path and I need a File object to be created from it, I've written this code: [CODE] When I pull the file back to the computer, I find it's corrupted, or simply different from the original, also in the size. When am... | android|assets | 0 | 2016-05-06T19:19:22.987Z | 2,016 | 5 | 19 | 4 | 66 | 0 | 337 | 31 | 2 | 1 | true | true | false | false | false | false | zero |
37,079,962 | Need Blocking UI for disabled/outdated Google Play Services | <p>I'm checking and resolving Google Play Services Availability like</p>
<pre><code>public static boolean resolvePlayServices(@NonNull final Activity context) {
final int resultCode = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context);
if(resultCode != ConnectionResult.SUCCESS) ... | I'm checking and resolving Google Play Services Availability like [CODE] Moreover I've added version info in Menifest file [CODE] Play Services on my testing device is disabled and outdated, but the resultCode I'm getting is SERVICE_VERSION_UPDATE_REQUIRED and clicking on the update button is doing nothing except pausi... | android|google-play-services | 0 | 2016-05-06T19:22:15.383Z | 2,016 | 5 | 19 | 4 | 127 | 0 | 899 | 59 | 2 | 2 | true | true | false | false | false | false | zero |
37,080,067 | Android: Text view dynamically show the text in multiline depends on the text size | <p>My text view content should set dynamically. Depends on the text size it needs to be multi-line and get sized according to the actual content. If the text content is null then then text view should not be visible</p>
<p>I tried following</p>
<pre><code> <TextView android:id="@+id/xyz"
... | My text view content should set dynamically. Depends on the text size it needs to be multi-line and get sized according to the actual content. If the text content is null then then text view should not be visible I tried following [CODE] Is this correct approach?. Here how can I decide how many lines the text view shou... | android|textview | 0 | 2016-05-06T19:29:19.150Z | 2,016 | 5 | 19 | 4 | 803 | 1 | 486 | 82 | 2 | 1 | true | false | false | false | false | false | zero |
37,080,110 | getResources() in FragmentStatePagerAdapter? | <p>When I try to use <code>getResources().getDrawable(icons[position])</code> it says "can't resolve method getResources()", giving the options to create a getter, create property or create method.</p>
<p>Why can't I invoke <code>getResources()</code> from this class?</p>
<pre><code>import android.graphics.drawable.D... | When I try to use getResources().getDrawable(icons[position]) it says "can't resolve method getResources()", giving the options to create a getter, create property or create method. Why can't I invoke getResources() from this class? [CODE] | android | -1 | 2016-05-06T19:32:18.773Z | 2,016 | 5 | 19 | 4 | 271 | 1 | 239 | 44 | 1 | 1 | true | false | false | false | false | true | negative |
37,080,374 | Android AudioRecord forcing another stream to MIC audio source | <p><strong>Update 3:</strong> I have partnered with another developer and we seem to found somebody who can do this for a large sum of money. They have sent us a test apk and it seems to work. We will go ahead and purchase the source. I hope we are not going to be scammed. I'll update once I find out</p>
<p><strong>Up... | Update 3: I have partnered with another developer and we seem to found somebody who can do this for a large sum of money. They have sent us a test apk and it seems to work. We will go ahead and purchase the source. I hope we are not going to be scammed. I'll update once I find out Update 2: Still working on it. After m... | java|android|c|android-ndk|qualcomm | 83 | 2016-05-06T19:52:09.783Z | 2,016 | 5 | 19 | 4 | 7,998 | 2 | 3,703 | 62 | 5 | 4 | true | false | true | false | true | false | high |
37,080,416 | How to show a text from one fragment in another fragment? | <p><strong>I WAS WORKING BY THE EXAMPLE YOU JUST GAVE ME AS DUPLICATE, READ THE ENTIRE POST, TY</strong></p>
<p>I'm making a simple app with sliding menu by using the template provided by android studio. And I have to use fragments to switch between items of the sliding menu.</p>
<p>What I wanna do? (check app design... | I WAS WORKING BY THE EXAMPLE YOU JUST GAVE ME AS DUPLICATE, READ THE ENTIRE POST, TY I'm making a simple app with sliding menu by using the template provided by android studio. And I have to use fragments to switch between items of the sliding menu. What I wanna do? (check app design at the bottom) When I click on butt... | android|android-fragments | 0 | 2016-05-06T19:55:10.103Z | 2,016 | 5 | 19 | 4 | 3,078 | 1 | 717 | 57 | 2 | 3 | true | false | true | false | false | false | zero |
37,080,418 | converting from byte array to drawable image gives corrupt image: Android | <p>I am converting an image into a byte array. Sending it over a socket, then once it is through the socket, I need to convert it back to a drawable, png, or any type of image that I can use as the background of an image button. <strong>The problem is that when I either convert into a byte array, or from an array into ... | I am converting an image into a byte array. Sending it over a socket, then once it is through the socket, I need to convert it back to a drawable, png, or any type of image that I can use as the background of an image button. The problem is that when I either convert into a byte array, or from an array into a drawable,... | java|android|arrays|image|sockets | 4 | 2016-05-06T19:55:12.480Z | 2,016 | 5 | 19 | 4 | 3,961 | 1 | 1,488 | 73 | 5 | 3 | true | false | true | false | false | false | low |
37,080,421 | Fatal Exception: Async Task 3 | <p>I am having the following error code occur when i try to run my app:</p>
<pre><code>05-06 19:47:05.977 19671-19705/com.example.matth_000.weather E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #3
Process: com.example.matth_000.weather, PID: 19671
java.lang.RuntimeException: An error occured while executing doInB... | I am having the following error code occur when i try to run my app: [CODE] Below is a copy of my MainActivity.java file: [CODE] Where am I going wrong? | java|android|android-asynctask | 0 | 2016-05-06T19:55:21.043Z | 2,016 | 5 | 19 | 4 | 16 | 0 | 152 | 29 | 3 | 2 | true | true | false | false | false | false | zero |
37,080,445 | Create different players (Objects) respecting the amount given | <p>I'm starting a new <strong>card game</strong>. It will be very basic, but even though I'm not new to programming, I haven't got much experience on it.</p>
<p>However, this card game should begin asking the user the <strong>amount</strong> of players who'll be playing, and I'm thinking about making a <strong>player<... | I'm starting a new card game . It will be very basic, but even though I'm not new to programming, I haven't got much experience on it. However, this card game should begin asking the user the amount of players who'll be playing, and I'm thinking about making a player Class in order to create players who can have a Card... | android | 1 | 2016-05-06T19:57:03.513Z | 2,016 | 5 | 19 | 4 | 28 | 1 | 1,114 | 62 | 1 | 3 | true | false | false | false | false | false | low |
37,080,602 | How to remove extra whitespace on pie charts from MpAndroidCharts? | <p>So I have a <code>PieChart</code> that is using <code>setMaxAngle</code> to create something like a gauge. However, there is significant whitespace under it that I need to remove. I can't find any methods to modify the viewport for <code>PieChart</code>. So how can I refer the white space? See pic below.</p>
<p... | So I have a PieChart that is using setMaxAngle to create something like a gauge. However, there is significant whitespace under it that I need to remove. I can't find any methods to modify the viewport for PieChart . So how can I refer the white space? See pic below. My layout is the following: [CODE] | android|charts|mpandroidchart | 7 | 2016-05-06T20:07:06.053Z | 2,016 | 5 | 20 | 4 | 2,722 | 1 | 302 | 66 | 3 | 1 | true | false | true | false | false | false | medium |
37,080,607 | I don't know what am I doing wrong in updating database using Volley | <p>In my program I have <code>ListView</code> of rooms(only available are shown). Tapping on one of items results in showing a layout with details like price etc. Also here is a book button. If user is logged in it should book the room (update the database and set 'available' property of certain room to 0). If not, use... | In my program I have ListView of rooms(only available are shown). Tapping on one of items results in showing a layout with details like price etc. Also here is a book button. If user is logged in it should book the room (update the database and set 'available' property of certain room to 0). If not, user should log in.... | php|android|mysql|android-volley | 0 | 2016-05-06T20:07:26.970Z | 2,016 | 5 | 20 | 4 | 583 | 1 | 557 | 68 | 4 | 2 | true | false | false | false | false | false | zero |
37,080,673 | How to do correct timing of Android RenderScript code on Nvidia Shield | <p>I have implemented a small CNN in RenderScript and want to profile the performance on different hardware. On my Nexus 7 the times make sense, but on the NVIDIA Shield they do not. </p>
<p>The CNN (LeNet) is implemented in 9 layers residing in a queue, computation is performed in sequence. Each layer is timed indivi... | I have implemented a small CNN in RenderScript and want to profile the performance on different hardware. On my Nexus 7 the times make sense, but on the NVIDIA Shield they do not. The CNN (LeNet) is implemented in 9 layers residing in a queue, computation is performed in sequence. Each layer is timed individually. Here... | android|multithreading|performance|timing|renderscript | 7 | 2016-05-06T20:11:40.553Z | 2,016 | 5 | 20 | 4 | 628 | 2 | 1,646 | 70 | 5 | 2 | true | false | false | false | false | false | medium |
37,080,742 | Android handle soft enter key | <p>I'm building a very simple list app on android where I have an edittext for input, a listview to store saved input, and a button to push text from the edittext to listview. Right now I am trying to handle the error key, so not only does it not create a new line on press, but also so that it will send the text to the... | I'm building a very simple list app on android where I have an edittext for input, a listview to store saved input, and a button to push text from the edittext to listview. Right now I am trying to handle the error key, so not only does it not create a new line on press, but also so that it will send the text to the li... | java|android|listview|android-edittext | 0 | 2016-05-06T20:16:41.157Z | 2,016 | 5 | 20 | 4 | 308 | 1 | 721 | 29 | 4 | 3 | true | false | false | false | false | false | zero |
37,080,765 | Login activity Using Shared Prefrence | <p>I made login activity using shared preference. Code is below.</p>
<p>I got an error when i login. It always show password is incorrect.</p>
<p>Any body help me to improve the code so that i complete my project.</p>
<p>UserSession Class</p>
<pre><code> package com.achal089.pestcontrol;
import android.content.Con... | I made login activity using shared preference. Code is below. I got an error when i login. It always show password is incorrect. Any body help me to improve the code so that i complete my project. UserSession Class [CODE] Login activity [CODE] Register activity [CODE] | android|sharedpreferences | 0 | 2016-05-06T20:17:42.470Z | 2,016 | 5 | 20 | 4 | 212 | 2 | 268 | 37 | 2 | 3 | true | false | false | false | false | false | zero |
37,081,107 | How to update google map without reloading in android? | <p>In my project I have to track any vehicle through google map. In that case I have to update the marker position after 1 minute set by me . But my problem is that every time the google map get refreshed . Here is my code :</p>
<pre><code>public class MapsActivity extends FragmentActivity {
private GoogleMap mMap;
... | In my project I have to track any vehicle through google map. In that case I have to update the marker position after 1 minute set by me . But my problem is that every time the google map get refreshed . Here is my code : [CODE] } Please help me as I want not get the map reloaded every time the marker got updated . | android | -1 | 2016-05-06T20:43:43.200Z | 2,016 | 5 | 20 | 4 | 207 | 2 | 316 | 54 | 1 | 1 | true | false | false | false | false | true | negative |
37,081,154 | Can't get JSONObject from JSONArray | <p>My php:</p>
<pre><code> <?php
$con=mysqli_connect("localhost","xxx","xxx","xxx");
$result = mysqli_query($con, "SELECT username, x,y FROM user");
$jsonData = array();
while($array = mysqli_fetch_assoc($result)){
$jsonData[] = $array;
}
echo json_encode($jsonData);
mysqli_close($con);
?>
</code></pre>... | My php: [CODE] My Fetched data to JSONArray: [{"username":"one","x":"22.","y":"55"},{"username":"two","x":2,"y":5}] Android code: [CODE] Eror: org.json.JSONArray cannot be converted to JSONObject It doesn't work. I'm stuck with it. | java|php|android|mysql|database | 0 | 2016-05-06T20:46:50.907Z | 2,016 | 5 | 20 | 4 | 512 | 3 | 231 | 35 | 5 | 2 | true | false | false | false | false | false | zero |
37,081,514 | uiautomator dumpWindowHierarchy(...) cannot change dump directory | <p>I am using uiautomator dumpWindowHierarchy(...) to dump a view tree of the current device display. However, it seems I cannot change the saving directory for the dumped .xml files. The code below works, but it saves .xml file to /data/local/tmp/local/tmp folder. "dumpXml" variable is just a file name, e.g. "test.xml... | I am using uiautomator dumpWindowHierarchy(...) to dump a view tree of the current device display. However, it seems I cannot change the saving directory for the dumped .xml files. The code below works, but it saves .xml file to /data/local/tmp/local/tmp folder. "dumpXml" variable is just a file name, e.g. "test.xml" [... | android|android-uiautomator | -1 | 2016-05-06T21:12:50.793Z | 2,016 | 5 | 21 | 4 | 870 | 1 | 611 | 65 | 2 | 1 | true | false | false | false | false | true | negative |
37,081,620 | Selendroid Selenium android (sencha extjs) test couldn't find element | <p>I am trying to run a test on my android device and using Selenium Webdriver with Java. Currently, only the .apk is started. Selendroid Inspector can not load properties. Its showing loading progress bar and not able to load web element viewer.
Relevant login system code:</p>
<pre><code>'Ext.define('TutorialApp.view... | I am trying to run a test on my android device and using Selenium Webdriver with Java. Currently, only the .apk is started. Selendroid Inspector can not load properties. Its showing loading progress bar and not able to load web element viewer. Relevant login system code: [CODE] Here is my code: [CODE] How can I solve t... | java|android|selenium | 2 | 2016-05-06T21:22:11.390Z | 2,016 | 5 | 21 | 4 | 106 | 0 | 387 | 69 | 3 | 2 | true | true | false | false | false | false | low |
37,081,624 | Realm access across threads with rxjava and dagger2 | <p>I've read many posts regarding this topic but it's still a little unclear to me. I understand you can't access <code>Realm</code> class or realm objects across different threads so I'm wondering what the optimal way is to handle that.</p>
<p>I have a service that starts a thread. That thread does background work (i... | I've read many posts regarding this topic but it's still a little unclear to me. I understand you can't access Realm class or realm objects across different threads so I'm wondering what the optimal way is to handle that. I have a service that starts a thread. That thread does background work (including work via rxjava... | java|android|multithreading|realm | 6 | 2016-05-06T21:22:25.580Z | 2,016 | 5 | 21 | 4 | 489 | 1 | 1,107 | 51 | 4 | 0 | false | false | false | false | false | false | medium |
37,081,632 | BroadcastReceiver is not being called from AndroidManifest on BOOT_COMPLETE in Android | <p>In my Android application I want to run a <code>Service</code> without opening/running my application. For that I have extended <code>BroadcastReciever</code> class. But this <code>BroadcastReceiver</code> class is not being called from <code>AndroidManifest.xml</code> on <code>BOOT_COMPLETE</code>. So please tell w... | In my Android application I want to run a Service without opening/running my application. For that I have extended BroadcastReciever class. But this BroadcastReceiver class is not being called from AndroidManifest.xml on BOOT_COMPLETE . So please tell what is the problem in my code? Or is there any other way to run a S... | android | -1 | 2016-05-06T21:22:42.637Z | 2,016 | 5 | 21 | 4 | 64 | 1 | 580 | 86 | 1 | 2 | true | false | false | false | false | true | negative |
37,081,724 | Custom Array adapter for chat app | <p>I'm creating Bluetooth chat app and I'm kinda new to Android programming.
Atm my app can manage bluetooth connection and send/receive data.
My problem is populating list view with strings because I'm not so good with creating Custom ArrayAdapters. I have 2 shapes (Red and Blue bubble) for sent and received messages ... | I'm creating Bluetooth chat app and I'm kinda new to Android programming. Atm my app can manage bluetooth connection and send/receive data. My problem is populating list view with strings because I'm not so good with creating Custom ArrayAdapters. I have 2 shapes (Red and Blue bubble) for sent and received messages (R.... | android|bluetooth|android-arrayadapter | 1 | 2016-05-06T21:32:01.557Z | 2,016 | 5 | 21 | 4 | 1,116 | 1 | 680 | 33 | 3 | 2 | true | false | false | false | false | false | low |
37,081,743 | Three.js problems with mobile device orientation | <p>I'm bug testing a web app that was written in three.js and I've had reports of users on tablets (specifically Android) getting some strange behavior from the scene. </p>
<p><a href="https://i.stack.imgur.com/FkFi3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FkFi3.jpg" alt="Image with error"><... | I'm bug testing a web app that was written in three.js and I've had reports of users on tablets (specifically Android) getting some strange behavior from the scene. Here is the same view as it should be rendered: It happens when they change device orientation but has also been reported, on a 2 in 1 tablet running windo... | javascript|android|three.js | 2 | 2016-05-06T21:34:08.150Z | 2,016 | 5 | 21 | 4 | 644 | 1 | 615 | 48 | 3 | 1 | true | false | false | false | false | false | low |
37,081,755 | NavigationView: one icon isn't tinting but the rest are. How to tint it? | <p><strong>Update:</strong> Found a related bug report. <a href="https://code.google.com/p/android/issues/detail?id=176133" rel="nofollow noreferrer">https://code.google.com/p/android/issues/detail?id=176133</a> I upgraded my support libraries to 23.3.0, but it didn't fix the problem.</p>
<p><strong>Update:</strong> ... | Update: Found a related bug report. https://code.google.com/p/android/issues/detail?id=176133 I upgraded my support libraries to 23.3.0, but it didn't fix the problem. Update: If I change the icon, then it works. Something isn't working with this message icon. I have a navigation drawer, and every item is tinting excep... | android|icons|navigation-drawer | 2 | 2016-05-06T21:35:13.110Z | 2,016 | 5 | 21 | 4 | 111 | 0 | 573 | 72 | 3 | 1 | true | true | false | false | false | false | low |
37,081,783 | broadcaster permission for android.provider.Telephony.SMS_RECEIVED | <p>I recently did a code scan on my Android source code using HPFortify service. They reported security vulnerability regarding one of the broadcast receivers. They suggested to use the broadcaster permission to reduce the attack vector. This way you are restricting broadcaster, otherwise any malicious application can ... | I recently did a code scan on my Android source code using HPFortify service. They reported security vulnerability regarding one of the broadcast receivers. They suggested to use the broadcaster permission to reduce the attack vector. This way you are restricting broadcaster, otherwise any malicious application can sen... | android|android-permissions|android-broadcastreceiver | 1 | 2016-05-06T21:37:35.310Z | 2,016 | 5 | 21 | 4 | 1,042 | 1 | 640 | 66 | 3 | 3 | true | false | false | false | false | false | low |
37,081,798 | Libgdx Test if line intersects with rectangle | <p>Is there a way I can test if a Rectangle object collides with a line? Thanks! </p>
<p>EDIT : </p>
<pre><code>public boolean overlapsLineNodes(Vector2 point1, Vector2 point2) {
boolean collide = false;
MapObjects mapObjects = play.getWorld().level.getCurrentLevel().getLayers().get("collidable").getObjects... | Is there a way I can test if a Rectangle object collides with a line? Thanks! EDIT : [CODE] I do this, but it seems not to give me correct results. I am rending all of the rectanglemapobjects in white, and if one collides with the line, then I render it in green. It randomly renders some in green and I cant figure out ... | java|android|libgdx|2d | 2 | 2016-05-06T21:38:46.130Z | 2,016 | 5 | 21 | 4 | 1,089 | 3 | 324 | 45 | 4 | 1 | true | false | false | false | false | false | low |
37,081,859 | Why does using the Binding Interface resut in a ClassNotFound exception? | <p>I am trying to create a custom attribute for any Android <code>View</code>. </p>
<p>I saw in <a href="https://plus.google.com/+WojtekKalicinski/posts/fJBYpekFkhD" rel="nofollow">this post</a> that I could do it with the Data Binding Library. The <a href="https://developer.android.com/intl/es/tools/data-binding/gui... | I am trying to create a custom attribute for any Android View . I saw in this post that I could do it with the Data Binding Library. The Data Binding Guide and the post explain the layout should begin with a <layout> tag, but when inflating it I get the following exception: [CODE] Here is the layout in question: [CODE]... | android|android-layout|classnotfoundexception|android-databinding | 4 | 2016-05-06T21:43:39.920Z | 2,016 | 5 | 21 | 4 | 896 | 1 | 431 | 72 | 4 | 3 | true | false | false | false | false | false | low |
37,081,947 | GMailSender on Android causing Relay Access Denied Error | <p>I have a app through which you can send a email. This is done using the following code. The sender account is an GMail account:</p>
<pre><code>GMailSender sender = new GMailSender("sender@gmail.com", "APassword");
sender.sendMail(subject,
emailText[0],
"sender@gmail.com",
... | I have a app through which you can send a email. This is done using the following code. The sender account is an GMail account: [CODE] The receiver varies for testing reasons, but should be static when the app is released. Now I started testing by sending mails to another GMail account, which works fine. I continued to... | java|android|email|gmail | 3 | 2016-05-06T21:52:22.643Z | 2,016 | 5 | 21 | 4 | 153 | 0 | 1,223 | 56 | 4 | 1 | true | true | false | false | false | false | low |
37,081,953 | Admob ads loading but not showing | <p>So in my LIBGDX game I'm trying to impement Admob ads.</p>
<p>They load fine but just wont show, even after a 60 second refresh or pressing home button and entering the game again.</p>
<p>I followed some answers on this site, but none of them helped.</p>
<p>Here's the code of Android Launcher class:</p>
<pre><co... | So in my LIBGDX game I'm trying to impement Admob ads. They load fine but just wont show, even after a 60 second refresh or pressing home button and entering the game again. I followed some answers on this site, but none of them helped. Here's the code of Android Launcher class: [CODE] What have I did wrong? | java|android|libgdx|admob | 2 | 2016-05-06T21:52:42.490Z | 2,016 | 5 | 21 | 4 | 516 | 2 | 309 | 33 | 4 | 1 | true | false | false | false | false | false | low |
37,082,000 | Problems with content provider (video and photo) | <p>Hi I'm try to save different files with <code>ContentProvider</code> (videos and photos).But I don't know how to do it in the same class.
I try to do this...</p>
<pre><code>public class MyFileContentProvider extends ContentProvider {
public static final Uri CONTENT_URI = Uri.parse("content://com.renata.ideary/... | Hi I'm try to save different files with ContentProvider (videos and photos).But I don't know how to do it in the same class. I try to do this... [CODE] But always told me the same error: 05-06 22:42:37.932 21837-21849/com.renata.ideary E/JavaBinder: *** Uncaught remote exception! (Exceptions are not yet supported acros... | android|android-contentprovider | 2 | 2016-05-06T21:57:40.913Z | 2,016 | 5 | 21 | 4 | 132 | 0 | 814 | 48 | 2 | 1 | true | true | false | false | false | false | low |
37,082,059 | Making READ, WRITE and NOTIFY working on Android BLE (version 21 and above) | <p>In my application, I got the <strong>READ</strong> and <strong>WRITE</strong> to work on specific <code>BluetoothGattCharacteristic</code> objects.
The <code>BluetoothGattCallback</code> <code>onCharacteristicWrite</code> and <code>onCharacteristicRead</code> are properly called.
I have then tried to setup the <str... | In my application, I got the READ and WRITE to work on specific BluetoothGattCharacteristic objects. The BluetoothGattCallback onCharacteristicWrite and onCharacteristicRead are properly called. I have then tried to setup the NOTIFY option so my Android app gets notified when a specific characteristic on the device cha... | android|bluetooth|notifications|bluetooth-lowenergy | 3 | 2016-05-06T22:02:06.913Z | 2,016 | 5 | 22 | 4 | 2,917 | 1 | 872 | 75 | 4 | 1 | true | false | true | false | false | false | low |
37,082,080 | RxAndroid crashes the app although doOnError is implemented | <p>I have the following code. It's basically an attempt to send all data from a specific SQLite table to DynamoDB:</p>
<pre><code>Observable.create(new Observable.OnSubscribe<Area>() {
@Override
public void call(Subscriber<? super Area> subscriber) {
try {
for (Area item : areaD... | I have the following code. It's basically an attempt to send all data from a specific SQLite table to DynamoDB: [CODE] I'm trying to run it on an emulator with disabled Internet connectivity, and what happens is that the Dynamo client does a couple of (failed) retries, then an exception is thrown and it crashes the app... | android|rx-java|rx-android | 3 | 2016-05-06T22:04:14.470Z | 2,016 | 5 | 22 | 4 | 1,196 | 1 | 479 | 59 | 3 | 1 | true | false | false | false | false | false | low |
37,082,140 | Exception when Android App is deployed via TestFairy | <p>I'm working on an App and everything is fine. But as soon as I deploy to testers using TestFairy the App throws a huge exception at some point which I don't understand at all.</p>
<p>The exception is as follows:</p>
<pre><code>JNI DETECTED ERROR IN APPLICATION: obj == null
in call to GetLongField
from void... | I'm working on an App and everything is fine. But as soon as I deploy to testers using TestFairy the App throws a huge exception at some point which I don't understand at all. The exception is as follows: [CODE] The AsyncTask #1" prio=10 tid=35 Sleeping is the only one with a reference to my code: [CODE] and it points ... | java|android|multithreading|testfairy | 1 | 2016-05-06T22:09:52.923Z | 2,016 | 5 | 22 | 4 | 441 | 1 | 909 | 52 | 4 | 3 | true | false | false | false | false | false | low |
37,082,206 | Call a Method in Activity Class from Another Class With its Context | <p>I'm trying to create a class for reading location and that it can be used for different activities in my android application. But nothing works.
I think the problem is when I try to call the method refresh activity.</p>
<p>Location Custom Class</p>
<pre><code>public class Localizacion implements LocationListener {... | I'm trying to create a class for reading location and that it can be used for different activities in my android application. But nothing works. I think the problem is when I try to call the method refresh activity. Location Custom Class [CODE] } Activity Custom Class [CODE] Activity App [CODE] | java|android|android-activity|location|android-context | 1 | 2016-05-06T22:16:59.237Z | 2,016 | 5 | 22 | 4 | 334 | 0 | 295 | 67 | 5 | 3 | true | true | false | false | false | false | low |
37,082,310 | Android ListView getView display image randomly | <p>I would like to display items with an adapter in a ListView but when getView is called in the ArrayAdapter, it displays the good image but not on the good item when I am scrolling. It is like if the findViewById didn't give me the good id of the layout.</p>
<pre><code>public class ItemPackAdapter extends ArrayAdapt... | I would like to display items with an adapter in a ListView but when getView is called in the ArrayAdapter, it displays the good image but not on the good item when I am scrolling. It is like if the findViewById didn't give me the good id of the layout. [CODE] Actually I found a solution with : [CODE] But when I am scr... | java|android|listview|imageview|android-arrayadapter | 1 | 2016-05-06T22:28:05.460Z | 2,016 | 5 | 22 | 4 | 190 | 2 | 560 | 47 | 5 | 2 | true | false | false | false | false | false | low |
37,082,354 | Download Manager not working | <p>I'm trying to develop app that show videos and you can Download it
i'm using Download Manager class but it didn't work, also it didn't give me any error :(</p>
<p><strong>this is my download manager code:</strong></p>
<pre><code> public void downloadFileFromUrl(String url, String fileName) {
String fil... | I'm trying to develop app that show videos and you can Download it i'm using Download Manager class but it didn't work, also it didn't give me any error :( this is my download manager code: [CODE] and this is how I'm calling it [CODE] where: path : "192.168.1.5:8080/BlueNet_NMC/blue_elephant.mp4" filename : "blue_eleph... | android|video|android-download-manager | 6 | 2016-05-06T22:33:00.953Z | 2,016 | 5 | 22 | 4 | 9,563 | 4 | 403 | 28 | 3 | 3 | true | false | true | false | false | false | medium |
37,082,407 | Error: Cannot find symbol variable when trying to establish imageviews | <p>So I have an ImageView in my xml file that is an image I created. The id of it is gameplayTop. In my java file for that activity, I try to set a variable to set that imageview, but then when I start up my emulator it says "Error: cannot find symbol variable gameTop".</p>
<p>Here is my xml file:</p>
<pre><code><... | So I have an ImageView in my xml file that is an image I created. The id of it is gameplayTop. In my java file for that activity, I try to set a variable to set that imageview, but then when I start up my emulator it says "Error: cannot find symbol variable gameTop". Here is my xml file: [CODE] And here is my javacode ... | java|android | 1 | 2016-05-06T22:39:08.497Z | 2,016 | 5 | 22 | 4 | 726 | 1 | 451 | 70 | 2 | 2 | true | false | false | false | false | false | low |
37,082,426 | Edit Text inside Alert Dialog Builder | <p>I have an Alert Dialog inside a Fragment:</p>
<pre><code>AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(),
com.yanay.yanay.apps.odds.R.style.AppCompatAlertDialogStyle);
LayoutInflater inflater = getActivity().getLayoutInflater();
build... | I have an Alert Dialog inside a Fragment: [CODE] Number Picked is always null. How can I get the value of the text entered into the edit text. The dialog layout is just a linear layout with an edit text inside. | java|android|android-fragments|android-alertdialog | 1 | 2016-05-06T22:41:03.937Z | 2,016 | 5 | 22 | 4 | 549 | 1 | 210 | 37 | 4 | 1 | true | false | false | false | false | false | low |
37,082,458 | Get variable value OnpostExecute (Async) | <p>I need to get the value of an id that is within my OnpostExecute.</p>
<p>Look into my class that contains OnPostExecute:</p>
<pre><code>listaPedido.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> lista, View item,... | I need to get the value of an id that is within my OnpostExecute. Look into my class that contains OnPostExecute: [CODE] So I try to change my class to delete calling the String value "id", but I can not in any way take this value OnPostExecute. [CODE] | java|android|json|variables|asynchronous | 0 | 2016-05-06T22:44:19.407Z | 2,016 | 5 | 22 | 4 | 220 | 1 | 252 | 40 | 5 | 2 | true | false | false | false | false | false | zero |
37,082,509 | JNI: Can not get array length | <p>I faced with the next problem: I can not do anything with <code>byte[] (jbyteArray)</code> in C code. All functions that work with array in JNI cause <code>JNI DETECTED ERROR IN APPLICATION: jarray argument has non-array type</code>. What's wrong with my code?</p>
<p>C:</p>
<pre><code>#include <stdio.h>
#inc... | I faced with the next problem: I can not do anything with byte[] (jbyteArray) in C code. All functions that work with array in JNI cause JNI DETECTED ERROR IN APPLICATION: jarray argument has non-array type . What's wrong with my code? C: [CODE] ServerUtil: [CODE] Main Activity: [CODE] My environment: Android Studio 2.... | java|android|c|java-native-interface | 4 | 2016-05-06T22:51:12.900Z | 2,016 | 5 | 22 | 4 | 3,347 | 2 | 406 | 29 | 4 | 3 | true | false | true | false | false | false | low |
37,082,545 | How can ArrayMap be used in code exercised by JUnit (noninstrumented) Android unit tests? | <p>If an uninstrumented unit test (not subclassed from AndroidTestCase) calls code that uses an ArrayMap, it hits the infamous <code>Method xxx in xx.xx.xx not mocked</code> error (see <a href="http://tools.android.com/tech-docs/unit-testing-support#TOC-Method-...-not-mocked.-" rel="nofollow">http://tools.android.com/t... | If an uninstrumented unit test (not subclassed from AndroidTestCase) calls code that uses an ArrayMap, it hits the infamous Method xxx in xx.xx.xx not mocked error (see http://tools.android.com/tech-docs/unit-testing-support#TOC-Method-...-not-mocked.- ). The best solution to this error in many cases is to compile the ... | android|unit-testing|collections|build.gradle | 4 | 2016-05-06T22:55:00.950Z | 2,016 | 5 | 22 | 4 | 346 | 2 | 844 | 89 | 4 | 1 | true | false | false | false | false | false | low |
37,082,599 | Change the page number for viewPager | <p>Below is my code for custompageadapter. I have radio buttons on my first page. How can display the second page to the user when any of the radio button are selected.</p>
<pre><code>import android.content.Context;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.v... | Below is my code for custompageadapter. I have radio buttons on my first page. How can display the second page to the user when any of the radio button are selected. [CODE] | android|android-viewpager | 3 | 2016-05-06T23:02:43.603Z | 2,016 | 5 | 23 | 4 | 624 | 1 | 172 | 36 | 2 | 1 | true | false | false | false | false | false | low |
37,082,891 | Application referencing library fails to find interface within another library | <p>I have a strange problem and I cannot figure out regarding libraries and dependency. </p>
<p>I have an app called <code>MyApp</code>. Which calls a class called <code>MyLib1Class1</code>.</p>
<p><code>MyLib1Class1</code> implements <code>MyLib2Interface</code> and <code>MyLib1Class</code> calls <code>MyLib2Class</... | I have a strange problem and I cannot figure out regarding libraries and dependency. I have an app called MyApp . Which calls a class called MyLib1Class1 . MyLib1Class1 implements MyLib2Interface and MyLib1Class calls MyLib2Class and passes the interface to it. MyLib1... and MyLib2... are two separate library projects ... | java|android|maven|android-gradle-plugin | 1 | 2016-05-06T23:42:06.290Z | 2,016 | 5 | 23 | 4 | 17 | 0 | 898 | 78 | 4 | 0 | false | true | false | false | false | false | low |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.