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

Multitasking: Floating Apps, Split View Multiple

Hello, and Welcome to the site

Please read the below before posting any app threads.

This site has a procedure for developers to announce their apps.



Below info for instructions on how to properly post your apps.

http://androidforums.com/threads/how-to-post-app-game-announcements.1128134/

Developer Announcement Procedure
Install the Forum for Android app from Play store from link here >>, https://play.google.com/store/apps/details?id=com.tapatalk.androidforumscom

Sign in to the forum using the app and follow below instructions

Go to the forums tab
Select "My Apps & Games"
Select your app from the list
Tap the green icon in the bottom right to start a new thread
Add a thread title / content and hit the post button (right pointing arrow in the top right of the screen)
Once this is done you can use your PC to create or modify threads in your channel

Once you create the channel using the app, one of us staff members will move your thread to the appropriate channel and or approve your post.

If you have any questions, please reply to this message.

Gd LK with the App, and thanks for joining Android Forums.

Don

Apps Sensors don't gather data when phone is idle

Hi everyone,

I’m trying to develop an app for Android in which I pick up data from several sensors (if available on the device) and write it down to a file which will later be analyzed for certain uses.
I’m facing several problems, a minor one which I can kind of ignore and a major one that I haven’t been able to solve and makes the app not work properly.

- Minor problem

I’m gathering data from: Accelerometer, Linear Accelerometer, Gyroscope and Magnetometer and also from the GPS but that works quite differently and can only be sampled at much lower frequencies, so I’ll ignore it for now.
I gather the data by implementing a listener for each sensor:

Java:
    public class AccelerometerWatcher implements SensorEventListener
    {
        private SensorManager sm;
        private Sensor accelerometer;
 
        AccelerometerWatcher(Context context) {
 
            sm = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE);
 
            assert sm != null;
            if (sm.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) != null) {
                accelerometer = sm.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
            }
        }
    }

And I’m setting the frequency to ~50Hz by using:

Java:
    sm.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_GAME);

When gathering data, I understand the frequency can’t be 100% stable, but the weird thing is it stays more or less stable on every sensor (at around 50Hz) except on the Accelerometer, where most of the time it samples at 100Hz and sometimes drops down to 50Hz.

Is there something I might be doing wrong or any way to control this? So far it’s happened in every device I tried, although they don’t all behave in exactly the same way.

- Major problem

I’m writing down the info to a file by first writing everything I pick up from the sensors to a string and then every X seconds, writing what’s on the string to a file and clearing it so the sensor listeners can keep on writing on it but it doesn’t become infinitely long.

I write on the string like this:


Java:
     @override
        public void onSensorChanged(SensorEvent event) {
 
            if (event.sensor.getType() != Sensor.TYPE_ACCELEROMETER)
                return;
 
 
                if(initTime == -1)
                    initTime = event.timestamp;
 
                MyConfig.SENSOR_ACCEL_READINGS += ((event.timestamp - initTime) / 1000000L) + MyConfig.DELIMITER + event.values[0] + MyConfig.DELIMITER + event.values[1] + MyConfig.DELIMITER + event.values[2] + "\n";
    }

And then save it to a file using this:

Java:
    public class Utils {
 
        private static Timer timer;
        private static TimerTask timerTask;
 
        public static void startRecording() {
            timer = new Timer();
            timerTask = new TimerTask()
            {
                @override
                public void run()
                {
                    // THIS CODE RUNS EVERY x SECONDS
                    writeDataToFile();
                }
            };
            timer.scheduleAtFixedRate(timerTask, 0, MyConfig.SAVE_TIMER_PERIOD);
        }
 
        public static void stopRecording()
        {
            if(timer != null)
                timer.cancel();
            if(timerTask != null)
                timerTask.cancel();
 
            writeDataToFile();
        }
 
        private static void writeDataToFile()
        {
            String temp_accel = String.copyValueOf(MyConfig.SENSOR_ACCEL_READINGS.toCharArray());
            WriteData.write(MyConfig.RECORDING_FOLDER, MyConfig.FILENAME_ACCEL, temp_accel);
            MyConfig.SENSOR_ACCEL_READINGS = MyConfig.SENSOR_ACCEL_READINGS.replaceFirst(temp_accel, "");
        }

In the listener, every time I stop listening, I set “initTime” to -1 so the samples always start at 0 and go up to the duration of the listening period in miliseconds. (Ignore the DELIMITER it’s just a matter of formatting).

My main app-breaking problem, is the following:

In most phones (a few lucky ones work flawlessly) 1 or 2 things fail.

In some, after being idle for a while (locked and in your pocket for example) the sensors stop recording data so the app just writes blank values until I wake the phone up again.

In others, it’s even worse, not only do the sensors stop recording data, but the timer / writing to file, seems to stop working too, and when the phone wakes up again, it tries to write what it should’ve written while it wasn’t working and messes up all the timestamps, writing the same samples at different points “in the past” until it catches up to the current time. (If you visualize it as a graph, it basically looks as if the data gathering travelled back in time).

Is there any way in which I can make sure that the app keeps on working no matter what, whether the phone is locked, dozing, the app is minimized, on the background, foreground, etc.?

I tried a method I googled that consists of setting and alarm to "wake up the process" every X seconds (no matter what time I set to it, it only worked max once per minute).
I saw how for a few miliseconds every time the alarm went off, it captured samples again but then went to sleep right away, it didn't keep the phone "awake" for a longer period of time.
It solved nothing and even for the brief period it forced the sensors to gather data, it only helped wake up the sensors, the problem with the timer / writing to file still persisted.

Hope someone can shed some light on how to keep the phone gathering data no matter what, I've been trying everything I could think of and I'm not getting anywhere. Sorry for the brick of text, but I didn't really know how to explain it in a shorter way.


P.S: I saw that having the Battery Saver ON made it even worse, even on the phones where it usually worked properly, it started messing things up. So another question would be... How can I stop it from interfering?

I am trying to give root access to my app and trying to copy a file to root directory, I need help

More details about what phone model you have, which version of Android it's running, and if it is or isn't actually rooted will help to make relevant suggestions.
But offhand, if you go into your Settings >> Apps menu, find and open the Termux app listing, and in Permissions, check that Storage is enabled. Then when you start up Termux, run

apt update && apt upgrade

and then

termux-setup-storage

More details on this here:
https://wiki.termux.com/wiki/Termux-setup-storage

Help Velocity Micro Cruz T510 - internal storage

I am not talking about external SD card storage.


Vicky, so sorry for the confusion..even though you explained your self very well..FIVE TIMES..

I see what you are saying..I'm having that issue too every since I installed this costume rom a few days ago..the original stock version didn't have that..I've tried to delete that folder but it will populate back up right away..maybe some one has a solution

Attachments

  • Screenshot_2020-02-09-10-36-11.jpg
    Screenshot_2020-02-09-10-36-11.jpg
    282.4 KB · Views: 326
  • Screenshot_2020-02-09-10-36-51.jpg
    Screenshot_2020-02-09-10-36-51.jpg
    261.2 KB · Views: 323
  • Screenshot_2020-02-09-10-45-36.jpg
    Screenshot_2020-02-09-10-45-36.jpg
    295.6 KB · Views: 343

Help Missing S9+ voice note - urgent

Hi MoodyBlues, thanks for your welcome and input.
Aw, you're welcome.
Unfortunately I have tried showing hidden files, and still nothing. It's all very strange.
Oh, shoot. I was hoping that was it.

Have you tried a broad search, using part of its name? By broad I mean outside its expected location. Maybe it somehow ended up in a different directory. I see that you've "searched my phone top to bottom," but how? Moving through directories visually looking for a file is different from doing a search based on characters you're sure are in its name. Try that, if you haven't already.

You might also try, from a computer, doing a search for files modified during a certain time period; that would catch things that may not show up for some reason other ways. In fact, really, this is the most foolproof method. I only use Linux, on which a search like this is a breeze; I don't know about other OSes, so I can't help you there.

avi or mp4 file size

i have 4 video files on my pc which add up to 7.55 gbs but when i copy and paste them on my tablet my usage says i used 36 gbs out of my 60
When making file size comparisons it's much more revealing to look into the actual size of both files, relying upon used or open disk space of the storage media will always need to also take into account the size of each storage media plus whatever data is residing on both (which must also include things like hidden files and directories).

Root Rooting the T510

Yes, I know the thread is old; so is the tablet. I have a Velocity Micro Cruz T510 tablet; it runs 4.1.2. It's slow and dumb, but it was cheap. I thought I might try rooting it.
yeah chainfire the dev who created the original su app has taken the app out of the play store. there might be an apk floating around the net, just be careful where you get the apk's as some apk sites are notorious for viruses and other malicious stuff. i wonder if magisk might work on your device instead.

i could not really find much info on your tablet and how to root it.

here is the info on magisk:https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

Oxygen 10.3.1 MMS broken

This, I am afraid, is a known issue on the U.S. network for Verizon and the OnePlus 6T with Google Message. First reports seemed to appear at roughly the same time that Google Messenger allowed RCS, (Rich Communication Service), via their app and affects a number of phone models, including Google Pixels.

Have you downloaded the Carrier Services app by Google, free from the Play Store, and allow Permissions, to see if this helps?

That you for the information. Yes I have / had the Carrier Services app loaded, even prior to loading 10.3.0. As a follow up, I went to the Verizon store had them replace the SIM's card and MMS is now working again. They did say they have seen this a lot with OnePlus phones and suggested trying the Verizon Messenger. I've tried the OnePlus Messenger and it does work there, but I like Google's Messenger better.. Replacing the SIM's card seems to be the only way to fix Googles, Messenger. Would love to know why.....

Help Slow Data & wifi speeds in YouTube App but not Browser?

So I have been experiencing a lot of buffering while watch youtube videos in the YouTube app on my Galaxy S8. I did not pay much attention to but this morning I decided to hunt down the problem. I was trying to watch a video and I was getting buffer, even though the video was running a 144p quality. I have a 40 Mbps internet connection with Cox, so I should not have problems streaming a youtube video at any quality on my smartphone.

1. First I checked to make sure that there was nothing else on the network hogging the bandwidth.
2. I used my laptop to check my speed on speedtest.net. I got 32 Mbps UP and 15 Mbps DOWN.
3. I opened the speedtest.net app on my S8 and ran a speed test to the same server and got similar results as with my laptop.
4. I opened the YouTube App and tried to watch a video at 1080p. It buffered for 20 seconds before starting and went back to buffering after only playing for 5 seconds.
5. I copied the URL of the video and shut the YT app down and using the Chrome browser App I watched the video in 1080p with no slowdowns or buffering.

The same is true whether I am using WiFi or 4g LTE data. I cannot stream video reliably in the YouTube app, even with full bars of signal on 4G LTE. So it is clear that it is the YT app that is causing the issue. My question is WHY? Any suggestions?

Mods Samsung S7 Edge specific system animations

Something just came to mind, theres an app called "ApkToolX" by Andro Black and definitely not available from Google PS. Its a powerful root tool used for reveise engineering of apks, .jars, or even other elements of as OS. The links below provides a brief description

https://www.google.com/amp/s/www.xd...-apks-on-the-go-with-apktool-for-android/amp/

ApkToolX is an android app that basically dose the same thing. aking it work is not as simple as downloading, installing, granting root and good to go.

My Note 4 n910p on MM is rooted with Chainfire (SuperSu). The chipset is a Snapdragon and an armV7

Screenshot_2020-02-08-23-31-44.png


Screenshot_2020-02-08-23-32-12.png



Screenshot_2020-02-08-23-42-41.png


The process to make ApkToolX work as intended if a bit risky and certainly not for the novice. On my Samsung in the app setting list "apktool version" sub setting I choose 2.1.1, return to the main settings and in subsettings "aapt version 6.0". After that I check the box root and when prompted by SuperSu I grant ApkTool root permissions. Then reboot and back to ApkToolX and in /system/ framework / I scroll down to framwork-res.apk and tap it. From the list below I choose "inport as framework".


Screenshot_2020-02-09-00-00-27.png



Scroll down a bit further and tap twframwork-res.apk and "inport as framework". Like I said "its not your normsl rooted app". Proper installation involves risk and just feels intimidating.


Ok, back to your original question :)
It wasn't untill later, and I wasn't even
consciously thinking about it. It just popped in my head. "I bet the transitions are somewhere in the Framwork.jar". So out of curiosity, I copied it and pasted it to my external sd, used ApkToolX to decompile the .jar

Screenshot_2020-02-09-00-24-29.png



Screenshot_2020-02-09-00-26-55.png



In smali/android/app BINGO!!!


Screenshot_2020-02-09-00-29-53.png




Also in Smali_classes2/android/transitions
Double BINGO!!! :)


Screenshot_2020-02-09-00-33-18.png





Screenshot_2020-02-09-00-36-46.png




Famwork smali is where my skills tend to drop:( but non the less theirs your answer
@Wilbur H
:)

Stolen galaxy Tab Notebook

This is a complicated situation as a lot of police departments simply won't, or don't have the resources to devote to things like stolen mobile devices. They may contain invaluable data that means a lot to the owner but dollar-wise it's just petty thievery. In a densely populated area like NYC or Chicago if you report a lost tablet to a cop it's a matter of filing out a report and that'll get tossed into stack of thousands of other, similar reports, or just trashed in a day. Confronting the thief yourself could be risking your life.
But more details as to where this location is might reveal something.

Filter

Back
Top Bottom