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

sync google drive to sd card files and sync google drive to files in general, both pc and android

trying to figure a way to either have super backup make a duplicate copy to google drive every time there is a scheduled backup in addition to the local storage or have my local storage sd card folder for super backup be auto synced to google drive?
just basically is it possbile to have google drive folders sync either to their pc folders or phone sd card folders ???
eg. so when ever a new file is added the file is added to google drive and whenever a file is changed the changed version is updated to google drive

computer freezes on App->New->New Module

Hi i've compiled programs and loaded and executed them on my phone using AS 4.1.1 without any issues. But if i have a project open and i do App--> New--> New Module the computer brings up the New Module dialog and then just slips onto a coma. I open Task Manager and it says the computer is overloading like a an elephant in a rickshaw. After a few minutes i just have to give up and hit cancel.
Anybody else have this happen?

Replacement for Google Play Music?!

For some reason Google decided to axe their Play Music app, assuring us that we can find "all the features we love" in the YouTube Music app. There's just one problem with that - YouTube Music lacks almost every single feature that Google Play Music had!

There is no way to search your own library, there is no way to view songs you have downloaded on the app alongside songs you stream. The functionality is completely unworkable and not a replacement for Google Play Music whatsoever.

Can anyone show me a way to still get Google Play Music or recommend me an app in which you can view songs added to your library from streaming alongside mp3's native to your phone?

png as Ambient Background Not Showing

I am attempting to use bdg.png as an ambient background. Can anybody assist me with it not showing? Thank you in advance for any help.

Java:
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorMatrix;
import android.graphics.ColorMatrixColorFilter;
import android.graphics.Paint;
import android.graphics.Rect;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;

import android.support.wearable.watchface.CanvasWatchFaceService;
import android.support.wearable.watchface.WatchFaceService;
import android.support.wearable.watchface.WatchFaceStyle;
import android.view.SurfaceHolder;
import android.view.View;


import java.lang.ref.WeakReference;
import java.util.Calendar;
import java.util.TimeZone;
import java.util.concurrent.TimeUnit;

import static android.view.View.LAYER_TYPE_SOFTWARE;


public class MyWatchFace extends CanvasWatchFaceService {

/*
* Updates rate in milliseconds for interactive mode. We update once a second to advance the
* second hand.
*/
private static final long INTERACTIVE_UPDATE_RATE_MS = TimeUnit.SECONDS.toMillis(1);

/**
* Handler message id for updating the time periodically in interactive mode.
*/
private static final int MSG_UPDATE_TIME = 0;

[USER=1021285]@override[/USER]
public Engine onCreateEngine() {
return new Engine();
}

private static class EngineHandler extends Handler {
private final WeakReference<MyWatchFace.Engine> mWeakReference;

public EngineHandler(MyWatchFace.Engine reference) {
mWeakReference = new WeakReference<>(reference);
}

[USER=1021285]@override[/USER]
public void handleMessage(Message msg) {
MyWatchFace.Engine engine = mWeakReference.get();
if (engine != null) {
switch (msg.what) {
case MSG_UPDATE_TIME:
engine.handleUpdateTimeMessage();
break;
}
}
}
}

private class Engine extends CanvasWatchFaceService.Engine {


/* Handler to update the time once a second in interactive mode. */
private final Handler mUpdateTimeHandler = new EngineHandler(this);
private Calendar mCalendar;
private final BroadcastReceiver mTimeZoneReceiver = new BroadcastReceiver() {
[USER=1021285]@override[/USER]
public void onReceive(Context context, Intent intent) {
mCalendar.setTimeZone(TimeZone.getDefault());
invalidate();
}
};
private boolean mRegisteredTimeZoneReceiver = false;
private boolean mMuteMode;
private float mCenterX;
private float mCenterY;

/* Colors for all hands (hour, minute, seconds, ticks) based on photo loaded. */

private Bitmap mHourPaint;
private Bitmap mHoursPaint;
private Paint paint;
private Bitmap mMinutesPaint;
private Bitmap mMinutePaint;
private Bitmap mSecondsPaint;
private Bitmap mSecondPaint;
private Paint mBackgroundPaint;
private Bitmap mBackgroundBitmap;
private Bitmap mGrayBackgroundBitmap;
private boolean mLowBitAmbient;
private boolean mBurnInProtection;


[USER=1021285]@override[/USER]
public void onCreate(SurfaceHolder holder) {
super.onCreate(holder);

setWatchFaceStyle(new WatchFaceStyle.Builder(MyWatchFace.this)
.setAcceptsTapEvents(true)
.setHideStatusBar(true)
.build());

mCalendar = Calendar.getInstance();

initializeBackground();
initializeWatchFace();
}

private void initializeBackground() {
mBackgroundPaint = new Paint(Paint.FILTER_BITMAP_FLAG);
//mBackgroundPaint.setColor(Color.BLACK);
mBackgroundBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.bg);
mGrayBackgroundBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.bgd);



}

private void initializeWatchFace() {
/* Set defaults for colors */

paint = new Paint(Paint.FILTER_BITMAP_FLAG);
paint.setAntiAlias(true);
paint.setShadowLayer(0, 0.0f, 0.0f, Color.BLACK);

mHoursPaint = BitmapFactory.decodeResource(getResources(), R.drawable.hourssh);
mHourPaint = BitmapFactory.decodeResource(getResources(), R.drawable.hours);
mMinutesPaint = BitmapFactory.decodeResource(getResources(), R.drawable.minutessh);
mMinutePaint = BitmapFactory.decodeResource(getResources(), R.drawable.minutes);
mSecondsPaint = BitmapFactory.decodeResource(getResources(), R.drawable.secondssh);
mSecondPaint = BitmapFactory.decodeResource(getResources(), R.drawable.seconds);

}

[USER=1021285]@override[/USER]
public void onDestroy() {
mUpdateTimeHandler.removeMessages(MSG_UPDATE_TIME);
super.onDestroy();
}

[USER=1021285]@override[/USER]
public void onPropertiesChanged(Bundle properties) {
super.onPropertiesChanged(properties);
mLowBitAmbient = properties.getBoolean(PROPERTY_LOW_BIT_AMBIENT, false);
mBurnInProtection = properties.getBoolean(PROPERTY_BURN_IN_PROTECTION, false);
}

[USER=1021285]@override[/USER]
public void onTimeTick() {
super.onTimeTick();
invalidate();
}

[USER=1021285]@override[/USER]
public void onAmbientModeChanged(boolean inAmbientMode) {
super.onAmbientModeChanged(inAmbientMode);

updateWatchHandStyle();

/* Check and trigger whether or not timer should be running (only in active mode). */
updateTimer();
}

private void updateWatchHandStyle() {


}

[USER=1021285]@override[/USER]
public void onInterruptionFilterChanged(int interruptionFilter) {
super.onInterruptionFilterChanged(interruptionFilter);
boolean inMuteMode = (interruptionFilter == WatchFaceService.INTERRUPTION_FILTER_NONE);

/* Dim display in mute mode. */
if (mMuteMode != inMuteMode) {
mMuteMode = inMuteMode;
// mHourPaint.setAlpha(inMuteMode ? 100 : 255);
// mMinutePaint.setAlpha(inMuteMode ? 100 : 255);
// mSecondPaint.setAlpha(inMuteMode ? 80 : 255);
invalidate();
}
}

[USER=1021285]@override[/USER]
public void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) {
super.onSurfaceChanged(holder, format, width, height);

/*
* Find the coordinates of the center point on the screen, and ignore the window
* insets, so that, on round watches with a "chin", the watch face is centered on the
* entire screen, not just the usable portion.
*/
mCenterX = width / 2f;
mCenterY = height / 2f;

/* Scale loaded background image (more efficient) if surface dimensions change. */
float scaleHoursBitmap = height / (float) mHoursPaint.getHeight();
float scaleHourBitmap = height / (float) mHourPaint.getHeight();
float scaleMinsBitmap = height / (float) mMinutesPaint.getHeight();
float scaleMinBitmap = height / (float) mMinutePaint.getHeight();
float scaleSecondsBitmap = height / (float) mSecondsPaint.getHeight();
float scaleSecondBitmap = height / (float) mSecondPaint.getHeight();

mHoursPaint = Bitmap.createScaledBitmap(mHoursPaint,
(int) (mHoursPaint.getWidth() * scaleHoursBitmap),
(int) (mHoursPaint.getHeight() * scaleHoursBitmap), true);

mHourPaint = Bitmap.createScaledBitmap(mHourPaint,
(int) (mHourPaint.getWidth() * scaleHourBitmap),
(int) (mHourPaint.getHeight() * scaleHourBitmap), true);

mMinutesPaint = Bitmap.createScaledBitmap(mMinutesPaint,
(int) (mMinutesPaint.getWidth() * scaleMinsBitmap),
(int) (mMinutesPaint.getHeight() * scaleMinsBitmap), true);

mMinutePaint = Bitmap.createScaledBitmap(mMinutePaint,
(int) (mMinutePaint.getWidth() * scaleMinBitmap),
(int) (mMinutePaint.getHeight() * scaleMinBitmap), true);

mSecondsPaint = Bitmap.createScaledBitmap(mSecondsPaint,
(int) (mSecondsPaint.getWidth() * scaleSecondsBitmap),
(int) (mSecondsPaint.getHeight() * scaleSecondsBitmap), true);

mSecondPaint = Bitmap.createScaledBitmap(mSecondPaint,
(int) (mSecondPaint.getWidth() * scaleSecondBitmap),
(int) (mSecondPaint.getHeight() * scaleSecondBitmap), true);


/* Scale loaded background image (more efficient) if surface dimensions change. */
float scale = ((float) width) / (float) mBackgroundBitmap.getWidth();

mBackgroundBitmap = Bitmap.createScaledBitmap(mBackgroundBitmap,
(int) (mBackgroundBitmap.getWidth() * scale),
(int) (mBackgroundBitmap.getHeight() * scale), true);

/*
* Create a gray version of the image only if it will look nice on the device in
* ambient mode. That means we don't want devices that support burn-in
* protection (slight movements in pixels, not great for images going all the way to
* edges) and low ambient mode (degrades image quality).
*
* Also, if your watch face will know about all images ahead of time (users aren't
* selecting their own photos for the watch face), it will be more
* efficient to create a black/white version (png, etc.) and load that when you need it.
*/
if (!mBurnInProtection && !mLowBitAmbient) {
//initGrayBackgroundBitmap();
}
}

private void initGrayBackgroundBitmap() {
mGrayBackgroundBitmap = Bitmap.createBitmap(
mBackgroundBitmap.getWidth(),
mBackgroundBitmap.getHeight(),
Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(mGrayBackgroundBitmap);
Paint grayPaint = new Paint();
ColorMatrix colorMatrix = new ColorMatrix();
colorMatrix.setSaturation(0);
ColorMatrixColorFilter filter = new ColorMatrixColorFilter(colorMatrix);
grayPaint.setColorFilter(filter);
canvas.drawBitmap(mBackgroundBitmap, 0, 0, grayPaint);
}

/**
* Captures tap event (and tap type). The {@link WatchFaceService#TAP_TYPE_TAP} case can be
* used for implementing specific logic to handle the gesture.
*/
[USER=1021285]@override[/USER]
public void onTapCommand(int tapType, int x, int y, long eventTime) {
switch (tapType) {
case TAP_TYPE_TOUCH:
// The user has started touching the screen.
break;
case TAP_TYPE_TOUCH_CANCEL:
// The user has started a different gesture or otherwise cancelled the tap.
break;
case TAP_TYPE_TAP:
// The user has completed the tap gesture.
// TODO: Add code to handle the tap gesture.
/*Toast.makeText(getApplicationContext(), R.string.message, Toast.LENGTH_SHORT)
.show();*/
break;
}
invalidate();
}

[USER=1021285]@override[/USER]
public void onDraw(Canvas canvas, Rect bounds) {
long now = System.currentTimeMillis();
mCalendar.setTimeInMillis(now);

drawBackground(canvas);
drawWatchFace(canvas);
}

private void drawBackground(Canvas canvas) {

/* if ((mLowBitAmbient || mBurnInProtection)) {
canvas.drawColor(Color.BLACK);
} else {
canvas.drawBitmap(mBackgroundBitmap, 0, 0, mBackgroundPaint);
}*/

canvas.drawBitmap(mBackgroundBitmap, 0,0, mBackgroundPaint);
}

private void drawWatchFace(Canvas canvas) {



/*
* These calculations reflect the rotation in degrees per unit of time, e.g.,
* 360 / 60 = 6 and 360 / 12 = 30.
*/

final float secondss =
(mCalendar.get(Calendar.SECOND) + mCalendar.get(Calendar.MILLISECOND) / 1000f);
final float secondssRotation = secondss * 6f;

final float seconds =
(mCalendar.get(Calendar.SECOND) + mCalendar.get(Calendar.MILLISECOND) / 1000f);
final float secondsRotation = seconds * 6f;

final float minutessRotation = mCalendar.get(Calendar.MINUTE) * 6f;

final float minutesRotation = mCalendar.get(Calendar.MINUTE) * 6f;

final float hourHandsOffset = mCalendar.get(Calendar.MINUTE) / 2f;
final float hourssRotation = (mCalendar.get(Calendar.HOUR) * 30) + hourHandsOffset;

final float hourHandOffset = mCalendar.get(Calendar.MINUTE) / 2f;
final float hoursRotation = (mCalendar.get(Calendar.HOUR) * 30) + hourHandOffset;

/*
* Save the canvas state before we can begin to rotate it.
*/
canvas.save();


canvas.rotate(hourssRotation, mCenterX, mCenterY);
canvas.drawBitmap(mHoursPaint, 0,0, paint);

// canvas.rotate(hoursRotation, mCenterX, mCenterY);
canvas.drawBitmap(mHourPaint, 0,0, paint);

canvas.rotate(minutessRotation-hourssRotation,mCenterX, mCenterY);
canvas.drawBitmap(mMinutesPaint, 0,0, paint);

// canvas.rotate(minutesRotation-hoursRotation,mCenterX, mCenterY);
canvas.drawBitmap(mMinutePaint, 0,0 , paint);

canvas.rotate(secondssRotation-minutessRotation, mCenterX, mCenterY);
canvas.drawBitmap(mSecondsPaint, 0, 0, paint);

// canvas.rotate(secondsRotation-minutesRotation, mCenterX, mCenterY);
canvas.drawBitmap(mSecondPaint, 0, 0 , paint);


canvas.restore();
}

[USER=1021285]@override[/USER]
public void onVisibilityChanged(boolean visible) {
super.onVisibilityChanged(visible);

if (visible) {
registerReceiver();
/* Update time zone in case it changed while we weren't visible. */
mCalendar.setTimeZone(TimeZone.getDefault());
invalidate();
} else {
unregisterReceiver();
}

/* Check and trigger whether or not timer should be running (only in active mode). */
updateTimer();
}

private void registerReceiver() {
if (mRegisteredTimeZoneReceiver) {
return;
}
mRegisteredTimeZoneReceiver = true;
IntentFilter filter = new IntentFilter(Intent.ACTION_TIMEZONE_CHANGED);
MyWatchFace.this.registerReceiver(mTimeZoneReceiver, filter);
}

private void unregisterReceiver() {
if (!mRegisteredTimeZoneReceiver) {
return;
}
mRegisteredTimeZoneReceiver = false;
MyWatchFace.this.unregisterReceiver(mTimeZoneReceiver);
}

/**
* Starts/stops the {@link #mUpdateTimeHandler} timer based on the state of the watch face.
*/
private void updateTimer() {
mUpdateTimeHandler.removeMessages(MSG_UPDATE_TIME);
if (shouldTimerBeRunning()) {
mUpdateTimeHandler.sendEmptyMessage(MSG_UPDATE_TIME);
}
}

/**
* Returns whether the {@link #mUpdateTimeHandler} timer should be running. The timer
* should only run in active mode.
*/
private boolean shouldTimerBeRunning() {
return isVisible();
}

/**
* Handle updating the time periodically in interactive mode.
*/
private void handleUpdateTimeMessage() {
invalidate();
if (shouldTimerBeRunning()) {
long timeMs = System.currentTimeMillis();
long delayMs = INTERACTIVE_UPDATE_RATE_MS
- (timeMs % INTERACTIVE_UPDATE_RATE_MS);
mUpdateTimeHandler.sendEmptyMessageDelayed(MSG_UPDATE_TIME, delayMs);
}
}
}





}

.................................................................................

Thank you in advance for your help!

How Do I Rotate Shadows Offset from Center Wear OS Project

I have an Android Wear OS watch project. It has 3 watch hands(.png) and 3 watch hand shadows(.png) images.

It all works except I need to define an offset center point for the shadow images, and for that center point to be fixed.

I need each of the shadows to have a seperate center point.

When I try to move their center, the center point moves in orbit around mCenterX & mCenterY.

The mHoursPaint, mMinutesPaint and mSecondsPaint are the Hand shadow images.
The mHourPaint, nMinutePaint and mSecondPaint are main Hand images.
The mHourmPaint, mMinutemPaint and mSecondmPaint are for markers on hands.

Here is the code for the MyWatchFace.java:

..........................................................................................

Java:
private void drawWatchFace(Canvas canvas) {

       final float seconds =
               (mCalendar.get(Calendar.SECOND) + mCalendar.get(Calendar.MILLISECOND) / 1000f);
       final float secondsRotation = seconds * 6f;

       final float minutesRotation = mCalendar.get(Calendar.MINUTE) * 6f;

       final float hourHandOffset = mCalendar.get(Calendar.MINUTE) / 2f;
       final float hoursRotation = (mCalendar.get(Calendar.HOUR) * 30) + hourHandOffset;

       canvas.save();

       canvas.rotate(hoursRotation, mCenterX, mCenterY);
       canvas.drawBitmap(mHoursPaint,  4,4,  paint);
       canvas.drawBitmap(mHourPaint,  0,0,  paint);
       canvas.drawBitmap(mHourmPaint,  0,0,  paint);

       canvas.rotate(minutesRotation-hoursRotation,mCenterX, mCenterY);
       canvas.drawBitmap(mMinutesPaint,  6,6,  paint);
       canvas.drawBitmap(mMinutePaint,  0,0 ,  paint);
       canvas.drawBitmap(mMinutemPaint,  0,0 ,  paint);

       canvas.rotate(secondsRotation-minutesRotation, mCenterX, mCenterY);
       canvas.drawBitmap(mSecondsPaint,  8, 8, paint);
       canvas.drawBitmap(mSecondPaint,  0, 0 , paint);
       canvas.drawBitmap(mSecondmPaint,  0, 0 , paint);


       canvas.restore();

.................................................................................

Thank you in advance for your help!

Google Pay Android Tipping

I've followed this google pay android tutorial: https://developers.google.com/pay/api/android/guides/tutorial#java and I'm confused af. I've got the user credit card data in a tokenized form, great, and now what? Why is there no tutorials online that explain setting up google pay from start to finish?

I want users to be able to pay whatever they like in-app, like a tipping system.

Anyone have any solid resources on this use case?

Thanks a bunch!

Convert a website into an app?

Ok, I do have some elementary programming experience. A while back, I did download android studio and created an app that just browses to one website. I still use it regularly. But, using android studio everytime I want to make a bookmark is a pain. Most bookmarks, I want them to work like an app so I can sort it in the app drawer instead of on the home screen or in chrome bookmarks.

Is there a free android app I can download and I enter in a url and it spits out an apk file?

What Smartwatch to buy?

Hi,

I want to buy my first Smartwatch for Christmas and it is very difficult to decide for a model.

On the one hand there is the Samsung Galaxy Watch 3:
+ It is very well made
+ The control with the ring seems to be nice
- Tizen
- Old CPU

On the other hand we have the Mobvoi TicWatch Pro 3:
+ Newest available CPU
+ Wear OS
+ Long Battery Life
- No stainless steel body
- Control only via Touchscreen

The price of both models is nearly the same here in Germany.
I don't need much of the fitness features, I just want to have a Watch with the possibility to get all notifications I want and to answer a message or to answer the phone from time to time.

At the moment there are no new Smartwatches with the new 4100 or 4100+ on the horizon?

Does anybody knows about new Watches?

Android 11 stable update rolling out for Global S20's

Samsung have just released the stable update for Android 11 and UI 3.0 for the global Galaxy S20 range, not the S20 FE as beta is only just starting to begin for that model.

It is a FOTA, (Firmware Over The Air), update and you should check... Settings > Software update... to see if it has arrived for you.

Be advised, it may take a little longer to arrive on some carrier branded models.

The update = G98*BXXU5CTKG

Download size = 179.82MB

Build date = 21st November 2020

DOWNLOAD

AwO0Htlh.jpg


One UI version = 3.0

Camera version = 11.0.00.91

Android Security patch = December 2020

This is the 17th stable update in 264 days = 1 update every 16 days on average (not including 6 Beta updates)

  • Poll Poll
Apps unable to add rewarded Video Add.

unable to add rewarded Video Add.

  • 1

    Votes: 0 0.0%
  • 2

    Votes: 0 0.0%

Dear Sir kindly help me how can i add video rewarded add in following code?
i wants to appear video ads without earning points system.
thanks

Code:
import android.media.AudioAttributes;
import android.media.AudioManager;
import android.media.SoundPool;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;

import androidx.appcompat.app.AppCompatActivity;

import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdSize;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.InterstitialAd;
import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.initialization.InitializationStatus;
import com.google.android.gms.ads.initialization.OnInitializationCompleteListener;


public class Activity2 extends AppCompatActivity {
    private SoundPool soundPool;
    private InterstitialAd mInterstitialAd;
    private AdView mAdView2;
    private int  sound1, sound2, soundd2, sound3, sound4, sound5, sound6, sound7, sound8, sound9,
            sound10, sound11, sound12, sound13, sound14, sound15, sound16, sound17, sound18,
            sound19, sound20, sound21, sound22, sound23, sound24, sound25, sound26, sound27,
            sound28, sound29, sound30, sound31, sound32, sound33, sound34, sound35, sound36, sound37,
            sound38, sound39, sound40, sound41, sound42, sound43, sound44, sound45, sound46, sound47,
            sound48, sound49, sound50, sound51, sound52;
    private int sound3StreamId;


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

        mInterstitialAd = new InterstitialAd(this);
        mInterstitialAd.setAdUnitId("ca-app-pub-1195149240883996/7961464547");
        mInterstitialAd.loadAd(new AdRequest.Builder().build());

        AdView adView = new AdView(this);

        adView.setAdSize(AdSize.BANNER);

        adView.setAdUnitId("ca-app-pub-1195149240883996/6476126518");

        MobileAds.initialize(this, new OnInitializationCompleteListener() {
            @Override
            public void onInitializationComplete(InitializationStatus initializationStatus) {
            }
        });


        mAdView2 = findViewById(R.id.mAdView2);
        AdRequest adRequest = new AdRequest.Builder().build();

        mAdView2.loadAd(adRequest);

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            AudioAttributes audioAttributes = new AudioAttributes.Builder()
                    .setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION)
                    .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
                    .build();

            soundPool = new SoundPool.Builder()
                    .setMaxStreams(1)
                    .setAudioAttributes(audioAttributes)
                    .build();
        } else {
            soundPool = new SoundPool(1, AudioManager.STREAM_MUSIC, 0);
        }


        sound1 = soundPool.load(this, R.raw.sound1, 1);
        sound2 = soundPool.load(this, R.raw.sound2, 1);
        soundd2 = soundPool.load(this, R.raw.soundd2, 1);
        sound3 = soundPool.load(this, R.raw.sound3, 1);
        sound4 = soundPool.load(this, R.raw.sound4, 1);
        sound5 = soundPool.load(this, R.raw.sound5, 1);
        sound6 = soundPool.load(this, R.raw.sound6, 1);
        sound7 = soundPool.load(this, R.raw.sound7, 1);
        sound8 = soundPool.load(this, R.raw.sound8, 1);
        sound9 = soundPool.load(this, R.raw.sound9, 1);
        sound10 = soundPool.load(this, R.raw.sound10, 1);
        sound11 = soundPool.load(this, R.raw.sound11, 1);
        sound12 = soundPool.load(this, R.raw.sound12, 1);
        sound13 = soundPool.load(this, R.raw.sound13, 1);
        sound14 = soundPool.load(this, R.raw.sound14, 1);
        sound15 = soundPool.load(this, R.raw.sound15, 1);
        sound16 = soundPool.load(this, R.raw.sound16, 1);
        sound17 = soundPool.load(this, R.raw.sound17, 1);
        sound18 = soundPool.load(this, R.raw.sound18, 1);
        sound19 = soundPool.load(this, R.raw.sound19, 1);
        sound20 = soundPool.load(this, R.raw.sound20, 1);
        sound21 = soundPool.load(this, R.raw.sound21, 1);
        sound22 = soundPool.load(this, R.raw.sound22, 1);
        sound23 = soundPool.load(this, R.raw.sound23, 1);
        sound24 = soundPool.load(this, R.raw.sound24, 1);
        sound25 = soundPool.load(this, R.raw.sound25, 1);
        sound26 = soundPool.load(this, R.raw.sound26, 1);
        sound27 = soundPool.load(this, R.raw.sound27, 1);
        sound28 = soundPool.load(this, R.raw.sound28, 1);
        sound29 = soundPool.load(this, R.raw.sound29, 1);
        sound30 = soundPool.load(this, R.raw.sound30, 1);
        sound31 = soundPool.load(this, R.raw.sound31, 1);
        sound32 = soundPool.load(this, R.raw.sound32, 1);
        sound33 = soundPool.load(this, R.raw.sound33, 1);
        sound34 = soundPool.load(this, R.raw.sound34, 1);
        sound35 = soundPool.load(this, R.raw.sound35, 1);
        sound36 = soundPool.load(this, R.raw.sound36, 1);
        sound37 = soundPool.load(this, R.raw.sound37, 1);
        sound38 = soundPool.load(this, R.raw.sound38, 1);
        sound39 = soundPool.load(this, R.raw.sound39, 1);
        sound40 = soundPool.load(this, R.raw.sound40, 1);
        sound41 = soundPool.load(this, R.raw.sound41, 1);
        sound42 = soundPool.load(this, R.raw.sound42, 1);
        sound43 = soundPool.load(this, R.raw.sound43, 1);
        sound44 = soundPool.load(this, R.raw.sound44, 1);
        sound45 = soundPool.load(this, R.raw.sound45, 1);
        sound46 = soundPool.load(this, R.raw.sound46, 1);
        sound47 = soundPool.load(this, R.raw.sound47, 1);
        sound48 = soundPool.load(this, R.raw.sound48, 1);
        sound49 = soundPool.load(this, R.raw.sound49, 1);
        sound50 = soundPool.load(this, R.raw.sound50, 1);
        sound51 = soundPool.load(this, R.raw.sound51, 1);
        sound52 = soundPool.load(this, R.raw.sound52, 1);
    }

    public void playSound(View v){

        ImageView im=(ImageView)findViewById(R.id.imageView1);





        switch (v.getId()) {


            case R.id.button_sounds2:
            im.setImageResource(R.drawable.image1);
            soundPool.play(sound2, 1, 1, 0, 0, 1);
            //soundPool.pause(sound3StreamId);
            soundPool.autoPause();
            break;

            case R.id.button_sound1:
                im.setImageResource(R.drawable.image1);
                soundPool.play(sound1, 1, 1, 0, 0, 1);
                //soundPool.pause(sound3StreamId);
                soundPool.autoPause();
                break;

            case R.id.button_sound2:
                im.setImageResource(R.drawable.image2);
                soundPool.play(soundd2, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound3:
                im.setImageResource(R.drawable.image3);
                sound3StreamId = soundPool.play(sound3, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound4:
                im.setImageResource(R.drawable.image4);
                soundPool.play(sound4, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound5:
                im.setImageResource(R.drawable.image5);
                soundPool.play(sound5, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound6:
                im.setImageResource(R.drawable.image6);
                soundPool.play(sound6, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound7:
                im.setImageResource(R.drawable.image7);
                soundPool.play(sound7, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound8:
                im.setImageResource(R.drawable.image8);
                soundPool.play(sound8, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound9:
                if (mInterstitialAd.isLoaded()) {
                    mInterstitialAd.show();
                } else {
                im.setImageResource(R.drawable.image88);
                soundPool.play(sound9, 1, 1, 0, 0, 1);}
                break;
            case R.id.button_sound10:
                im.setImageResource(R.drawable.image9);
                soundPool.play(sound10, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound11:
                im.setImageResource(R.drawable.image10);
                soundPool.play(sound11, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound12:
                im.setImageResource(R.drawable.image11);
                soundPool.play(sound12, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound13:
                im.setImageResource(R.drawable.image12);
                soundPool.play(sound13, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound14:
                im.setImageResource(R.drawable.image13);
                soundPool.play(sound14, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound15:
                im.setImageResource(R.drawable.image14);
                soundPool.play(sound15, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound16:
                im.setImageResource(R.drawable.image15);
                soundPool.play(sound16, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound17:
                im.setImageResource(R.drawable.image16);
                soundPool.play(sound17, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound18:
                if (mInterstitialAd.isLoaded()) {
                    mInterstitialAd.show();
                } else {
                im.setImageResource(R.drawable.image17);
                soundPool.play(sound18, 1, 1, 0, 0, 1);}
                break;
            case R.id.button_sound19:
                im.setImageResource(R.drawable.image18);
                soundPool.play(sound19, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound20:
                im.setImageResource(R.drawable.image19);
                soundPool.play(sound20, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound21:
                im.setImageResource(R.drawable.image20);
                soundPool.play(sound21, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound22:
                im.setImageResource(R.drawable.image21);
                soundPool.play(sound22, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound23:
                im.setImageResource(R.drawable.image22);
                soundPool.play(sound23, 1, 1, 0, 0, 1);
                break;

            case R.id.button_sound24:
                im.setImageResource(R.drawable.image24);
                soundPool.play(sound24, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound25:
                im.setImageResource(R.drawable.image25);
                soundPool.play(sound25, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound26:
                if (mInterstitialAd.isLoaded()) {
                    mInterstitialAd.show();
                } else {
                im.setImageResource(R.drawable.image26);
                soundPool.play(sound26, 1, 1, 0, 0, 1);}
                break;
            case R.id.button_sound27:
                im.setImageResource(R.drawable.image27);
                soundPool.play(sound27, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound28:
                im.setImageResource(R.drawable.image28);
                soundPool.play(sound28, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound29:
                im.setImageResource(R.drawable.image29);
                soundPool.play(sound29, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound30:
                im.setImageResource(R.drawable.image30);
                soundPool.play(sound30, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound31:
                im.setImageResource(R.drawable.image31);
                soundPool.play(sound31, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound32:
                im.setImageResource(R.drawable.image32);
                soundPool.play(sound32, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound33:
                im.setImageResource(R.drawable.image33);
                soundPool.play(sound33, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound34:
                im.setImageResource(R.drawable.image34);
                soundPool.play(sound34, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound35:
                im.setImageResource(R.drawable.image35);
                soundPool.play(sound35, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound36:
                if (mInterstitialAd.isLoaded()) {
                    mInterstitialAd.show();
                } else {
                im.setImageResource(R.drawable.image37);
                soundPool.play(sound36, 1, 1, 0, 0, 1);}
                break;
            case R.id.button_sound37:
                im.setImageResource(R.drawable.image36);
                soundPool.play(sound37, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound38:
                im.setImageResource(R.drawable.image38);
                soundPool.play(sound38, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound39:
                im.setImageResource(R.drawable.image39);
                soundPool.play(sound39, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound40:
                im.setImageResource(R.drawable.image40);
                soundPool.play(sound40, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound41:
                im.setImageResource(R.drawable.image41);
                soundPool.play(sound41, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound42:
                im.setImageResource(R.drawable.image42);
                soundPool.play(sound42, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound43:
                im.setImageResource(R.drawable.image43);
                soundPool.play(sound43, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound44:
                if (mInterstitialAd.isLoaded()) {
                    mInterstitialAd.show();
                } else {
                im.setImageResource(R.drawable.image44);
                soundPool.play(sound44, 1, 1, 0, 0, 1);}
                break;
            case R.id.button_sound45:
                im.setImageResource(R.drawable.image45);
                soundPool.play(sound45, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound46:
                im.setImageResource(R.drawable.image46);
                soundPool.play(sound46, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound47:
                im.setImageResource(R.drawable.image47);
                soundPool.play(sound47, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound48:
                im.setImageResource(R.drawable.image48);
                soundPool.play(sound48, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound49:
                im.setImageResource(R.drawable.image49);
                soundPool.play(sound49, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound50:
                im.setImageResource(R.drawable.image50);
                soundPool.play(sound50, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound51:
                im.setImageResource(R.drawable.image51);
                soundPool.play(sound51, 1, 1, 0, 0, 1);
                break;
            case R.id.button_sound52:
                if (mInterstitialAd.isLoaded()) {
                    mInterstitialAd.show();
                } else {
                im.setImageResource(R.drawable.image52);
                soundPool.play(sound52, 1, 1, 0, 0, 1);}
                break;
        }

        mInterstitialAd.setAdListener(new AdListener() {
            @Override
            public void onAdClosed() {
                // Load the next interstitial.
                mInterstitialAd.loadAd(new AdRequest.Builder().build());
            }

        });

    }



    @Override
    protected void onDestroy() {
        super.onDestroy();
        soundPool.release();
        soundPool = null;
    }

}

Adaway causing trouble in amazon app

I am rooted via Magisk in my oneplus 5T running stock oxygen OS 10

I am using adaway 5.1.0. It is causing issues in usage of Amazon shopping app. I copied the following urls in a text file and added it to my host sources for adaway and chose 'apply allowed hosts'. But I'm still facing problems in amazon with the typical error of 'Uh Oh Something Went Wrong' with a photo of dog. I have to pause my adaway to use amazon flawlessly. Please advise a permanent solution.

aan.amazon.com
aax-us-iad.amazon.com
device-metrics-us.amazon.com
device-metrics-us-2.amazon.com
fls-na.amazon.com
mads.amazon.com
aax.amazon-adsystem.com
aax-us.amazon-adsystem.com
aax-us-east.amazon-adsystem.com
c.amazon-adsystem.com
mads.amazon-adsystem.com
s.amazon-adsystem.com
aan.amazon.in
aax-us-iad.amazon.in
device-metrics-us.amazon.in
device-metrics-us-2.amazon.in
fls-na.amazon.in
mads.amazon.in
aax.amazon-adsystem.in
aax-us.amazon-adsystem.in
aax-us-east.amazon-adsystem.in
c.amazon-adsystem.in
mads.amazon-adsystem.in
s.amazon-adsystem.in




*aan.amazon.com
*aax-us-iad.amazon.com
*device-metrics-us.amazon.com
*device-metrics-us-2.amazon.com
*fls-na.amazon.com
*mads.amazon.com
*aax.amazon-adsystem.com
*aax-us.amazon-adsystem.com
*aax-us-east.amazon-adsystem.com
*c.amazon-adsystem.com
*mads.amazon-adsystem.com
*s.amazon-adsystem.com
*aan.amazon.in
*aax-us-iad.amazon.in
*device-metrics-us.amazon.in
*device-metrics-us-2.amazon.in
*fls-na.amazon.in
*mads.amazon.in
*aax.amazon-adsystem.in
*aax-us.amazon-adsystem.in
*aax-us-east.amazon-adsystem.in
*c.amazon-adsystem.in
*mads.amazon-adsystem.in
*s.amazon-adsystem.in

Filter

Back
Top Bottom