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

Apps Image is not changed when upload new image

In Android Studio, I can get to change an image in Firebase Storage.
But When I run app again, the old image still in cache and is loaded on ImageView, even I link new image with Firebase directly.

Is there someone with this same problem which could help me?

P.S.: I can save the image in Firebase Storage.

My code is:
Java:
public static void changePhoto(final Context context, String pUserId, Intent pData){
        Uri urlPhoto =  pData.getData();
        StorageReference mStorage;
        Bundle extras = pData.getExtras();
        Bitmap bmp = (Bitmap) extras.get("data");
        ByteArrayOutputStream bos = new ByteArrayOutputStream();

        bmp.compress(Bitmap.CompressFormat.WEBP, 100, bos);
        String imageEncoded = Base64.encodeToString(bos.toByteArray(), Base64.DEFAULT);
        mStorage = FirebaseStorage.
                getInstance().
                getReference(pUserId + "/" + pUserId + ".webp");
    

        mStorage.putBytes(bos.toByteArray()).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
            @Override
            public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {

                Toast.makeText(context, "Ok. Photo uploaded with success.",Toast.LENGTH_LONG).show();
            }
        }).addOnFailureListener(new OnFailureListener() {
            @Override
            public void onFailure(@NonNull Exception e) {
                Toast.makeText(context, "!!! Error !!!",Toast.LENGTH_LONG).show();
            }
        });
    }

How to enable LockScreen by default in android pie

Hi Everyone.

I am new for android platform source code. I have a requirement like below please help me to achieve that.

My requirement was, I need to enable this screen lock feature and the specified password in AOSP itself. once i build the source and flashed the images to the device. The device should ask the password to access the system once it booted. how to do this. Any help is really appreciated.

Thansk & Regards,
VImal.

Help Uploading an intranet based application to Play Store

I am currently working on a intranet based application wherein the servers would not be deployed to cloud environment.

I have few queries surrounding that:


1. Does Google allow intranet based application to be deployed to Play store?

2. If Yes, since my servers are to be installed locally(only on windows) how do i provide the server access so that Google can do the testing as per the play store upload process?


**I know intranet based app should not be sent into production, but this requirement is very specific. Any help would be greatly appreciated.

Guess the Flag - World Flags

Which country does this flag belong to?**
How well do you know flags and its countries? Match the flags with their respective nations. Be the ultimate quiz master!

"Great app with a very fun but educational way to learn the flags which can always be useful!! Thanks!!" - ★★★★★

• How well do you know flags and its countries? Become a professional!
• Match the flags with their respective nations.


★ frequent updates
★ source of knowledge
★ countries trivia
★ great fun

Challenge yourself to guess the countries. Test your knowledge of national flags!

https://play.google.com/store/apps/details?id=com.silverpoint.guesstheflagworldflags

Attachments

  • 20200316_083452.jpg
    20200316_083452.jpg
    459.9 KB · Views: 194

Apps "Cannot resolve symbol 'array' " in R.array.array_name

Trying to populate a dropdown box via a Spinner. I have a <string-array name="currencies_array"> defined and populated in strings.xml. The array in R.array.currencies_array is highlighted red saying "cannot resolve symbol 'array' ". Exact code from android documentation itself and stackoverflow articles.

Android doc for spinner under "populate the spinner with user choices: https://developer.android.com/guide/topics/ui/controls/spinner#java
StackOverflow article (based on reply by Gurinder Singh, 3rd down): https://stackoverflow.com/questions/13377361/how-to-create-a-drop-down-list

Code:
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.currencies_array, android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
dropdown.setAdapter(adapter);

Whats the throttle speeds for metropcs after 35GB mark?

That sounds more like tower congestion than anything else. My understanding is that 'deprioritization' - not outright throttling - starts at 35+ GB use. If your closest T-Mobile tower is very congested, your speeds can definitely slow. Since it's not an actual tower issue, they probably wouldn't do anything about it, but you can call customer service and tell them about it.
In contrast, my family is also on unlimited. My son used over 60 GB last month and was able to watch streaming video with no issues all month long.

I'm no longer past the 35GB mark now and I'm still getting severe connection issues. Ridiculously bad connection out here in the country even though I got 4 of 5 bars of 4G LTE, and my phone is within 10 feet of my laptop so my connection to it is 4 of 4 bars.

Its so bad right now PDANet keeps throwing "reconnected" messages at me every 30-120 seconds or so, and my speed test shown dialup levels of speed with 0KB/s upload speed for 50% of the upload test.

This is so frustrating, I don't know what to do. I switched from Boost Mobile because Metro has far more signal out here where Boost, I can't even use my phone anywhere within 2 miles of my place except a 1 inch by one inch squared location in my room where I had to tape the phone down on top of a box of dominos on top of the mini fridge on top of a wash rag to raise it just enough to get that 1 bar of 4G LTE.

But now that I'm on Metro, my speeds are terrible. Except during certain portions of the day, and while I had just gotten the service the whole first 3 days were great when I used Mobile Hotspot not using PDANet.

-- As for "exact geolocation" yea no. I can say Northwest Arkansas, at least. But giving exact, no.

--- As for the rest;
House, one floor, Galaxy S8.

---- Last edit:
I checked out Fi, and no, its worse. They throttle you after 15GB usage and it'd cost more than my current plan does by quite a lot. Considering I use 60GB/m on a regular basis.
Its definitely tower congestion even if ur under 35 and ur metro but ur surrounded by tmobile users ,their transfer will be before urs Towers belong to tmobile ,metro is just piggybackingboff tmobile towers that's why u suffer under the 35 gig mark , amd u must live in a city right ? I live in the country evrybody uses cricket I use metro only time I'm screwed is around the 15th of the month I pass 35, I use about 80 gigs evry month

Forgot where I have turned data usage off

Hello,
I have a huawei p20.
I have a problem regarding using data while roaming. I accidentely turned data on in a country where I shouldt and after that I turned data off somewhere in settings completely. Now I am at home and when I turn data on it doesnt function. I cant seem to remember where have I turned data usage off and I want to aks if anyone knows where this should be?

Thanks for the help.
Airplane mode easiest way , turns off wifi bluetooth and data and phone nothing works no calls or text in or out. I dont know why yall go the long into settings ,

Help Screen is unreadable, but I need to download pics

That photo indicates at least you can see the screen even if its touch interface might not be working. If it's just a matter of the digitizer is messed up, it might be worth trying to use a Type C-to-USB adapter to connect a USB mouse and/or keyboard to key in past the lock screen. If you can at least get it unlocked than you can backup the data before sending it off to be serviced.
https://www.amazon.com/gp/product/B...OQIKU&linkId=2b192d2bb2a847371300f1e455c47c9e
That's a good call: you can see enough of the keypad that you can probably get an indicator of where the cursor is on the left-hand row, then work out your moves from there.

Keyboards are easier to judge semi-blind than mice (I speak from experience of using both with a broken screen).

Duplicate class com.google.android.gms.location.places.zza ERROR when building in android studio

Im pretty new to android studio development and I`m having trouble when building my apk, Im using google maps for location tracking and firebase with pubnub for notifications.

My problem came when I added firebase and started to add the dependencies, and when I tried to build I get this error: Duplicate class com.google.android.gms.location.places.zza found in modules jetified-play-services-places-9.6.1-runtime.jar (com.google.android.gms:play-services-places:9.6.1) and play-services-places-placereport-17.0.0-runtime.jar (com.google.android.gms:play-services-places-placereport:17.0.0)

App Gradle:

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
compileSdkVersion 28
buildToolsVersion '29.0.2'

defaultConfig {
applicationId "com.parse.starter"
minSdkVersion 17
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
/*minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'*/
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation 'com.parse.bolts:bolts-tasks:1.3.0'
implementation 'com.parse:parse-android:1.13.0'
implementation 'com.android.support:multidex:1.0.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'androidx.navigation:navigation-fragment:2.0.0'
implementation 'androidx.navigation:navigation-ui:2.0.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:cardview-v7:28.1.1'
implementation 'com.github.ar-android:DrawRouteMaps:1.0.0'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.android.support:recyclerview-v7:28.1.1'
implementation 'nl.psdcompany:duo-navigation-drawer:2.0.8'
implementation group: 'com.pubnub', name: 'pubnub-gson', version: '4.31.0'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.9.2'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.9.2'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.2'
implementation 'com.github.jd-alexander:library:1.1.0'
implementation 'com.google.firebase:firebase-messaging:17.3.3'
Module Gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.2.0'
}
}

allprojects {
repositories {
jcenter()
google()
maven{url "https://jitpack.io"}
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}


ext {
compileSdkVersion = 28
buildToolsVersion = "29.0.2"

minSdkVersion = 17
targetSdkVersion = 28
}

Filter

Back
Top Bottom