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

Help Redmi 7A storage not loading on laptop

When I plug my phone in, select File Transfer and open Internal Storage, some folders and files show up but it keeps loading forever and you can't click on anything. I tried using different USB ports and cables, restarted both the laptop and the phone, tried plugging in to a different PC, cleared all app cache and lastly installed newest system updates. What could be the problem?

PackageInstaller not prompting

I am using PackageInstaller to prompt for an update of own app from apk file.

The commit() call is not prompting for the update, and there is no exception.
Does anyone have an idea?

CODE:

void promptApkUpdate(Activity activity, File file)
{
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
{
PackageInstaller.Session session = null;

try
{
PackageInstaller packageInstaller = activity.getPackageManager().getPackageInstaller();
PackageInstaller.SessionParams params = new PackageInstaller.SessionParams(
PackageInstaller.SessionParams.MODE_FULL_INSTALL);
params.setAppPackageName(activity.getPackageName());
int sessionId = packageInstaller.createSession(params);
session = packageInstaller.openSession(sessionId);
packageInstaller.registerSessionCallback(createCallBack());
addApkToInstallSession(file, session);
// Create an install status receiver.
Intent intent = new Intent(activity, MainActivity.class);
intent.setAction(PACKAGE_INSTALLED_ACTION);
PendingIntent pendingIntent = PendingIntent.getBroadcast(
activity,
sessionId,
new Intent(PACKAGE_INSTALLED_ACTION),
0);
IntentSender statusReceiver = pendingIntent.getIntentSender();
// Commit the session (this will start the installation workflow).
session.commit(statusReceiver);
}
catch (IOException e)
{
throw new RuntimeException("Couldn't install package", e);
}
catch (RuntimeException e)
{
if (session != null)
session.abandon();
}
}
}

void addApkToInstallSession(File apkFile, PackageInstaller.Session session)
throws IOException
{
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
{
// It's recommended to pass the file size to openWrite(). Otherwise installation may fail
// if the disk is almost full.
try
(
OutputStream packageInSession = session.openWrite("package", 0, apkFile.length());
InputStream is = new FileInputStream(apkFile.getAbsoluteFile());
)
{
byte[] buffer = new byte[16384];
int n;
while ((n = is.read(buffer)) >= 0)
{
packageInSession.write(buffer, 0, n);
}
}
}
}

[Free][Game]Beat the Best - action-packed 3d endless runner game - Update

The new version of my endless runner "Beat the Best" has been available for several weeks.
Google Play Store Link: https://play.google.com/store/apps/details?id=de.DHenningt.Beat_the_Best
Jb5ZfS.png


New function:
● A new UI with many new functions and shorter loading times.
● If you click on the plus icon in the menu, you can now set the graphic quality, music and FX volume under Settings.
● Tonns of bugs have been fixed.
● Improved performances and nicer animations.
● The auto rotation function has been added.

If you want to send me suggestions for improvement or bugs, please feel free to write a review in the Google Play Store or here: https://forms.gle/PRh8AMKWg58p7ory5.

OxygenOS update 10.3.5 for OnePlus 6 & 6T

OnePlus has begun the OTA, (Over The Air), rollout of their new stable Android 10 OxygenOS firmware, 10.3.5, for OnePlus 6T, McLaren and OnePlus 6 users.

As always, there will be a limited roll out initially, followed by the global roll out in a few days.

Build date = 19 July 2020

Download size = 1795MB

Changelog

System




    • Optimized RAM management
    • Newly adapted OnePlus Buds, easier to take advantage of wireless connection
    • Fixed the crash issue when browsing on Chrome
    • Fixed the black screen issue when opening logkit
    • Improved system stability and fixed general bugs
    • Updated Android Security Patch to 2020.07
    • Updated GMS package to 2020.05

Android security patch = July 2020

Camera version still = 3.8.114

This is the 20th official, stable, update for the 6T in 627 days. 1 update on average, every 31 days

(N.B. This OxygenOS 10.3.5 is not available for the T-Mobile (USA) carrier minority variant)


[FREE][GAME] Hug the Rabbit: Animal Runner Adventure

Hi all
dont hug me_changes_1024x500.png


After two years of work after hours, I finally managed to release my first game on Android and iOS. The game is called "Hug the Rabbit: Animal Runner Adventure" and was created with the help of Unity 3D.
I am very interested in your opinion about my game. What would you change? Maybe you have some tips what to add to game to make it more addictive?
I am happy to hear any suggestions and will answer any questions you have.

Here's a YouTube teaser:
Don't Hug Me - Game Trailer
You can download the game for free on:
Google Play Android
Apple Store iPhone / iPad
Game offical website:
Don't Hug Me Official

Thanks everyone for your help and keep your fingers crossed!

Help Can't use phone (popup)

I have a samsung a50, one ui 2, android 10.
I'm using popup view quite a lot. Just some minutes ago I resized discord and touched the screen edge, discord making a bigger window, but the selection rectangle (for size) still there, I exited youtube (main app) and from then to now I can't touch anything, the only things I can do are:
- use volume buttons
- use AOD, but even music player doesn't work
- use shut down button
- use gesture navigation bar
- open browser (hold from home)
- access files (using USB into laptop)

Here's a picture: https://imgur.com/a/YfvkViF

Question for a moderator

Hello:
I'm a researcher at the University of Oklahoma. I'm working with graduate students on a research project and would like to post a link to a survey about developing applications for developers to complete. It will be around 35 questions. We will have the survey approved by our research board before we post it - this process could take a couple of months but they are unlikely to approve it unless I can tell them we've been in contact with the forum moderators and been told posting a survey will be allowed.

I don't want to violate any norms, can a moderator let me know if this is acceptable on this forum?

thanks, Teresa

Call info - nothing there

Sometimes when I get a call from a number I don't recognize, I'll let it go to voicemail. Then I'll check the history of the number to see if maybe it was someone (a biz maybe) I had called earlier and they were returning my call. I do this by touching the number and getting options - add to contacts, call, message, video chat, and and info button. I click on the info button and am supposed to see the call history. However, my phone app displays a blank screen and freezes. I must go to recent app menu and close the phone app. Attached is what I see when I click on the info button. Thoughts?

Attachments

  • Screenshot_20200730-134151_Phone.jpg
    Screenshot_20200730-134151_Phone.jpg
    32.9 KB · Views: 308

Apps Secret camera, fails to save or I can't find files

testing on Pixel 3a, Android API 29 +

So I'm writing an application that needs to take a picture based on an event, other than a user pressing a camera button. No big deal. I just set the event rather than an onclicklistner, right. Sure. The first problem was most of the information out there revolved around intent and calling the basic camera application. So I had to dig into the camera API's. Camera, Camera2, CameraX. Well I'm now looking at Camera2 and CameraX. CameraX seems a lot simpler.

Anyway moving on. I have pulled two different examples that I'm going to strip down to look at just the capture functionality. Both examples have a preview screen, and a button. I'm going to throw the preview screen out and create a take picture event.

The problem I'm having is one application fails to save the picture while the other application I can't find where the pictures are being saved. I believe there is a permission issue that I'm having trouble with.

BOTH
with both applications I have permissions set in my manifest file.

Code:
<uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

I also check for permission on both API's for both camera and storage access during onCreate()

Java:
if(allPermissionsGranted()){
    Toast.makeText(MainActivity.this, "Granted", Toast.LENGTH_SHORT).show();
    startCamera(); //start camera if permission has been granted by user
} else{
    Toast.makeText(MainActivity.this, "Denied", Toast.LENGTH_SHORT).show();
    ActivityCompat.requestPermissions(this, REQUIRED_PERMISSIONS, REQUEST_CODE_PERMISSIONS);
}

private boolean allPermissionsGranted(){

    for(String permission : REQUIRED_PERMISSIONS){
        if(ContextCompat.checkSelfPermission(this, permission) != PackageManager.PERMISSION_GRANTED){
            return false;
        }
    }
    return true;
}

CameraX

Here is were things differ. I create the file the image is to be saved in this way.

Java:
SimpleDateFormat mDateFormat = new SimpleDateFormat("yyyyMMddHHmmss", Locale.US);
File file = new File(getBatchDirectoryName(), mDateFormat.format(new Date())+ ".jpg");

public String getBatchDirectoryName() {

    String app_folder_path = "";
    app_folder_path = Environment.getExternalStorageDirectory() + "/images";
    File dir = new File(app_folder_path);
    if (!dir.exists() && !dir.mkdirs()) {
        Toast.makeText(MainActivity.this, "Trip", Toast.LENGTH_SHORT).show();
    }

    return app_folder_path;

This is where I believe the root issue is for some reason I think its a permission issue. When ever I check if the directory exists and then create the directory if it doesn't exist, and try's to create the directory it always fails. I always see the Toast message. I took a look at the stacktrace and I see the following errors.

Code:
W/System.err: androidx.camera.core.ImageCaptureException: Failed to write or close the file
W/System.err:     at androidx.camera.core.ImageCapture$3.onError(ImageCapture.java:669)
        at androidx.camera.core.ImageSaver.lambda$postError$1$ImageSaver(ImageSaver.java:263)
        at androidx.camera.core.-$$Lambda$ImageSaver$eAp-cZyzsEk-LVLazzLE-ezQzwo.run(Unknown Source:8)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
W/System.err:     at java.lang.Thread.run(Thread.java:919)
W/System.err: Caused by: java.io.FileNotFoundException: /storage/emulated/0/images/20200730085024.jpg: open failed: ENOENT (No such file or directory)
        at libcore.io.IoBridge.open(IoBridge.java:496)
W/System.err:     at java.io.FileOutputStream.<init>(FileOutputStream.java:235)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:186)
        at androidx.camera.core.ImageSaver.run(ImageSaver.java:97)
        ... 3 more
W/System.err: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
        at libcore.io.Linux.open(Native Method)
W/System.err:     at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
        at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252)
        at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
        at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7255)
        at libcore.io.IoBridge.open(IoBridge.java:482)
        ... 6 more
D/EGL_emulation: eglMakeCurrent: 0xe09de0c0: ver 3 0 (tinfo 0xe0a8fb90)
W/example.camera: JNI critical lock held for 18.377ms on Thread[15,tid=8749,Runnable,Thread*=0xd531e600,peer=0x13c40348,"Binder:8690_3"]
W/example.camera: JNI critical lock held for 19.631ms on Thread[15,tid=8749,Runnable,Thread*=0xd531e600,peer=0x13c40348,"Binder:8690_3"]

It appears that it can't find the file/directory. Based on passed experience with .csv files, and the reading I should be able to look at the device via the Device File Explorer. However when I open it and look at the /storage/emulated/ folder it just gives me a permission denied message.

upload_2020-7-30_9-13-45.png


This is the case even if I'm running an emulator or the app directly on the device.

Camera2
The application that I'm running the Camera2 API appears to save the image, but I cant find the images. I get the same access issue from the screen shot above, and the images are stored in this location. So I feel like its a permission issue still.

For this application I don't attempt to create any new directories.

Java:
file = new File(Environment.getExternalStorageDirectory()+"/"+UUID.randomUUID().toString()+".jpg");

The problem with this is, in the final code, I will be creating a new folder for each time the application is run, as each time the app is run will be its own log of files. There will be photos and data files that will need to be organized by instance.

But with that said, even if I port this way of saving data to the device, as it appears to save the images, doesn't fail, I still don't have access to the images.

Any insight?

Filter

Back
Top Bottom