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

How to connect Android to WiFi and network in the same time

I need Android to connect to both WiFi and the 4G Network in the same time.
As known, the default setting makes Android disconnect from the network once it connects to WiFi,
therefore it can't connect to both simultaneously.

There is an app in the Google app store called Speedify which does this:

But I would prefer to do it myself if possible. I checked on the net and some suggest to edit the 'ConnectivityServices.java' file;
however, I couldn't find yet the solution that works for sure.

Some suggest some editings in the ConnectivityServices.java file, but I couldn't find yet the solution that works for sure.

I would appreciate any help on how to achieve this.

Where are recorded alarm sounds stored in Android 13

The alarm feature on the Android 13 clock has added the excellent new feature to record sounds and use them as alarms. I'd like to use some of these alarms elsdewhere, but I can't find them.

The alarm shows as the day of the week and time of day that it was recorded, but I can find no corresponding file anywhere in my storage.

On exploring the "Alarm sound" screen, the alarm shows under "Sounds" ("Sunday at 01:50"), but is not in the "Ringtones" folder where all the other alarm sounds are to be found. The 3-dot menu reveals only a "Remove" option.

Can anybody tell me where these sound files are stored?

Screenshots below.

Attachments

  • Screenshot_20230606-143712.png
    Screenshot_20230606-143712.png
    200.6 KB · Views: 142
  • Screenshot_20230606-144028.png
    Screenshot_20230606-144028.png
    187.4 KB · Views: 62

Receive sms on my app from specific number

if (checkPermission()) {
btn1.setEnabled(true);
} else
{
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.SEND_SMS}, SEND_SMS_PERMISSION_REQ);
}
btn1.setOnLongClickListener(this);
btn2.setOnLongClickListener(this);
btn3.setOnLongClickListener(this);
btn4.setOnLongClickListener(this);
btnState.setOnLongClickListener(this);
btnVanne.setOnLongClickListener(this);
}
protected void onDestroy() {
super.onDestroy();
unregisterReceiver(messageReceiver);
}

public void login(View view) {
}

class MessageReceiver extends BroadcastReceiver {
public static final String ACTION = "android.provider.Telephony.SMS_RECEIVED";
private static final String SMS_SENDER = "0000000000000";
@override
public void onReceive(Context context, Intent intent) {
if (intent != null && intent.getAction() != null &&
ACTION.compareToIgnoreCase(intent.getAction()) == 0) {
Object[] pduArray = (Object[]) intent.getExtras().get("pdus");
SmsMessage[] messages = new SmsMessage[pduArray.length];
for (int i = 0; i < pduArray.length; i++) {
messages = SmsMessage.createFromPdu((byte[]) pduArray);
}
String sms_from = messages[0].getDisplayOriginatingAddress();
if (sms_from.equals(SMS_SENDER)) {
StringBuilder bodyText = new StringBuilder();
for (SmsMessage message : messages) {
bodyText.append(message.getMessageBody());
}
String body = bodyText.toString();
ReceivedSms.setText(body);
abortBroadcast();
}
}

}
}
private boolean checkPermission() {
return false;
}

How to run/invoke Instrumented Tests from within Android App code (MainActivity)

In the current arrangement, on Android, Instrumented Tests can be invoked by following approaches:

  1. From within Android Studio -> Right click on the class saved under "androidTest"
  2. Fire command adb shell am instrument -w com.example.testing/androidx.test.runner.AndroidJUnitRunner on CMD prompt.
But mine is unique requirement. As per my requirement, I would like to Run/Invoke these test cases (written inside classes saved under androidTest) from UI of the App code itself i.e. when user clicks on a button presented on the UI, the respective test case(s) get executed.

Following is the code written in "ExampleInstrumentedTest" saved under "androidTest" Folder:

Code:
package com.example.myapplication

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.uiautomator.UiDevice

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
 * Instrumented test, which will execute on an Android device.
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
    @Test
    fun testCaseForButton1() {
        val appContext = InstrumentationRegistry.getInstrumentation().targetContext
        //Filler step
        assertEquals("com.example.myapplication", appContext.packageName)
    }

    @Test
    fun testCaseForButton2() {
        val device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
        //Filler step
        assertEquals("com.sec.android.app.launcher", device.launcherPackageName)
    }
}


Code in MainActivity():

Code:
override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        findViewById<Button>(R.id.buttonRunTest1)
            .setOnClickListener {
                //Invoke testCaseForButton1
            }

        findViewById<Button>(R.id.buttonRunTest2)
            .setOnClickListener {
                //Invoke testCaseForButton2
            }
    }


I read somewhere that "instrumented" tests can not be called/triggered from within App code. Also tried but failed with error "No instrumentation registered! Must run under a registering instrumentation"

Request help with code to be written inside the "OnClickListener".

Tried couple of approaches:

Code:
// Code to execute when the button is clicked
fun startTest(){
   val packageName = "com.example.myapplication"
   val testRunnerClass = "androidx.test.runner.AndroidJUnitRunner"
   val command = "am instrument -w $packageName/$testRunnerClass"
   Runtime.getRuntime().exec(command)
}


Code:
// Code to execute when the button is clicked
fun startTest(){
   val instrumentation = InstrumentationRegistry.getInstrumentation()
   val paramTypes = arrayOf(ComponentName::class.java, Bundle::class.java)
   val method = instrumentation.javaClass.getDeclaredMethod("startInstrumentation", *paramTypes)
}


My build.gradle:

Code:
    {
        ....
        defaultConfig {
            applicationId "com.example.myapplication"
            minSdk 28
            targetSdk 32
            versionCode 1
            versionName "1.0"

            testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
            ....
    }

Dependencies in build.gradle:

Code:
dependencies {
    ...
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    implementation 'androidx.test.uiautomator:uiautomator:2.2.0'
    implementation 'androidx.test:runner:1.4.0'
    androidTestImplementation 'androidx.test:runner:1.4.0'
    androidTestImplementation 'androidx.test:rules:1.5.0'
    ...
}


But nothing works. Ideally, it should invoke respective instrumented test cases.

How to download and install Plantronics Hub (PLT HUB) which is no longer in the Play Store

My Samsung phone no longer has Plantronics Hub aka PLT HUB, a great app to control my old Plantronics BT headset. How may I install this app if it's not in the Play Store? The current version, Poly Lens, will not work with the bluetooth set, but Plantronics Hub will work.

I have PLT Hub on one Android phone. Can it be transferred to the other phone? If so, how?

Thanks.

Edit kernel built-in modules with magiskboot: is it possible?

Hello!
Nice to be here!

If someone have expierence with editing android kernel built-in modules with magiskboot? It is a great tool. I could unpack ramdisk, but still can`t understand how to unpack kernel folder and edit built-in modules? Is it possible? If no, please, tell me what is the best (and easy) tool for building and flash new kernel. OS Android 12.

Thank you!

Laptop Showing Auto Update Issue after Upgrading RAM from 8GB to 12GB: Seeking Assistance

Hello fellow tech enthusiasts,



I hope you're all doing well. Recently, I upgraded the RAM in my laptop from 8GB to 12GB, hoping to enhance its performance and multitasking capabilities. However, I'm now facing an unexpected issue with auto updates, and I'm seeking your assistance and expertise to troubleshoot this problem.
Ever since the RAM upgrade, my laptop is experiencing difficulties with automatic updates. The system no longer installs updates automatically, and I have to manually check for and install updates. This issue is causing inconvenience and potentially leaving my system vulnerable to security risks.

I would greatly appreciate any insights or suggestions on how to resolve this auto update issue. Have any of you encountered a similar problem after a RAM upgrade? If so, how did you address it? Are there any specific settings or configurations that need to be adjusted to ensure smooth auto updates?



I'm also open to general advice on optimizing the performance of a intel evo laptop after a RAM upgrade. Are there any additional steps or considerations I should take to fully leverage the benefits of the increased RAM capacity?



Your assistance and guidance would be highly appreciated. Together, let's troubleshoot and find a solution to this auto update issue, ensuring the smooth functioning of our upgraded laptops.



Thank you in advance for your valuable input and suggestions!

Really need help - LG K7 won't factory reset, goes into "No Command" ????? Please help.

Hi - if anyone can help me I would more than appreciate it. I have an LG K7, I don't want to upgrade it because I like the phone. It went into "enter password / emergency calls only" mode, I did the power button and volume down to get to Factory Reset, but after I click YES the first time - it won't let me click YES the second time and it goes into NO COMMAND, then reboots.

Can anyone help ??????

Thank you for reading my post.

A veritable crime wave!

In April the City of Arcadia sent out warnings about recent burglaries, specifically naming my area as one of those being hit. The article outlines what's going on and what the police are doing about it, plus it includes some general safety tips helpful for anyone:

Arcadia_crime_040123z.jpg


Today, my helper spoke to a woman who'd come to the front door, holding a young baby and asking if we'd seen her orange cat. My helper heard her ask the next-door neighbor the same thing....yet she told my helper that he (my neighbor) had sent her pictures of her cat, which made no sense. She told both people that someone had seen her cat go into their backyards, and wanted to take a look. After we told her the cat wasn't here, she pointed vaguely and said she has signs up, and to call if we see her cat. Having lost a cat many years ago--through an open window whose screen got knocked off when two of my Great Danes had a little disagreement...in the living room--an orange cat, no less, I didn't want to disregard her story altogether, but it did sound extremely suspicious. My helper continued watching her, and she was getting in and out of a car, between walking house to house. We decided to call the non-emergency police number. I did. I gave them my name and address and the woman's description, and less than TWO minutes after we hung up a patrol car was in front of my house questioning her! I LOVE my police department. They've been nothing but amazing in all the years I've lived here. This time. I sure didn't feel that way many years ago when I lived here, and...um...well...engaged in some rather illegal activities (recreational drugs, skipping school). :o Funny how time changes things!

Overheated/sound issues

Today I left my phone out in the sun & it overheated. After it cooled down it restored everything but my sound was distorted. I went to a cell phone repair place & they said it'd resolve on its on or they can replace the speakers for $150. I've done a hard reset multiple times, I've blown air into the speakers, & downloaded an app to clean the speakers with sound.

When I manually reset my phone it will resolve but then 15-20 mins later the sound is distorted again. I've done everything I can think of. Anyone have any suggestions?

Moto G Pure OEM unlocking grayed out

Hi guys, got a Moto G Pure, XT2163-4 Canadian retail that has the OEM unlocking grayed out in Developer options. What I've tried so far:
1. Reflashed it using RSA (ELLIS_RETAIL_S3RHS32.20_42_10_17_3)
2. Reset to factory settings
3. Someone reported that after 2 days of use the OEM unlock wasn't grayed out no more and was able to enable it. I started using the phone last night so fingers crossed.

I've got my code to unlock the OEM through fastboot from Motorola but until OEM Unlock is enabled, I can't do it.
Any other ideas will be appreciated.

  • Question Question
Help Stop apps from auto starting

Galaxy s10e

About a month ago I began experiencing open apps when I use my fingerprint to wake it,, or sometimes, like today, one app was unexpectedly just "there" suddenly during the course of my activity.

At first, I thought it was my imagination, that I inadvertently tapped one, but it seemingly happens daily, once or twice, with different apps, and some of them I rarely if ever use.

Launcher for TV-box

Can some please suggest a plausible launcher or other solution? Every launcher to date appears to be incompatible .
I'm hoping to use a X96Q tv box (Allwinner H313/H616; Android 10, rooted, comes with Chrome 72 though it seems happy with Chrome 114, Odin and EinkBro browsers) as a intranet graphic terminal;
my problem is that I have yet to find a launcher to replace the Chinese manufacturer's home-screen (mediabox) from which I can not hide/delete unwanted links to Play Store, Netflix, Chrome, and Youtube app links so I can present links to:
Option 1) ssh 192.168.0.2
Option 2) web-client 192.168.0.2:80
Option 3) web-client 192.168.0.2:8080
Option 4) web-client 192.168.0.3:80
I would like to display a homescreen wallpaper and perhaps even dare I suggest a clock/date widget.

Testing an app

I'm not sure if this is the right place to ask this question but I used to upload my apps on the google developer console and then you had the roll-out option to send them for review. Now I've been told that I have to test them before, either with an internal or a closed testing. But once I send an app to a number of people, how does it work to have it reviewed? I don't see the roll-out option, should I wait a few days? How does it work?

Filter

Back
Top Bottom