How to auto receive calls programatically in android versions above kitkat - java

I am trying to develop an app which auto receive calls from particular numbers.
Like i can add the numbers that i want to auto receive. I did a lot of research and found similar questions but none of them worked. Some codes did work but only upto kitkat version and code did not work on versions above kitkat. I want the code that support all android versions. Its very important for me so please answer quickly. I really need your help.
I want the app to work in background so also please help me and write the code to implement this in a background service.
I was successful to run the app on versions upto kitkat but above kitkat the code does not work.

Android very specifically does NOT allow this, because doing so is an opening to a lot of telephone scams involving reversed charges. They've actually never allowed it, but people found hacks on old versions to get around that. Every time Google finds one of these, they shut it down in the next version. So there is no reliable way to do it, and if you find a way expect it to disappear shortly afterwards.

Related

Why? Status: App not accepted into Wear OS on Google Play

So I been trying to get my first Wear Os watch face published But when I submit I keep it keeps getting rejected. I only lightly changed the Sample Android studio provides nothing much changed but the background and the way the hands move.
I keep getting this.
I really do not know why it keeps getting rejected. I make sure it works for both square and round wear OS.
I keep getting this message
Step 1: Fix the eligibility issue with your app
During review, we detected the following eligibility issue and were unable to accept your app for Wear OS:
The basic functionality of your app does not work as described in App Bundle
Wear OS functionality should work as expected or as described in the app's Google Play Store listing. Please make sure to test your app on a variety of Wear OS devices and configurations.
For example, Hours and Minutes hands are not placed in the center of the watch face on Square Device. as shown/described on the store listing.
I really don't know what to do because I have appealed twice. I asked is it because I am moving the arrows differently. I get the same generic response.
Thank you all for the questions and comments.
I did test the application on sq watches.
And same results I got.
Things started changing when I added a circle into the middle of the screen and that ended up being allowed as center. I have no idea why that would matter I knew it was already centered.
Thanks all.

Replacing Asynctask in existing projects without much code changes

Our project is 5 years old project in Android native.In that we have used Asynctask to make an API call in each and every screen.
As per the documentation Asynctask got deprecated from Android 11 onwards. Currently our project is in play store and there are n number of active users.And it's working fine with android 11 devices also without any issues
Here I have 2 queries
1)Still Asynctask is working fine with Android 11 OS and below versions.Will it affect android 12 OS.I haven't get any clear information about completely removal of Asynctask in android developer site also.
Do I need to take this as serious and have to update my whole project with the replacement of Asynctask?And will it affect upcoming OS versions?
2)If I want to replace that means what will be the best option without making much code changes. Even google suggested some API frameworks like concurrent and coroutines as the best replacement.But I didn't get idea about replacing in existing classes.Because in and every class we are calling AsncTask to make API call.and in onpostexecute we are handing response parsing.
Please suggest some alternate options which will not make much code changes and effective performance..
Thanks in Advance.......
Here I have 2 queries
Just 2? You sure about that?
1)Still Asynctask is working fine with Android 11 OS and below versions.Will it affect android 12 OS.
It's highly unlikely.
I haven't get any clear information about completely removal of Asynctask in android developer site also.
Correct. One would assume (hope) Google would make a very public announcement if and when they decide to remove it completely.
Do I need to take this as serious and have to update my whole project with the replacement of Asynctask?
You need to take this a warning that you should stop using AsyncTask and replace its use in your code if you have time.
And will it affect upcoming OS versions?
No one but someone at Google could answer that, and they're not going to.
2)If I want to replace that means what will be the best option without making much code changes. Even google suggested some API frameworks like concurrent and coroutines as the best replacement.But I didn't get idea about replacing in existing classes.Because in and every class we are calling AsncTask to make API call.and in onpostexecute we are handing response parsing.
"The best option" is going to depend on your code. Google around for "asynctask to coroutines" or something along those lines and you'll find plenty of blog posts on the subject.

How to code switch Mobile Data on / off and check current Status on all Android Versions?

I try to find a way to switch Mobile Daten on or off or check the current status on Android.
I search way to to that on all versions of Android (2.3+).
I already found a lot of code to do that. Also on Stack Overflow. But non of that really worked stable. Is there any stable and good coded solution somewhere?
Maybe a special Function/Class to do access that easily?
I believe Google took this command away from the developer but it works on older phones. I think on anything after lolipop you cant do this anymore.

Making an FPS counter for an Android app (having the .apk only)

I want to make an FPS counter for Android apps. While doing research I found a lot of examples for doing this when you have access to the source code of the app, since the counting is done in the main drawing loop.
The problem is I don't have the source code, I have only the .apk of the app so there is no way to modify it. My question is, how could this be done? (at least an idea to start with). And I am sure it can be done somehow, I've seen an app like this on Google Play.
Thanks!
I just installed the app.
At the beginning they ask for the activation of USB debugging on the device. And this why it needs a connection to the PC.
So this is how they are able to get such kind of information.
I would advise you to look at USB debugging of Android apps and see what is possible there (such as taking multiple screenshots per second)

Android - Setting usage flag

I am currently creating an app and would like to create a demo version (free) and a full version.
However, I am wondering how I can set some sort of flag so that when the demo version has been used 5 times, you have to buy the full version to continue using. This usage will be detected on a submit button.
I was considering setting a flag in the app, however releasied that the user could uninstall the app and then re-install it overcoming my set flag (as this would set it back to 0).
Has anyone got any clever solutions for my little dilema?
Thanks
You might want to try one of the techniques in this answer: https://stackoverflow.com/a/996288/1205715
I think that is not possible with an local application.
File saving to sdcard with strange filename can be a way but It is not perfect.
In my opinion, Right way is using an application server that manages user run times with unique UUID.
It might also be worth thinking about an alternative approach.
In app purchases are now available, so you could have a free and a restricted section in your app, and use the in app purchase to unlock the restricted section. You see more developers going with this approach these days, rather than managing two versions of the app.
Also worth considering the fact that if you have a paid version of the app it can be pirated pretty quickly, one person just needs to get their hands on the full apk. However, if you go with the in app purchase model you will be letting google handle a lot of these issues for you.... just a thought, and the road I will be taking with my next app.

Categories

Resources