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

Post Oreo Geofencing in background

I have been looking at every tutorial, every piece of code I could find, and I am still failing to get geofencing to work on Android 8 and 9...
I am using as recommended by Google, an explicit Intent with a BroadcastReceiver, declared in the Manifest like this (custom intent?):

<receiver
android:name=".GeofenceBroadcastReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.mypath.ACTION_RECEIVE_GEOFENCE"/>
</intent-filter>
</receiver>
I also declared (as recommended) a GeofenceTransitionsJobIntentService:
private static final int JOB_ID = 573;
private static final String TAG = "GeofenceTransitionJobIntentService";
private static final String CHANNEL_ID = "channel_01";

public static void enqueueWork(Context context, Intent intent) {
enqueueWork(context, GeofenceTransitionsJobIntentService.class, JOB_ID, intent);
}

// The JobIntentService will call this, even when the app is in the background
protected void onHandleWork(Intent intent) {
GeofencingEvent geofencingEvent = GeofencingEvent.fromIntent(intent);
if (geofencingEvent == null) return;
else { handleTheTransition(); }
}

Note the comment: // The JobIntentService will call this, even when the app is in the background
However, it NEVER works once the app is in the background.
The old way, using location tracking and computing if you are within a geofence still works, but stops after a while .

I have tried to download some tutorials and examples, but I haven't been able to get a single one to work.
I heard about JobService, or ForegroundService, but it would seem unnecessary for geofencing, which should work even if the app is in the background, in my view this is what geofencing is for :)

Have any of you had any luck with post Oreo background geofencing? I am sure I am doing something wrong, but I can't figure out what it is...
Thank you for any help or recommendations!!

Make Android Use SD Card

Hi folks.

How can I get Google podcasts and other apps to use my installed SD card?

My built in storage is 50% operating systems and 50% apps (roughly). I see in settings that some apps allow us to use the SD card. But not all of them.

Also, how can I replicate where pictures, etc are saved? If I takea pic, the phone just saves it ...somewhere. How do I set that to my SD card.

Is Nova Launcher the solution for badges?

My question is around badges. I am able to turn them on for my email and txt message apps but the behavior is what I don't like.

For instance: say I have 20 unread emails. I see the badge #20. I open the email app and read one email and then return back to the home page. I want to see the badge at 19 but instead, it is cleared entirely.

Can this be done with either Samsung OS or Nova Launcher? (or something else?)

Apps error on music app

Hello.
I got the source code of a music player but I am having problems running the app. When I try to run or build the app I get the error “AAPT: error: failed writing to ‘C:\Users\user\AndroidStudioProjects\Urban Music Player\UrbanMusicPlayer\project\app\build\generated\not_namespaced_r_class_sources\debug\r\com\iven\urbanmusicplayer\R.java’: The data is invalid. (13).” What is the solution? (problem solved)

Looking for a suggestion on a new device

I recently lost my trusty old ZTE Force (which I absolutely loved for its sturdy design and a couple of really stable custom roms). It had a good run, but was showing its age. I had retired it to the position of Mp3 player/knockaround device (no data/phone service). But since it is gone I need another cheap but usable device to fill the void.

Not to sound like a choosing beggar but here is what Im looking for:

:Easy on the pocketbook as possible, $30USD is extreme high end of my budget

:Nothing special in the hardware dept. (dual core is good enough)

:rootable at a minimum, but would like some sort of decent rom, mostly just to get rid of bloat, but I can manually debloat if I need to

:would like to have as modern an OS as possible (Force had JB, but some of the apps I wanted to install didnt go as far back as JB)

I think that is everything I need out of a device. Please let me know what you think of and TIA.

Building latest ADB from AOSP source code

Hi,
I am trying to build the adb from latest AOSP source code tree, and I retrieved the latest AOSP source code from master branch, which I found here: https://android.googlesource.com/platform/manifest/+refs. The download and building went well, but I could only got adb at version 28.0.2, which is different from the latest adb version at 29.0.5, from here: https://developer.android.com/studio/releases/platform-tools.
So my question is: Is 28.0.2 is the most stable release of adb which recommended by Google? or I need to modify some files (such as some version control file) to make it building latest adb (29.0.5 for now) ?

google got hacked maybe

i had to do a restore on my pc because i tired to setup my fingerprint scanner and in doing this i got locked out. anyway today i started reinstalling some programs and all of a sudden i got a popup that said google got hacked and i had to start changing 98 passwords. all of these passwords are to forums type sites or just everyday sited, not banks or anything financial. so i went as did a few then stopped. one site i reset the password to locked me out and didn't even have my email address anymore. so is this true and should i now go and change those pw's or was that a scam? this is what i got on the android.net site. so is this for real? thanks

upload_2019-12-30_19-44-57.png

Attachments

  • upload_2019-12-30_19-44-19.png
    upload_2019-12-30_19-44-19.png
    336.1 KB · Views: 301

Apps Attempt to make first simple app

Hi guys, I'm not sure if this is the correct forum to post on but I'd appreciate any advice you can provide.

I'd like to "have a go" at app design. I have an ideal first project in mind; it's functional, would have a userbase of several hundred people and should be relatively simple in it's design...I just need to find the right tools for making the app!

The brief
At work, we complete paper forms to submit overtime and expenses claims. I want to make an app that allows users to enter the relevant data, then export it into a predefined form at the end of the month in either PDF, XLS or JPG format for printing.

I'm capable of making such a form as a website or in MS Access, but both of those provide compatibility and implementation issues with staff using mobile phones to enter data. I'm not sure if there's a design app that would help me create an Android app for this purpose? Unfortunately, I don't know the first thing about code and although I'd like to learn, this project isn't the appropriate time to do it. I'm under no illusions that it'll take dozens of hours of work to create this app, I just can't invest the hundreds of hours necessary to learn the code to do so.

If anyone can point me in the direction of a GUI style app designer that might work for the above I'd appreciate it. The app won't be monetized.

Thanks,
Andy

Where has my storage gone?

I have a Samsung S7with 32gb of storage (it also has a 64gb card). My phone has almost run out of storage. It has just over 500mb free.

Drastic action was needed. I have cleaned out the storage, including all apps that I loaded myself, so that all that is left on it is Android.

But Storage now says I have 3.6gb free. I read that system apps take up about 8gb so that means I have lost, or cannot find about 20gb.

My wife also has a S7 with lots of apps etc etc but she has over 7gb of store free.

I have considered a factory re-set but that sounds a bit too hairly (for me). My other option is to take it to a techi shop in the town.

Before I do that can anyone suggest anything I could do without the factory re-set.

Many thanks.

SD Card Missing on New Phone

I've been getting a "SanDisk SD card missing. Insert device again" message at start up ever since I turned on my new phone. I was getting the SanDisk SD card message even though the card I put into the phone at first was an AData.

The message doesn't come up if I don't have an SD card in the phone. I thought the older 32GB AData SD card might have been incompatible with the new phone, so I got a new 64GB SanDisk SD card, but I'm still seeing the message. The new SD card is working fine.

Any ideas on how to get rid of the card missing message?

Compatible Galaxy Note 8

Hi! Want to buy a Galaxy Note 8 model # that is compatible with straight talk. Can't get an answer from straight talk. I know phone has to be unlocked/out of contract. Does anyone know which specific model of Verizon cdma(the only network that works in my area) Note 8 would be compatible with straight talk? Would really appreciate an answer before purchasing the phone.

SSL/MSSQL

It seems that everyone on the internet has had this issue or something similar, but for all of that I haven't been able to find a functioning answer/solution for the problem. I am hoping someone here has solved this and can relay that solution to me.

I have an Android app that connects to a SQL DB hosted on Amazon RDS. Without using SSL it works great; no problems. Below is the connection string:

<code>
Class.forName("net.sourceforge.jtds.jdbc.Driver").newInstance();
String connectionstring = "jdbc:jtds:sqlserver://" + servername + "/" + dbname + ";" +
"user=" + userid + ";password=" + pwd + ";";
</code>

Now I want to enable SSL. I made the change on the MSSQL server parameter and I am able to connect using SQL Management Studio and .NET apps. However, I have not been able to connect via my Android app using JTDS (1.3.3). Initially the only change I made was to add ssl=require to the connection string.I have also tried "required" vs "require" because I've seen both variations in examples.

Based on some different threads I've read I have also tried adding the following line to the gradle.properties file of the project with no change:

org.gradle.jvmargs=-Djsse.enableCBCProtection=false

No matter what I do I get the same error (below).

"Network error IOException: SSL handshake aborted: ssl=0xa67a6cc0: I/O error during system call, Broken pipe"_

This is what the stacktrace prints:

W/System.err: java.sql.SQLException: Network error IOException: SSL handshake aborted: ssl=0xa67bdcc0: I/O error during system call, Broken pipe
at net.sourceforge.jtds.jdbc.JtdsConnection.(JtdsConnection.java:437)
at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)
at java.sql.DriverManager.getConnection(DriverManager.java:569)
at java.sql.DriverManager.getConnection(DriverManager.java:237)
W/System.err: at com.bluestarsolutions.caylix_time.DBRemote.openConnection(DBRemote.java:412)
at com.bluestarsolutions.caylix_time.DBRemote.DownloadInfo(DBRemote.java:47)
at com.bluestarsolutions.caylix_time.MainActivity$6.run(MainActivity.java:585)
at java.lang.Thread.run(Thread.java:764)
Caused by: javax.net.ssl.SSLHandshakeException: SSL handshake aborted: ssl=0xa67bdcc0: I/O error during system call, Broken pipe
W/System.err: at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:351)
at net.sourceforge.jtds.ssl.SocketFactories$TdsTlsSocketFactory.createSocket(SocketFactories.java:101)
at net.sourceforge.jtds.jdbc.SharedSocket.enableEncryption(SharedSocket.java:330)
at net.sourceforge.jtds.jdbc.TdsCore.negotiateSSL(TdsCore.java:577)
W/System.err: at net.sourceforge.jtds.jdbc.JtdsConnection.(JtdsConnection.java:365)
... 7 more

Filter

Back
Top Bottom