android

  1. B

    Finish application after 15 minutes in background

    How to finish application after 15 minutes, when user minimized? When user exit from the application without finish it, then user turn back after some time network of application is not working. For work need to restart the application. I want to trigger when the app becomes at the background...
  2. M

    How to deselect the select all checkbox when i am deselecting even 1 checkbox in android

    I want functionality in my project where on a click of select all checkbox all the checkbox in the list must get selected and on deselect of checkbox all the other checkbox must get deselected. I have achieved this functionality by doing this: /*in my main activity i have done this*/...
  3. V

    Communication Pc-Phone

    I'm quite new to android, but I have already created several apps and published, on the android market. But now I want to add an upgrade to my app. Basically, my app is a tracking software that currently works with an sms interceptor and so gets the data, like location, Camera, audio recording...
  4. S

    FLutter - Error trying to run the application

    First sorry for bad English. I'm starting in Flutter, I already installed everything that is necessary but when trying to run the test app (either in the emulator or the device) I get the error messages below. Launching lib\main.dart on XT1097 in debug mode... Initializing gradle... Resolving...
  5. M

    Why onChange result is “false” in test LiveData

    It's first my post on stackoverflow and i'm beginer in kotlin, Lifecycle, need help with it. I lost 2 days with it and need help. I have SplashViewModel class class SplashViewModel @Inject constructor( private val configuration: IConfiguration, private val compositeDisposable...
  6. H

    Values Cannot be Converted to JSON Array

    This is the function that's giving me the problem: public String URLToJson() { String result = ""; String jsonString = ReadingURL(" here goes my URL that reads a JSON "); JSONObject jsonResult = null; try { jsonResult = new JSONObject(jsonString); JSONArray...
  7. D

    Why my recycler view adapter clearing during search for items?

    I want to create searching for items from recycler view. I have MainActivity where I have the main recycler view and I have SearchActivity where I have the seconds recycler view for appearing of searching items. When user inputs a letter in the input I ask my SQLite for the same query as my...
  8. A

    Transformations.map LiveData

    I have following code: val liveData = MutableLiveData<String>() liveData.value = "Ali" val res = map(liveData) { post(it) } textview.text = res.value.toString() fun post(name: String): String { return "$name $name" } I expect it to print Ali Ali but it prints a null value. What am I...
  9. R

    Android Studio Git: login screen checked as Remember with wrong password

    I can not access my project in Git because I entered an erroneous password with the box marked (remember), this has caused that the login window no longer appears and therefore the user always invalidates me. I need to access from the Android Studio to clone my project is a requirement. Login...
  10. M

    I cant implement CursorLoader because of Fatal Error

    I am trying to create Fragment of ListView within Activity to interact with CursorLoader to get data from sqlite database and load it synchronously into listview which within Frgament code of activity : package com.example.startup.myfriends; import android.app.Fragment; import...
  11. B

    Updating a List Size for all users

    I am trying to make it so that when a user creates an open game, in my Firebase Database the name of the game is the size of the list. So the very first game created the name of it will = 0, and if another user creates a game then the game will be labeled 1 and so on. I have it set up right now...
  12. K

    Can you guide me to check if any other android application installed then push Notification “Example” app installed

    Any insight to solve this problem will be very helpful... Thank You in advance
  13. M

    SuppressWarning for: Boolean method 'methodName' is always inverted

    The list of the most commoon SuppressWarning annotations is so long and non-intuitive, that I am lost to find a correct annotation for warning I don't want to change the method to return a negative value, since there is a logic consistency in the naming - e.g. method name is: hasFlag(...)...
  14. R

    Attempt to invoke virtual method 'boolean android.media.MediaPlayer.isPlaying()' on a null object reference

    I am trying to stop a music using the back button of the phone. It will function when there is music playing but returns this error Attempt to invoke virtual method boolean android.media.MediaPlayer.isPlaying() on a null object reference when there is no music playing. Here is my code public...
  15. G

    Calling ACTION_CALL intent from arraylist

    I created araylist and stored list of some most important services in small town ,and some random img of phone.The idea was that when user press it it would via intent call that number.But the problem is i don't know where to store phone numbers.I have vague idea how to call that intent but it's...
  16. M

    Error: onActivityResult overrides nothing

    I am programming a speech recognition app in Kotlin for Android. class MainActivity : AppCompatActivity() { public override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val intent:Intent =...
  17. S

    Android architecture components paging DataSource.Factory error

    I'm trying to make my DataSource.Factory class, but I get an error when trying to return my PageKeyedDataSource implementation. class SubredditPageKeyedDataSource(private val service: LedditService, private val subredditName: String): PageKeyedDataSource<String...
  18. G

    AndroidStudio onCheackedChangeListener

    Quiero aprender a usar el escuchador onCheackedChangeListener, pero cada vez que lo quiero implementar se cierra la app, se que se puede hacer con onCLick, pero necesito saber usar este Google Translate: I want to learn how to use the listener onCheckedChangeListener, but every time I want to...
  19. I

    Why is still Android Studio using Hello World TextView?

    Everytime I create a new project in Android Studio, by default I get in my MainActivity, a TextView containing "Hello World", which every single time I need to remove it. Why that? Is there any option that can allow me to create a new project witout it? Thanks!
  20. S

    Remove everything before and after a string part in Android

    I want to get Amazon product ASIN from the URL here are some examples: https://www.amazon.com/Premium-Flagship-Lenovo-Processor-Bluetooth/dp/B07H15QHT6/ref=sr_1_2_sspa?s=pc&ie=UTF8&qid=1537733386&sr=1-2-spons&keywords=laptop&psc=1...
Top