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

System doesn't unmute notifications

When I mute using the hot key in the tray, all options go to mute. However, when I deselect same button and return soind, media & calls return to same level as before however the notifications option stays mutted. It didn't always do this but it's been going on for at least a few months. I'm up to date on system updates. Android 9 Kernal 4.4.153 July 31.

Any known fixes?

Root Format Write-protected Encrypred SD card

I used a 64GB SanDisk SD card in Lenovo K4 Note as internal storage. After the phone got reset, I realized the SD card is still encrypted. I retrieved data using Linux recovery tools. After retrieving the data, I am trying to format the SD card but I am getting Read-write error on Fedora and Cyclic Redudancy Check on Windows. I am sure that the SD card is write-protected and I am able to read the data. Is there any Android tool that I can use to flash the SD card and make it reusable. I am okay to explore to fix even the cylinders and sectors of the SD card.

Higher FPS drains battery faster and heats faster?

Hello people. I just want to confirm. If a heavy game set in highest settings that gives 60+ FPS, would that drain battery faster than lower FPS?
then does that mean flagships drain battery faster than midrange in max settings heavy gaming?
And does steady 60 FPS in flagship heats faster than midrange too?
I read that when playing a heavy game in max settings on midrange phones, it will drop below 60 fps, what is the lowest FPS that you will notice that does not look like 60 fps smooth? Is it 30? Thank you!

Help Android remote support API follows the NIST 800-80 guidelines?

Does android remote support API follows the NIST 800-80 guidelines on device wipe operation ? if yes it falls under "clear" or "purge" operations

Below APi used to wipe device
https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#wipeData(int)

NIST 800-80 Guide
https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-88r1.pdf

Tech Dummie...101

I would like some options about changing my backgrounds and keyboards without messing up the system...NO LAUNCHER however I am now terrified of what I can install or dowload.. I had a few questions I had already put out there...one being confusing about my phone being HACKED it was google fixed it!!! anyways...I want to learn every thing i can now about technology... Tech Dummie thats me and I'm not ashamed so help me out...


Tech Dummie
Samsung Galaxy Edge 7s...Android pie 9

Android 9 Microphone feedback

My wife just got a new Galaxy S9. I noticed that it was significantly harder to hear her when we were talking. After a lot of troubleshooting, I've believe the problem is that her microphone is picking up the sounds coming from her speakers and canceling out all noises from being recorded. This happens when she has me on speaker phone as well as while we are in a video chat with Duo, Hangout, Skype, or Messenger (like I said, a lot of troubleshooting lol).

Is there a way to adjust the noise reduction or ambient noise threshold in Android 9?

Thank you in advance!

Help How to RE-fix volume level on FiiO M7

I don't know much of anything about Android systems, so I'm hoping someone can help me here. I use a FiiO M7 as my main music player, and primarily I use my AirPods with it. When I first paired them, I noticed the volume level was very low, even at the maximum setting. After some googling, I enabled developer options, and set the Disable Absolute Volume setting to ON. That fixed the problem, and it's been fine until about a week ago, when it suddenly reverted back to the quieter volume levels. It might worth mentioning that I regularly switch the AirPods between my iPhone and the FiiO, but again, until now this has gone without issue.

I've now unpaired, forgotten, re-paired, restarted the device, switched that setting off and on several times (and all of these in every possible order), and done a complete factory reset, and the low volume persists. I'm wondering what else I could try to get this fixed.

I've read that the Android OS this device runs on is a very pared down version: it says

Kernel version 3.18.14-user-g3a4465b-dirty
FiiO@asc #112
Build number 1.0.2

Is there something I'm missing here?Is there a VERY specific order I need to be following these steps in that I'm somehow failing?

updating listView as data is received

So I'm attempting to write my first android application to support another project I'm working on. I send out a command to a USB attached device. The data packets are sent back over the wire, received, parsed, added to a database, and supposed to be added to an adapter in order to display in a list view. I attempted to follow instructions I found on a skill share video in order to implement the adapter. I was able to get the application from skill share working, an rss feed, but I'm attempting to make the same functionality work, but as data comes in and stored into the database, the adapter is updated to display the most recent data on the list view.

I have the buttons, send and receive, and a couple other things working in the main activity thread. As I receive data from the attached device I'm adding packets to a Queue.

Java:
@Override
        public void handleMessage(Message msg) {
            switch (msg.what) {
                case UsbService.MESSAGE_FROM_SERIAL_PORT:
                    String packet = (String) msg.obj;

                    mActivity.get().dataPacket.append(packet);

                    if(lastCMD.equals("R07") || lastCMD.equals("R08" ))
                    {

                        if(mActivity.get().dataPacket.length() > 455)
                        {
                            String data = mActivity.get().dataPacket.toString();

                            data = data.replaceAll("[\\^\\*:]", "");

                            String[] split = data.split("\\r?\\n");

                            for(int i = 0; i < split.length; i++)
                            {

                                mActivity.get().dataR.add(split[i]);
                            }
                        }
                    }
...

I have another class running as its own thread. This thread handles the data that's stored into the Queue. If the Queue has data it will follow the operations to parse the packet lines and add them to the database.

Java:
class OperationThread extends Thread
{

    private MainActivity obj;

    private String data;
    private String time;
    private String temp;
    private String conc;
    private String batchNum;
    private String fileNum;
    private float temporary;

    SensorRecord record;

    OperationThread(MainActivity obj)
    {

        this.obj = obj;
    }

    public void run()
    {

        try
        {
            Thread.sleep(500);
        } catch (InterruptedException e)
        {
            e.printStackTrace();
        }

        super.run();

        while (!Thread.currentThread().isInterrupted())
        {

            if(!obj.dataR.isEmpty())
            {
                try
                {
                    data = obj.dataR.remove();

                    data = data.replaceAll("\\s", "");

                    String[] breakout = data.split("-");
                    // all set to this point
                    if(breakout.length == 12)
                    {

                        batchNum = breakout[0];
                        fileNum = breakout[1];

                        time = breakout[2] + ":" + breakout[3] + ":" + breakout[4] + ":" + breakout[5] ;

                        if(checksum(breakout[8]))
                        {
                            temporary = (float) Integer.parseInt(breakout[8].substring(breakout[8].length()-4, breakout[8].length()-2), 16);
                            temporary = temporary * (float) .1;
                            temp = String.valueOf( temporary);
                        }
                        else
                            temp = "Chksm Err";

                        if(checksum(breakout[11]))
                        {
                            temporary = (float) Integer.parseInt(breakout[11].substring(breakout[11].length()-4, breakout[11].length()-2));
                            //temporary = temporary *
                            conc = String.valueOf(temporary);
                        }
                        else
                            conc = "Chksm Err";

                        record = new SensorRecord(batchNum, fileNum, time, temp, conc);

                        obj.db.addSensorRecord(record);

                   }
                }
                catch (NoSuchElementException e)
                {}

                obj.runOnUiThread(new Runnable()
                {
                    @Override
                    public void run ()
                    {
         
                        obj.adapter.notifyDataSetChanged();
                    }
                });
            }// end of if
        }
    }

    private boolean checksum(String data)
    {

        int length = data.length();
        boolean ck = false;
        int checksum = 0;
        int n = 0;

        String iChksm = data.substring(data.length()-2);

        for (n = 0; n < length - 2; n++)
        {
            checksum = checksum + data.charAt(n);
        }
        checksum = 255 - checksum + 1;
        checksum = checksum + 256 + 256;

        if (Integer.parseInt(iChksm, 16) == checksum)
            ck = true;

        return ck;
    }
}

I use runOnUiThread to add new requests to the stack of UI Thread. The call I thought would work was the notifyDataSetChanged(). But it doesn't update with any of the data coming in over the wire. All I see is blank lines, hundreds of them.

I create and set the adapter in the onCreate of the activity.

All functionality of the main activity has worked thus far. But after hitting the Read Sensor button, nothing populates in the List view and then, all functionality from Sync or the settings activity fail to work.

Could someone lend some insight as to where I should be looking. I'm not getting any errors, Its hard to debug when Its not connected to Android Studio. With that being said, I have a second application that I use to test all of the data parsing and verify that the data coming in over the wire is what its suppose to be. I have tested all the calls, send/receive, parsing, and etc on this second application first.

Here is the Adapter class

Java:
package com.ascenzi.rhmps;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import org.w3c.dom.Text;

import java.util.List;

public class SensorFeedAdapter extends ArrayAdapter<SensorRecord>
{
    Context context;
    String aBatchNum;
    String aFileNum;
    String aTime;
    String aTemp;
    String aConc;


    public SensorFeedAdapter (Context c, List<SensorRecord> records)
    {
        super(c, 0, records);


    }


    @Override
    public View getView (int position, View convertView, ViewGroup parent)
    {

        SensorRecord record = getItem(position);

        if (convertView == null)
            convertView = LayoutInflater.from(getContext()).inflate(R.layout.sensor_feed_item_row, parent, false);

        TextView batch =convertView.findViewById(R.id.batchTextView);
        TextView file = convertView.findViewById(R.id.fileTextView);
        TextView time = convertView.findViewById(R.id.timerTextView);
        TextView temp = convertView.findViewById(R.id.tempTextView);
        TextView conc = convertView.findViewById(R.id.concenTextView);

        batch.setText(aBatchNum);
        file.setText(aFileNum);
        time.setText(aTime);
        temp.setText(aTemp);
        conc.setText(aConc);

        return convertView;
    }
}

and here is the instantiation of the adapter class.

Java:
        adapter = new SensorFeedAdapter(this, records);
        sensorFeedList.setAdapter(adapter);

App Downloaded from Play Store Crash

I have published a simple game to learn the publishing process, Popprz, on both Apple and Google developed using Cocos2d-x.

The downloaded & installed game runs happily on some devices, Huawei P10 & Samsung Galaxy 10 for example, but crashes on a Samsung S6 & Honor 8 Pro.

When I try to debug the issue from Android Studio I find I can happily debug the same app on, for example, the Samsung S6 & Honor 8 Pro - no problems :[

Can anyone suggest how I should try and identify the problem(s)?

Thanks

SQL JSON get array instead of object

Hi.

i am using this code to get some info from a sql database.

I can't figure out how to return a array if there are more than one record with the same email.


Somehow i have to put the $stmt->fetch(); in a while function and then array_push it together i think.

in java then create a array and load it in to it.

Can someone help??


Regards Danni.


PHP:
Code:
if (!empty($_POST)) {

    $response = array("error" => FALSE);

    $query = "SELECT * FROM users WHERE email = :email";

    $query_params = array(
        ':email' => $_POST['email']
    );

    try {
        $stmt = $db->prepare($query);
        $result = $stmt->execute($query_params);
    }

    catch (PDOException $ex) {
        $response["error"] = true;
        $response["message"] = "Database Error 1";
        die(json_encode($response));
    }

    $validated_info = false;
    $email = $_POST['email'];

    $row = $stmt->fetch();

        $response["error"] = false;
        $response["user"]["uid"] = $row["unique_id"];
        $response["user"]["name"] = $row["name"];
        $response["user"]["email"] = $row["email"];

        die(json_encode($response));

}

JAVA:
Code:
StringRequest strReq = new StringRequest(Request.Method.POST,
                Functions.LOGIN_URL, new Response.Listener<String>() {

            @Override
            public void onResponse(String response) {
                Log.d(TAG, "Login Response: " + response);
                hideDialog();

                try {
                    JSONObject jObj = new JSONObject(response);
                    boolean error = jObj.getBoolean("error");

                    // Check for error node in json
                    if (!error) {
                        // user successfully logged in
                        JSONObject json_user = jObj.getJSONObject("user");

                    } 
                } catch (JSONException e) {
                    // JSON error
                    e.printStackTrace();
                    Toast.makeText(getApplicationContext(), "Json error: " + e.getMessage(), Toast.LENGTH_LONG).show();
                }

            }
        }, new Response.ErrorListener() {

        }) {

            @Override
            protected Map<String, String> getParams() {
                // Posting parameters to php
                Map<String, String> params = new HashMap<String, String>();
                params.put("email", email);

                return params;
            }

        };

System doesn't unmute notifications

When I mute using the hot key in the tray, all options go to mute. However, when I deselect same button and return soind, media & calls return to same level as before however the notifications option stays mutted. It didn't always do this but it's been going on for at least a few months. I'm up to date on system updates. Android 9 Kernal 4.4.153 July 31.

Any known fixes?

Tech Dummie 101 help

I recently had the pie 9 update on phone which by the way I could hardly work it for a month. I'm that person that loves changing the back and the key Board
..
But oviously not good download this down....not good...I know something or someone is on my phone now but it looks like there protect it..Amways 1st time need navigation and def the best themes having nova launcher

big problem with internet connection

Hi all.
I have a big problem with my internet connection when I am using Wifi at my home.
The thing is that near my home there are some restaurants that have conections that appears to be free but aren't free.
The problem is that even when I click on my home network to connect it connects fine but 5 minutes later Android decides that it wants to connect to the open networks nearby that are not really open and interupts my connection.
I trried installing Wifi MAnager but that didn't help.
Do anyone know of an app or patch that will make my mobile connect to the network that I WANT TO CONNECT TO and not forcing me to connect to other networks that aren't mine.
It's a. shame the computer world these days I mean I had a Windows xp Computer that would let me choose MY NETWORK and it STAYED CONNECTED TO MY NETWORK.
And then there is this peace of crap of os that is of 2016 that won't connect to my Wifi because it's so stupidly made that it decides where to connect.
I have to find a way to stop android from searching and connecting to a network AFTER I SELECT MY HOME NETWORK SO IT WILL STAY CONNECTED TO MY NETWORK.
I tried that in Wifi manager but it doesn't stop android from searching and connecting to other networks even when I turn Auto Search off in Wifi manager and Android settings don't even have that option.
Please help me because it is a very expensive high end phone and if I don't find a solution for this I might sell everyrhing and stop using computers and phones altogether.
I am so fed up of this modern computer world that is more terrible then the 90's
Windows 95 was WAY BETTER then all this crap

Apps Is there possibility to "Auto-start" application when users become inactive?

Hi,
I have to create an app, which detects user inactivity, and then start activity which displays some videos with WebView, and then when displaying with WebView is finished, it has to play videos from SDCard. I've already handled part with WebView and SDCard (with JavaScriptInterface etc.)
This application has to work with API 19 all the way to the newest one.

The question is - Is there a possibility to detect if user is inactive and start my application, or keep the app running in background, and then start activity in the foreground after the user becomes inactive for certain time?

I'm not trying to play ads, when user is not looking at his screen. Application is for my client, who have stores with all kind of electrical equipments, including smartphones. The goal is to play video presentations with hardware details specific for each smartphone (informations about processor, ram, camera, screen etc.).

In short: I have to make an app which is similar to "Demo Apps" created for example by Samsung (playing some kind of presentations on screen).

So far I've read and tested things like:

1) BroadcastReceiver with combination of ACTION_SCREEN_OFF / ACTION_SCREEN_ON events.

Receiver works properly, I can detect this event and then start activity, but... The screen is already off so i can't see the displayed activity - it's visible running in the foreground after unlocking the phone. Is there a way to unlock the phone when the event is received?

That's my code so far.
EventReceiver Class:
Code:
class EventReceiver: BroadcastReceiver() {
   override fun onReceive(context: Context, intent: Intent) {
       StringBuilder().apply {
           append("Action: ${intent.action}\n")
           append("URI: ${intent.toUri(Intent.URI_INTENT_SCHEME)}\n")
           toString().also { log ->
               Log.d(TAG, log)
               Toast.makeText(context, log, Toast.LENGTH_LONG).show()
           }
       }

       if (intent.action == Intent.ACTION_SCREEN_OFF) {
           val i = Intent(context, MainActivity::class.java)
           context.startActivity(i)
       }
   }
}

MainActivity Class:
Code:
val br : BroadcastReceiver = EventReceiver()
val filter = IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION).apply {
   addAction(Intent.ACTION_SCREEN_OFF)
   addAction(Intent.ACTION_SCREEN_ON)
   addAction(Intent.ACTION_BOOT_COMPLETED)
}

2) Foreground Services - I read that this is a great way to make some asyc stuff in the background and show notifications to user. Is there a way to start the activity with it?

3) Job Scheduler

4) Daydream / Dream Service - it actually works great with almost every API and manufacturer, but.. there's no way to set the app as Screen Saver on Huawei/Honor smartphones, at least from phone settings, I've read that this is possible with ADB etc. but this is not an option that I can use here.

It seems that none of these fullfill my expectations.

Filter

Back
Top Bottom