• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to create a service similar to the Whatsapp one

Hi guys, I am new on Android developing.
I am developing a sort of IM service similar to whatapp just for fun.
I want to have a service in background to query the server and retrieve messages from it, but I have some problems with JobService.
Yeah, I've read that the old BackgroundService doesn't work anymore on newer version of Android and it's substitute is the JobScheduler system service.
Now, I wonder how Whatsapp does to retrieve messages in background approximately in realtime.
How can I create a JobService executed each second?

I am waiting for answers!
Thanks in advance!

P.S. I tried setPeriod() but since Nougat it doesn't work well anymore, so the suggested workaround is to use setMinimumLatency(), however it doesn't exactly repeat in the time speciefied and I wonder why this...

Gm8go

************************************
Xposed Framework installer zip
************************************
- Mounting /system and /vendor read-write
- Checking environment
Xposed version: 90-beta3
Android version: 8.1 / SDK27
Platform: arm
- Placing files
cp: can't create '/system/xposed.prop': Read-only file system
1 hatası oluştu

Phone corrupting photos after i take them

The phone is "processing" pictures I take and then deleting them. I will take a pic and go to look at it but then it will say in the bottom left corner "processing" and just disappear... I have removed my sd card to rule out that it was in any way the problem and it's still happening with every other photo I take with the phone. I have plugged in my phone to my computer and deleted the whole folder to see if that did anything and I'm still having the same problem. I have a feeling that my internal memory is failing... is there any way to fix this? (EDIT) also, I have plenty of space left on both the device and sd card...

Attachments

  • droid help.PNG
    droid help.PNG
    135.6 KB · Views: 340

Help Mobile data working less and less

Ever since I went to Japan for a holiday, the data has been working worse and worse. Some apps work fine (discord, chrome, maps) while others simply don't work (YouTube, Spotify, Pokemon go). No background stuff seem to work, I need to open the app to get updates (WhatsApp, slack).

No hibernation, weird battery saving modes, VPN or APN are set up.

What can I do?

Ps: unrooted and updated Oneplus 6

How Do You Export Bookmarks In Chrome Or Chromium?

Is there a way to export your bookmarks in Chrome or Chromium on Android? I know your able to export your bookmarks into an HTML file on Windows, Mac or Linux but I like to be able to export my bookmarks every now and then and upload them to my cloud drive, the reason I would like to do this is because I travel often and all I have when I travel is mu phone so if I lose it or if it breaks I will lose all of my bookmarks I have made since my last backup.

Looking for gamerROM 4.4 for lg optimus f3

Hello, as the title states, I am looking for a link for GameROM 4.4 for the lg optimus f3. I don't know if that is thread-worthy or not. I have been using this site for years but never posted until now. Anyway, i pulled out my old f3 recently (sort of). I accidentally wiped /system using twrp about two years ago and it has sat in a drawer since then. So I came across it the other day and decided to fire it up. flashed stock v8 firmware, etc....I have it running on carbon now, which is actually not bad but I remember gameROM being much more lite. Anyway, I cant find a working link for it anywhere so i would really appreciate if someone could point me in the right direction. I have twrp installed (2.8.0.0) so a restorable back up file would work too. i would even be willing to install cwm to restore backup. The ROM is by cyberdev and it is made for t-mobile\metropcs but it always worked fine on my vm. I have checked cyberdev's website but they didnt have anything that old listed. I would appreciate any help!!!!

Lightweight OS for Honor 5x

Hello,
I have a Honor 5x and my experience with that has been horrible. It's a slow and sluggish phone and all I do with it right now is to use it in my kitchen to log my food into MyfitnessPal. However, it is so slow and pathetic that even this experience is terrible. I have removed all apps and have to run 'Phone Manager' on it continuously. Is there any custom ROM that is very lightweight and doesn't take up much resources so that I can just run MyfitnessPal decently on the phone. Other than that is there any way to keep 'Phone Manager' constantly cleaning the phone?

Is screen lock combination possible?

Hi everybody!

I will convey some of my thoughts. First of all I do not want to use a device or instrument without my permission to do anything. I can take photos and videos on android phones. I can take screenshots. I can call someone. I can change the settings of my phone. I can mute. and most importantly I can reboot. But unfortunately, all of them do without my permission. I think the screen lock should be unlocked in combination with the old nokias. The screen should be unlocked by pressing the main key after 3 seconds within a specified place on the screen. My opinion...

Can I learn your thoughts?

android.jpg

Retrofit2 method not processed

Hi friends, I'm developing a simple weather app and trying to pull data with retrofit. I'm debugging the code.

compositedisposable.add (apiservi by .....
Here, in the 36th line when debugging "variables are not avaible" writes and stops, I can not pull data.

-> newConsumer <WeatherResult> ... shows the following suggestion.

"Anonymous new Consumer <WeatherResult> (Ctrl + F1)
Inspection info: Reports all anonymous classes
Lambda syntax is not supported under Java 1.7 or earlier JVMs. "

If you want to review GithubLink:https://github.com/rumtblbl/LocationWeatherApp

Please Help Me, Thank you.

WeatherCityNameServiceImp.java
Code:
package com.example.locationweatherapp.Data.Network.Service;

import android.view.View;
import android.widget.Toast;

import com.example.locationweatherapp.Data.Network.ApiClient;
import com.example.locationweatherapp.Data.Network.ApiInterface;
import com.example.locationweatherapp.Data.Network.Model.WeatherResult;
import com.example.locationweatherapp.Utility.Utils;
import com.squareup.picasso.Picasso;


import javax.inject.Inject;

import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;


public class WeatherCityNameServiceImp implements WeatherCityNameService {

    private ApiInterface apiService;
    CompositeDisposable compositeDisposable;

    @Inject
    public WeatherCityNameServiceImp() {
        apiService = ApiClient.getClient().create(ApiInterface.class);
        compositeDisposable = new CompositeDisposable();
    }


    @Override
    public void weatherCityNameService(String cityName, final ServiceCallBack<WeatherResult> callBack) {

        compositeDisposable.add(apiService.weatherCityNameService(cityName, Utils.APP_ID, "metric")
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new Consumer<WeatherResult>() {
                    @Override
                    public void accept(WeatherResult weatherResult) throws Exception {
                        callBack.onResponse(weatherResult);
                    }
                }, new Consumer<Throwable>() {
                    @Override
                    public void accept(Throwable throwable) throws Exception {
                        callBack.onError(throwable.getMessage());
                    }
                })

        );


    }
}

Automatically convert flac files to mp3 when transferring to phone?

As the title says, I have a lot of music on my pc that is in flac format and in different folders. I have always transferred this music to my phone as is when I downloaded new songs however, it is now starting to take up too much space on my phone. I would like to know if there is a utility on Windows that would automatically convert my flac files to mp3 when I transfer them to my phone. I know that the files can be converted in Audacity, but I have too many to practically convert individually. Thank you.

Galaxy S9 makes chime sound when turned on face... kinda.

Hey there. I'm really just super curious about this, though honestly it's pretty inconsequential.

I was laying in bed and checked my phone. I turned the phone on it's face and put it down, I guess a bit more firmly than usual. When I did this, the phone made a couple of quick chime sounds. I repeated this and it continues to do it. I obviously don't want to test this on any harder surface than my latex matress, but seems like a consistent thing. Sounds like a high pitched, delicate glass bell type of tone.

Does anybody know what this is? It's not quite the easiest thing to search for with google, so figure I'd come here and make this, my second post ever. It's dumb, but I'm dying of curiosity :D:D:D

Thanks!

Bluetooth not connecting after update

Just updated my phone this morning.

Cant use bluetooth.

I have powered down and back up.

I have turned airplane mode on and off thinking that might help but nothing.

I'm dyin' without my headset and home speaker system not able to connect.

Basically I can highlight my bluetooth icon and my list of devices to connect to does not come up at all.

How do I fix and is this from the update I just did?

Automatically convert flac files to mp3 when transferring to phone?

As the title says, I have a lot of music on my pc that is in flac format and in different folders. I have always transferred this music to my phone as is when I downloaded new songs however, it is now starting to take up too much space on my phone. I would like to know if there is a utility on Windows that would automatically convert my flac files to mp3 when I transfer them to my phone. I know that the files can be converted in Audacity, but I have too many to practically convert individually. Thank you.

Retrofit2 NullPointerException Error

Hello friends, retrofit and trying to develop a simple weather app by reducing your dependencies using dagger2. I get the following error. You can view the project with github link.

I am a beginner, I have little time left for my school project and delivery, I cannot proceed in the project, please help me :(

Github Link: https://github.com/rumtblbl/LocationWeatherApp

Error;
-----------------------------------------
com.example.locationweatherapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.locationweatherapp, PID: 9627
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.locationweatherapp/com.example.locationweatherapp.Ui.MainActivity.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void com.example.locationweatherapp.Data.DataManager.weatherCityNameService(java.lang.String, com.example.locationweatherapp.Data.Network.Service.ServiceCallBack)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void com.example.locationweatherapp.Data.DataManager.weatherCityNameService(java.lang.String, com.example.locationweatherapp.Data.Network.Service.ServiceCallBack)' on a null object reference
at com.example.locationweatherapp.Ui.MainActivity.MainActivityPresenter.getCityNameWeather(MainActivityPresenter.java:32)
at com.example.locationweatherapp.Ui.MainActivity.MainActivity.onCreate(MainActivity.java:74)
--------------------------------------------------

switch users + get app data

hello

i am requesting your help please about 2 things.

1. getting app's data
i am switching phone from my old oneplus 5T to another oneplus ...
there is one app on my 5T for which i have completely forgotten the login and password. but as i have log many months ago, i still can use it...
is it possible to retrieve all data of its app in order to paste it on my new phone?
i tried to get the Android/data folder : "com.application.tv" but it is still request my login et password.
do you have any idea please ?

2. as i am changing the phone, i wanted to give the old one to my mom.
i am adding a new user and launching the "oneplus switch" and it is indicating me that it can't work on guest users...
how to solve this please?
do i need to reset the whole phone?
i really wish to avoid this...

thanks a lot for your help


regards

Filter

Back
Top Bottom