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

Help Screen Broke - Need Help

Hello Everyone,

I need some help with my phone, please.
I have a Huawei Ascend Mate 7 (TL-10). The screen broke when the phone fell.

The thing is, the screen was working just fine even after cracking. The touch was performing as it was before breaking. Then after a day, I clicked on restart and the phone shut off but didn't switch back on.

Now, the phone is switched off. The charging LED does not show. I tried connecting to a computer to at least get the data out if possible, but that didn't work.

Now, guys, I need help determining my next step. Where I live, I cannot go to just any shop and get the screen replaced because not only do I NOT trust these shopkeepers but also, they are pretty much inexperienced to be polite. I do not want to risk damaging the phone in attempt to replace the screen.

I can open the phone myself but I need a new screen and I have talked to people who sell them. They said they offer check warranty - meaning they will connect the screen to my phone and see if it works and hand it to me then. Otherwise they aren't responsible and neither are they responsible for if the screen doesn't work after installation or some time at home. And for this I have to take my "opened" phone to them for them to check the scree since they have no other ways of checking it.

Concluding, my question now is - is there anything wrong with the phone or I can just replace the screen and it'll be back being perfect again? This is scary cause I have data in the phone and I need to, at least, get that and other stuff like whatsapp account if (God forbid) the phone does not work.
Is there a way to get my data and accounts from the phone's current status?

Please respond as soon as you can and please let me know anything that can help me out here.
Thank you so much

Help Messages by Google Taking Large Space

So my phone running Android 9 was running out of space. I went to the settings and found out that default Messages by Google LLC had a heavy 1 GB+ cache.

I never get MMS messages, and regularly delete some SMS. I have around 50 threads right now and none of the threads expand to more than 60/65 previous messages.

So what might be the issue here?

Attachments

  • Screenshot_20190804-121437.png
    Screenshot_20190804-121437.png
    591.8 KB · Views: 140

SD card Mount issue with phone (not SDcard)

Hopefully someone can help me nobody seems to have an answer to this question or even seems to talk about it my phone was working fine it's still alright I use the Poweramp program and have for years I refuse to use any other program because of how great it is when it comes to my subwoofers speakers or any other person's Car Bluetooth speaker stereo system or otherwise. Problem is not the SD card but the slot that you put the card in those couplings of copper or whatever that the SD card sits on for it to write data with the phone so it registers what's on the SD card one or two of them are messed up so it even if the card is in it doesn't register my music no formatting the SD card isn't going to do anything already tried no going into my music folders under that particular amp and selecting it also isn't something that will work already tried that also and none of the other things that I have read are relevant whether it be using special programs through your PC Etc I'm pretty tech-savvy so I guess what I'm wondering if there is a way to go in and fix that part of the slot so that the SD card will start reading the data from it again this phone is pretty new and I'd be pretty upset if I had to replace it simply for something that tiny

T-Mobile (USA) update 9.0.13

A new update, 9.0.13, for the T-Mobile (USA) carrier minority variant of the OnePlus 6T has begun rolling out.

Changelog:
  • Android July Security update


Camera version is yet again the same old 2.9.43
(You can update to the most recent global camera version 3.0.43)

This is the 8th T-Mobile (USA) update in 281 days

(N.B. This update is only for the T-Mobile (USA) minority carrier variant and NOT the global OnePlus 6T model)

See, also...

T-Mobile 6T to Global model Conversion (WITHOUT unlocked bootloader/SIM unlock!)

Books for kids

So I'm looking for some recommendations for my 6 year old daughter. She loves adventure and fantasy books. Her favourite book this year has been The Creakers, which I also enjoyed.

She loves stories that build suspense, giving her something to look forward to the next night. Sadly she likes David Walliams books which I don't, they are hard work, badly written and not interesting to read at all!!

I wonder if she would like one of these old school adventure books where you choose different options throughout the book. Do they still make them?.. Mmm :thinking:

Issue with ST TMobile

I've been using Straight Talk for years now and I've always bought phones from Ebay and activated through ST. The past phones I've gotten were AT&T network based and I've never had network issues until recently when I bought a TMobile Samsung S8. I can make calls and texts but I miss a lot of inbound calls or I won't receive a text until hours after its sent (not all the time but daily). I live in a large city so I'm confused how TMobiles network could be so shotty. I need to get a solution in case there's an actual emergency and someone needs to contact me. I'd hate to buy a brand new AT&T based phone just to solve the problem so I'm wondering what options I have. If I did buy a phone off Ebay how would I know I'm getting strictly AT&T because most of them include TMobile in the description of the listing? Any help would be appreciated

Apps OneTimeWorkRequest: After setting the input merger to ArrayCreatingInputMerger, the code inside doWo

This main code:
Java:
package com.example.app3;

import androidx.appcompat.app.AppCompatActivity;
import androidx.work.ArrayCreatingInputMerger;
import androidx.work.Constraints;
import androidx.work.Data;
import androidx.work.OneTimeWorkRequest;
import androidx.work.WorkManager;

import android.os.Bundle;

import java.util.Arrays;
import java.util.concurrent.TimeUnit;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        OneTimeWorkRequest o1 = new OneTimeWorkRequest.Builder(MyWorker.class)
                .setInputData(new Data.Builder().putString("name", "number1")
                        .build())
                .build();
        OneTimeWorkRequest o2 = new OneTimeWorkRequest.Builder(MyWorker.class)
                .setInitialDelay(2, TimeUnit.SECONDS)
                .setInputData(new Data.Builder().putString("name", "number2")
                        .putInt("number", 2).build())
                .build();
        OneTimeWorkRequest o3 = new OneTimeWorkRequest.Builder(MyWorker.class)
                .setInputMerger(ArrayCreatingInputMerger.class)
                .setInputData(new Data.Builder().putString("name", "number3")
                        .build())
                .setConstraints(new Constraints.Builder().setRequiresCharging(true).setRequiresBatteryNotLow(true).build())
                .setInitialDelay(2, TimeUnit.SECONDS).build();

        WorkManager.getInstance(getApplicationContext())
                .beginWith(Arrays.asList(o1, o2))
                .then(o3)
                .enqueue();
    }
}
MyWorker.java:
Java:
package com.example.app3;

import android.content.Context;
import android.util.Log;

import androidx.annotation.NonNull;
import androidx.work.Data;
import androidx.work.Worker;
import androidx.work.WorkerParameters;

public class MyWorker extends Worker {
    public MyWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) {
        super(context, workerParams);
    }

    @NonNull
    @Override
    public Result doWork() {
        int number = getInputData().getInt("number", 0);
        Data ret = new Data.Builder().putInt("number", number*2).build();
        Log.e(getInputData().getString("name"), ""+number*2);
        return Result.success(ret);
    }
}
After starting the application, I see the following in logcat:
Code:
08-03 23:57:16.188 26949-26968/com.example.app3 E/number1: 0
08-03 23:57:16.226 26949-26965/com.example.app3 I/WM-WorkerWrapper: Worker result SUCCESS for Work [ id=ec6086ea-b8d4-41e6-9bff-936fe2c157b3, tags={ com.example.app3.MyWorker } ]
08-03 23:57:18.046 26949-26974/com.example.app3 E/number2: 4
08-03 23:57:18.047 26949-26964/com.example.app3 I/WM-WorkerWrapper: Worker result SUCCESS for Work [ id=93a8312e-aa31-41d0-97b2-35d4d49668db, tags={ com.example.app3.MyWorker } ]
08-03 23:57:18.050 26949-26964/com.example.app3 I/WM-WorkerWrapper: Setting status to enqueued for a0fc4f5c-a9da-4bfd-b91a-428e5c67c56b
08-03 23:57:20.076 26949-26965/com.example.app3 I/WM-WorkerWrapper: Worker result SUCCESS for Work [ id=a0fc4f5c-a9da-4bfd-b91a-428e5c67c56b, tags={ com.example.app3.MyWorker } ]

What could be the problem? It seems to me that something is wrong with the code. I tried to do this:
Java:
if("number3".equals(getInputData().getString("name"))) {
            int[] nums = getInputData().getIntArray("number");
            assert nums != null;
            Log.e("TEST", "" + nums.length);
        }
But nothing happened because the code just doesn’t want to run and nothing is clear from the documentation

caldav calendar

Hi im looking for (free) application thats alows me connect to caldav server (baikal).
Url is look like http://companyweb.com/dav/cal.php/calendars/<username>/<calendarid>/ (autodiscovery is not supported).
I already tried some applications like "Caldav Sync Free Beta" or "Blue Mail" but with no success.
Tried url modifications:
Code:
http://companyweb.com/dav/cal.php/calendars/<username>/<calendarid>/
http://companyweb.com/dav/cal.php/calendars/<username>/
http://companyweb.com/dav/cal.php/calendars/
http://companyweb.com/dav/cal.php/
On pc (with thunderbird) work first perfect

Thanks for any sugestions

Android System Apps from 2008 - Is this normal?

Hello all

I recently got a S10 and when using an app like EZ File Explorer I noticed that I have 379 system apps but only 10 of them have been updated in 2019. The grand majority of them, 369 to be exact, have a modified date of December 31, 2008.

Is this normal or is this some kind of virus? Help would be appreciated.

I am running Android Version 9, Security Patch from 7/1/19, Verizon network with the latest security update 5 installed.

NestedScrollView does not scroll when RecyclerView scrolls

Hi friends, I have a RecyclerView in NestedScrollView. I set the size of the RecyclerView according to the screen size of the user. In this case, the recyclerview layout_height is 700dp, for example.

In this case, the problem is; The NestedScrollView does not scroll while the recyclerView is scrolling, and the nestedScrollView.setOnScrollChange method is not triggered.

What I want is; When scrolling on the recyclerView, NestedScrollView is also shifted and the nestedscrollView.setOnScrollChange method is triggered in any case. I've shared the layout below.
Is there anyone who can help?

Code:
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/nestedScrollView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">

                <androidx.appcompat.widget.SearchView
                    android:elevation="10dp"
                    android:id="@+id/searchView"
                    android:layout_width="match_parent"
                    android:layout_height="100dp"
                    android:layout_margin="4dp"
                    android:layout_marginStart="8dp"
                    android:layout_marginTop="8dp"
                    android:layout_marginEnd="8dp"
                    android:background="@color/colorAccent" />

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/recyclerView"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="4dp"
                    android:layout_marginTop="8dp"/>
            </LinearLayout>


</androidx.core.widget.NestedScrollView>

Help Cannot find music files in phone storage or SD

Hi

I use the Amazon Music app and I have downloaded quite a few albums/songs from it.

On the Amazon Music app, they are showing as downloaded. They appear when I look at my 'offline music'. I am able to play them when I am not connected to the internet.

When I look in Samsung files and search for my songs, both in the phone storage and SD, I can find only a handful of those songs on the SD, it's like the rest are not there. But they MUST be, how else is Amazon Music accessing them?
Also, the Google Play app can only see the same handful of songs.

According to Samsung and Google there are songs that are not there. According to Amazon they are.

I've checked download and temp folders and the songs are not there.
I've cleared the cache partition, it did nothing.

Any help you can give?

SOLVED IT: The songs that I have downloaded through Amazon Music but not bought get added to some folder somewhere that I cannot access to prevent me playing them on any device/app other than Amazon Music (since I am technically renting the music through Amazon).
Once I have paid for the album it gets moved to an accessible folder, as I now own it and can do what I like with it.

NW-Chat announcement

The best and easiest solution for you who wants to have a chat on your website.
The best and easiest solution for you who wants to have a chat on your website.
Setting up a chat can be very complex and expensive.
But with this chat solution, no technical knowledge is required at all and it's only a one-time cost.
Instructions:
1. Buy and download this app.
2. Launch the app and register a new account.
3. Receive an email with the script for the chat.
4. Copy and paste the script onto your website.
5. Everything is ready and you can now chat with your visitors
It's that easy :)
Now your visitors can start chatting with you directly to your mobile.
When a visitor clicks on the chat, a notification will be sent to your mobile saying that someone wants to chat.
You will now never miss a chance at an affair or the opportunity to help a customer / visitor.
Features:
- Chat.
- Mailform.
- Settings for username, chat colors and texts.
- Multi language support for Swedish and English.
In the app there's a tab for settings, where you can customize the chat the way you want it. You can choose if you are available to chat. If you are not available to chat, an mailform will appear instead. Where the visitor is allowed to leave their e-mail address and a message. This will send an e-mail to the e-mail address specified in your settings.
You can also customize the chat colors and texts.

https://play.google.com/store/apps/details?id=org.nixonsworld.nwchat

Try the chat at my own site:
https://nixonsworld.org/nw-chat
See ya :)

Attachments

  • Screenshot_20190727-000239.png
    Screenshot_20190727-000239.png
    93.3 KB · Views: 90
  • Screenshot_20190730-205553.png
    Screenshot_20190730-205553.png
    213.8 KB · Views: 86
  • Screenshot_20190730-205706.png
    Screenshot_20190730-205706.png
    63.5 KB · Views: 73

Too many files in new Project

Hello, I'm trying to learn with Android Studio via course from Udemy.
In this course, when the guy opens a new project, he has only 5 folders/files in explorer. (shown on picture).
But when I try to do THE SAME THING I have 14 folders/files which is very annoying.

He uses Android Studio 3.0.1 and so do I.

Does anyone know how can I achieve only those files instead of 14?

Thanks for answer.

kurz.png studio.png

With a chain of work, each chain is executed many times and the first is ahead of the second

Here is the log with logcat:
Code:
08-02 19:54:05.004 118-1352/? I/GraphicBuffer: allocate buffer (w:480 h:800 f:5) err(0)
08-02 19:54:05.005 118-1352/? I/BufferQueue: [com.example.app1/com.example.app1.MainActivity] createGraphicBuffer before(NULL) after(0x41c561b8, handle=0x41c54f88, w=480, h=800, f=5)
08-02 19:54:05.012 12136-12136/com.example.app1 E/tag1: 1564692071288
08-02 19:54:05.012 12136-12136/com.example.app1 E/tag1: 1564692142434
08-02 19:54:05.012 12136-12136/com.example.app1 E/tag1: 1564691977054
08-02 19:54:05.012 12136-12136/com.example.app1 E/tag1: 1564692137410
08-02 19:54:05.013 12136-12136/com.example.app1 E/tag1: 1564692085695
08-02 19:54:05.013 12136-12136/com.example.app1 E/tag1: 1564692113982
08-02 19:54:05.015 12136-12136/com.example.app1 E/tag1: 1564691972016
08-02 19:54:05.015 12136-12136/com.example.app1 E/tag1: 1564692066231
08-02 19:54:05.015 12136-12136/com.example.app1 E/tag1: 1564692080662
08-02 19:54:05.015 12136-12136/com.example.app1 E/tag1: 1564692108958
08-02 19:54:05.019 118-1352/? I/SurfaceFlinger: [bool android::LayerBase::setFlagsEx(uint32_t, uint32_t)] (com.example.app1/com.example.app1.MainActivity) api:1, flags:0x00000000, mask:0x00000000
08-02 19:54:05.019 118-1352/? W/SurfaceFlinger:     nothing to do with mask 0x00000000
08-02 19:54:05.021 376-407/? I/ActivityManager: [AppLaunch] Displayed Displayed com.example.app1/.MainActivity: +867ms
08-02 19:54:05.027 12136-12136/com.example.app1 E/tag2: 1564692071288
08-02 19:54:05.027 12136-12136/com.example.app1 E/tag2: 1564692142434
08-02 19:54:05.029 12136-12136/com.example.app1 E/tag2: 1564691977054
08-02 19:54:05.031 12136-12136/com.example.app1 E/tag2: 1564692137410
08-02 19:54:05.032 12136-12136/com.example.app1 E/tag2: 1564692085695
08-02 19:54:05.035 12136-12136/com.example.app1 E/tag2: 1564692113982
08-02 19:54:05.035 12136-12136/com.example.app1 E/tag2: 1564691972016
08-02 19:54:05.035 12136-12136/com.example.app1 E/tag2: 1564692066231
08-02 19:54:05.037 12136-12136/com.example.app1 E/tag2: 1564692080662
08-02 19:54:05.037 12136-12136/com.example.app1 E/tag2: 1564692108958
08-02 19:54:05.050 118-118/? I/SurfaceFlinger: [bool android::LayerBase::setFlagsEx(uint32_t, uint32_t)] (Starting com.example.app1) api:2, flags:0x00000000, mask:0x00000000
08-02 19:54:05.050 118-118/? W/SurfaceFlinger:     nothing to do with mask 0x00000000
08-02 19:54:05.053 118-392/? I/BufferQueue: [Starting com.example.app1] disconnect: api=2
08-02 19:54:05.054 118-392/? I/SurfaceTexture: [Starting com.example.app1] [virtual void android::SurfaceTexture::onBuffersReleased()] mCurrentTexture:0, mCurrentBuf:0x41c4dae8
08-02 19:54:05.054 118-392/? I/BufferQueue: [Starting com.example.app1] getReleasedBuffers: returning mask 0xffffffff
08-02 19:54:05.064 118-219/? I/BufferQueue: [Starting com.example.app1] consumerDisconnect
08-02 19:54:05.064 118-219/? I/BufferQueue: [Starting com.example.app1] ~BufferQueue
08-02 19:54:05.069 118-10991/? I/GraphicBuffer: allocate buffer (w:480 h:800 f:5) err(0)
08-02 19:54:05.070 118-10991/? I/BufferQueue: [com.example.app1/com.example.app1.MainActivity] createGraphicBuffer before(NULL) after(0x41c567d8, handle=0x41c44b10, w=480, h=800, f=5)
08-02 19:54:05.582 459-459/? I/SurfaceTextureClient: [0x536b7260] frames:2, duration:1.507000, fps:1.327120
08-02 19:54:05.685 376-406/? I/AlarmManager: reset poweroff alarm none
08-02 19:54:05.712 12136-12156/com.example.app1 E/APP: doWork
08-02 19:54:05.721 12136-12150/com.example.app1 I/WM-WorkerWrapper: Worker result SUCCESS for Work [ id=8cba8fd0-795f-4834-882e-e42a84f2ffd9, tags={ com.example.app1.UploadWorker, tag1, tag2 } ]
08-02 19:54:05.726 12136-12150/com.example.app1 I/WM-WorkerWrapper: Setting status to enqueued for 38ec5c1e-34da-4106-9623-d71c1cfdab14
08-02 19:54:05.764 12136-12136/com.example.app1 E/tag1: 1564692071288
08-02 19:54:05.765 12136-12136/com.example.app1 E/tag1: 1564692142434
08-02 19:54:05.765 12136-12136/com.example.app1 E/tag1: 1564691977054
08-02 19:54:05.765 12136-12136/com.example.app1 E/tag1: 1564692137410
08-02 19:54:05.766 12136-12136/com.example.app1 E/tag1: 1564692085695
08-02 19:54:05.766 12136-12136/com.example.app1 E/tag1: 1564692113982
08-02 19:54:05.766 12136-12136/com.example.app1 E/tag1: 1564691972016
08-02 19:54:05.766 12136-12136/com.example.app1 E/tag1: 1564692066231
08-02 19:54:05.767 12136-12136/com.example.app1 E/tag1: 1564692080662
08-02 19:54:05.767 12136-12136/com.example.app1 E/tag1: 1564692108958
08-02 19:54:05.797 12136-12136/com.example.app1 E/tag2: 1564692071288
08-02 19:54:05.797 12136-12136/com.example.app1 E/tag2: 1564692142434
08-02 19:54:05.798 12136-12136/com.example.app1 E/tag2: 1564691977054
08-02 19:54:05.798 12136-12136/com.example.app1 E/tag2: 1564692137410
08-02 19:54:05.798 12136-12136/com.example.app1 E/tag2: 1564692085695
08-02 19:54:05.798 12136-12136/com.example.app1 E/tag2: 1564692113982
08-02 19:54:05.798 12136-12136/com.example.app1 E/tag2: 1564764845710
08-02 19:54:05.798 12136-12136/com.example.app1 E/tag2: 1564691972016
08-02 19:54:05.798 12136-12136/com.example.app1 E/tag2: 1564692066231
08-02 19:54:05.798 12136-12136/com.example.app1 E/tag2: 1564692080662
08-02 19:54:05.798 12136-12136/com.example.app1 E/tag2: 1564692108958
08-02 19:54:05.799 12136-12136/com.example.app1 E/tag1: 1564692071288
08-02 19:54:05.799 12136-12136/com.example.app1 E/tag1: 1564692142434
08-02 19:54:05.799 12136-12136/com.example.app1 E/tag1: 1564691977054
08-02 19:54:05.799 12136-12136/com.example.app1 E/tag1: 1564692137410
08-02 19:54:05.799 12136-12136/com.example.app1 E/tag1: 1564692085695
08-02 19:54:05.799 12136-12136/com.example.app1 E/tag1: 1564692113982
08-02 19:54:05.799 12136-12136/com.example.app1 E/tag1: 1564764845710
08-02 19:54:05.800 12136-12136/com.example.app1 E/tag1: 1564691972016
08-02 19:54:05.800 12136-12136/com.example.app1 E/tag1: 1564692066231
08-02 19:54:05.800 12136-12136/com.example.app1 E/tag1: 1564692080662
08-02 19:54:05.800 12136-12136/com.example.app1 E/tag1: 1564692108958
08-02 19:54:05.827 118-219/? I/SurfaceFlinger: [SurfaceFlinger] frames:7, duration:1.004000, fps:6.967839
08-02 19:54:07.090 459-459/? I/SurfaceTextureClient: [0x536b7260] frames:2, duration:1.507000, fps:1.327123
08-02 19:54:07.106 118-219/? I/SurfaceFlinger: [SurfaceFlinger] frames:2, duration:1.278000, fps:1.564302
08-02 19:54:07.997 376-391/? I/KeyguardUpdateMonitor: ACTION_BATTERY_CHANGED, status=2,plugged=2, level=78, health=2
08-02 19:54:08.597 459-459/? I/SurfaceTextureClient: [0x536b7260] frames:2, duration:1.506000, fps:1.327154
08-02 19:54:08.613 118-219/? I/SurfaceFlinger: [SurfaceFlinger] frames:2, duration:1.507000, fps:1.327119
08-02 19:54:09.138 459-459/? I/StateTracker: com.android.systemui.statusbar.toolbar.QuickOperationItemPanel$AirlineModeStateTracker@41687828setImageViewResources state is 0
08-02 19:54:09.138 459-459/? I/StateTracker: com.android.systemui.statusbar.toolbar.QuickOperationItemPanel$AirlineModeStateTracker@41687828 mIsUserSwitching is false
08-02 19:54:09.139 459-459/? I/StateTracker: com.android.systemui.statusbar.toolbar.QuickOperationItemPanel$AirlineModeStateTracker@41687828 mIsUserSwitching is false
08-02 19:54:09.139 459-459/? I/StateTracker: com.android.systemui.statusbar.toolbar.ConnectionSwitchPanel$AirlineModeStateTracker@416a0978setImageViewResources state is 0
08-02 19:54:09.140 459-459/? I/StateTracker: com.android.systemui.statusbar.toolbar.ConnectionSwitchPanel$AirlineModeStateTracker@416a0978 mIsUserSwitching is false
08-02 19:54:09.147 459-459/? I/StateTracker: com.android.systemui.statusbar.toolbar.ConnectionSwitchPanel$AirlineModeStateTracker@416a0978 mIsUserSwitching is false
08-02 19:54:09.147 376-788/? E/CellLocation: create GsmCellLocation
08-02 19:54:09.150 376-391/? E/CellLocation: create GsmCellLocation
08-02 19:54:09.153 376-391/? E/CellLocation: create GsmCellLocation
08-02 19:54:09.156 523-523/? I/CallNotifier: PhoneStateListener.onServiceStateChanged: serviceState=SIM1 0 home Tele2 Tele2 25020  HSPA CSS not supported -1 -1 RoamInd=-1 DefRoamInd=-1 EmergOnly=false Regist state: 1
08-02 19:54:09.433 129-129/? W/MtkAgps: ** mtk_agps_update_cinfo(): imsi(250207413982106) mcc(250) mnc(20) lac(27874) cid(3454224)**
08-02 19:54:09.433 129-129/? W/MtkAgps:    -> update cell info: mcc(250)->(250) mnc(20)->(20) lac(27874)->(27874) cid(3454223)->(3454224)
08-02 19:54:09.433 129-129/? I/MtkAgps:      -> update supl_p: mcc(250) mnc(20) ucid(3454224), status(1)
08-02 19:54:10.104 459-459/? I/SurfaceTextureClient: [0x536b7260] frames:2, duration:1.507000, fps:1.327078
08-02 19:54:10.120 118-219/? I/SurfaceFlinger: [SurfaceFlinger] frames:2, duration:1.507000, fps:1.327004
08-02 19:54:10.724 376-406/? I/AlarmManager: reset poweroff alarm none
08-02 19:54:10.762 12136-12136/com.example.app1 E/tag1: 1564692071288
08-02 19:54:10.763 12136-12136/com.example.app1 E/tag1: 1564692142434
08-02 19:54:10.763 12136-12136/com.example.app1 E/tag1: 1564691977054
08-02 19:54:10.764 12136-12136/com.example.app1 E/tag1: 1564692137410
08-02 19:54:10.764 12136-12136/com.example.app1 E/tag1: 1564692085695
08-02 19:54:10.765 12136-12136/com.example.app1 E/tag1: 1564692113982
08-02 19:54:10.765 12136-12136/com.example.app1 E/tag1: 1564764845710
08-02 19:54:10.765 12136-12136/com.example.app1 E/tag1: 1564691972016
08-02 19:54:10.766 12136-12136/com.example.app1 E/tag1: 1564692066231
08-02 19:54:10.766 12136-12136/com.example.app1 E/tag1: 1564692080662
08-02 19:54:10.767 12136-12136/com.example.app1 E/tag1: 1564692108958
08-02 19:54:10.769 12136-12160/com.example.app1 E/APP: doWork
08-02 19:54:10.771 12136-12150/com.example.app1 I/WM-WorkerWrapper: Worker result SUCCESS for Work [ id=38ec5c1e-34da-4106-9623-d71c1cfdab14, tags={ com.example.app1.UploadWorker, tag1, tag2 } ]
08-02 19:54:10.776 12136-12136/com.example.app1 I/SurfaceTextureClient: [0x51df76e0] frames:5, duration:5.797000, fps:0.862438
08-02 19:54:10.856 12136-12136/com.example.app1 E/tag2: 1564692071288
08-02 19:54:10.856 12136-12136/com.example.app1 E/tag2: 1564692142434
08-02 19:54:10.857 12136-12136/com.example.app1 E/tag2: 1564764850767
08-02 19:54:10.857 12136-12136/com.example.app1 E/tag2: 1564691977054
08-02 19:54:10.858 12136-12136/com.example.app1 E/tag2: 1564692137410
08-02 19:54:10.858 12136-12136/com.example.app1 E/tag2: 1564692085695
08-02 19:54:10.858 12136-12136/com.example.app1 E/tag2: 1564692113982
08-02 19:54:10.859 12136-12136/com.example.app1 E/tag2: 1564764845710
08-02 19:54:10.859 12136-12136/com.example.app1 E/tag2: 1564691972016
08-02 19:54:10.860 12136-12136/com.example.app1 E/tag2: 1564692066231
08-02 19:54:10.860 12136-12136/com.example.app1 E/tag2: 1564692080662
08-02 19:54:10.861 12136-12136/com.example.app1 E/tag2: 1564692108958
08-02 19:54:10.910 12136-12136/com.example.app1 E/tag1: 1564692071288
08-02 19:54:10.911 12136-12136/com.example.app1 E/tag1: 1564692142434
08-02 19:54:10.911 12136-12136/com.example.app1 E/tag1: 1564764850767
08-02 19:54:10.912 12136-12136/com.example.app1 E/tag1: 1564691977054
08-02 19:54:10.912 12136-12136/com.example.app1 E/tag1: 1564692137410
08-02 19:54:10.913 12136-12136/com.example.app1 E/tag1: 1564692085695
08-02 19:54:10.913 12136-12136/com.example.app1 E/tag1: 1564692113982
08-02 19:54:10.914 12136-12136/com.example.app1 E/tag1: 1564764845710
08-02 19:54:10.914 12136-12136/com.example.app1 E/tag1: 1564691972016
08-02 19:54:10.914 12136-12136/com.example.app1 E/tag1: 1564692066231
08-02 19:54:10.915 12136-12136/com.example.app1 E/tag1: 1564692080662
08-02 19:54:10.915 12136-12136/com.example.app1 E/tag1: 1564692108958
08-02 19:54:11.611 459-459/? I/SurfaceTextureClient: [0x536b7260] frames:2, duration:1.507000, fps:1.327068
08-02 19:54:11.627 118-219/? I/SurfaceFlinger: [SurfaceFlinger] frames:5, duration:1.506000, fps:3.317970
08-02 19:54:13.118 459-459/? I/SurfaceTextureClient: [0x536b7260] frames:2, duration:1.507000, fps:1.327095
08-02 19:54:13.134 118-219/? I/SurfaceFlinger: [SurfaceFlinger] frames:2, duration:1.507000, fps:1.327057
08-02 19:54:14.627 459-459/? I/SurfaceTextureClient: [0x536b7260] frames:2, duration:1.509000, fps:1.325255
08-02 19:54:14.641 118-219/? I/SurfaceFlinger: [SurfaceFlinger] frames:2, duration:1.507000, fps:1.327107
08-02 19:54:14.737 376-413/? I/InputReader: Reconfiguring input devices.  changes=0x00000010
08-02 19:54:14.749 376-393/? I/ActivityManager: Start proc android.process.acore for broadcast com.android.providers.contacts/.PackageIntentReceiver: pid=12161 uid=10060 gids={3003, 1015, 1028}
08-02 19:54:14.780 12161-12161/? E/Trace: error opening trace file: No such file or directory (2)
08-02 19:54:14.786 562-562/? I/Launcher: setLoadOnResume
08-02 19:54:14.802 12161-12161/? I/ActivityThread: Pub com.android.voicemail: com.android.providers.contacts.VoicemailContentProvider
08-02 19:54:14.848 11639-11639/? I/AccountTypeManager: Received Intent:Intent { act=android.intent.action.PACKAGE_CHANGED dat=package:com.example.app1 flg=0x8000010 (has extras) }
08-02 19:54:14.848 11639-11657/? I/AccountTypeManager: loadAccountsInBackground()+
Code in MainActivity:
Java:
TextView [text = findViewById(R.id.text);

		Constraints constraints = new Constraints.Builder().setRequiresCharging(true).build();
		Data data = new Data.Builder().putString(KEY_NAME, "Mike").build();
		OneTimeWorkRequest.Builder uploadWordRequest = new OneTimeWorkRequest.Builder(UploadWorker.class)
				.setConstraints(constraints)
				.setBackoffCriteria(BackoffPolicy.EXPONENTIAL, 5, TimeUnit.SECONDS)
				.setInputData(data)
				.keepResultsForAtLeast(2, TimeUnit.SECONDS);

		OneTimeWorkRequest one = uploadWordRequest.setInitialDelay(1, TimeUnit.SECONDS).addTag("tag1").build();
		OneTimeWorkRequest two = uploadWordRequest.setInitialDelay(5, TimeUnit.SECONDS).addTag("tag2").build();

		WorkManager w = WorkManager.getInstance(getApplicationContext());
		w.beginWith(one).then(two).enqueue();

		LiveData<List<WorkInfo>> l = w.getWorkInfosByTagLiveData("tag1");
		l.observe(this, new Observer<List<WorkInfo>>() {
			@SuppressLint("SetTextI18n")
			@Override
			public void onChanged(List<WorkInfo> workInfos) {
				for(int i=0;i<workInfos.size(); i++) {
					if(workInfos.get(i).getState() == WorkInfo.State.SUCCEEDED) {
						text.setText("" + workInfos.get(i).getOutputData().getLong(KEY_NAME, 0));
						Log.e("tag1", "" + workInfos.get(i).getOutputData().getLong(KEY_NAME, 0));
					}
				}
			}
		});
		w.getWorkInfosByTagLiveData("tag2").observe(this, new Observer<List<WorkInfo>>() {
			@SuppressLint("SetTextI18n")
			@Override
			public void onChanged(List<WorkInfo> workInfos) {
				for(int i=0;i<workInfos.size(); i++) {
					if(workInfos.get(i).getState() == WorkInfo.State.SUCCEEDED) {
						text.setText("" + workInfos.get(i).getOutputData().getLong(KEY_NAME, 0));
						Log.e("tag2", "" + workInfos.get(i).getOutputData().getLong(KEY_NAME, 0));
					}
				}
			}
		});
UploadWorker.java:
Java:
package com.example.app1;

import android.content.Context;
import android.util.Log;

import androidx.annotation.NonNull;
import androidx.work.Data;
import androidx.work.Worker;
import androidx.work.WorkerParameters;

public class UploadWorker extends Worker {

	public UploadWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) {
		super(context, workerParams);
	}

	@NonNull
	@Override
	public Result doWork() {
		String key = "string1";
		Data ret = new Data.Builder().putLong(key, System.currentTimeMillis()).build();
		Log.e("APP", "doWork");
		return Result.success(ret);
	}
}
Why does the text not change 5 seconds after the application starts? It changes only once and this is not what I need!
You see that tag1 is ahead of tag2 which should not be. It is necessary that after a second the text is updated with the first value, and then after 4 seconds with a different value according to the logic of the code

Context Menu - controlling position

I have a problem with my context menus. The items sensitive to long-press are items in a ListView of file names. The context menu has 3 items:
Delete this file
Rename this file
Display file info

It works fine except when I long-press an item near the top of the screen. Since the context menu likes to position itself by default just above the item that was long-pressed, the context menu is vertically compressed for items near the top of the screen, and all three menu choices are not visible at once. They can be scrolled to get to all three, but I don't want the user to have to scroll the menu. I would like to override the default positioning of the context menu. I realize that by doing so I will be breaking the visual association between the item the user long-pressed and the actions to be performed by the menu selections. But I can compensate for that by including the name of the item long-pressed in the context menu header, so the user will still know what item he long-pressed. So I just need to know how to override the default positioning of a context menu. My context menu is created entirely by code (no xml) as follows:

Code:
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
  if (v == list) {
    AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo)menuInfo;
    {
        File f = new File(path.get(info.position));
        menu.setHeaderTitle(FileExplorer.zapExtension(f.getName()));
        menu.add(Menu.NONE,0,0,"Delete this file");
        menu.add(Menu.NONE,1,1,"Rename this file");
        menu.add(Menu.NONE,2,2,"Display file info");
     }
  }
}

Filter

Back
Top Bottom