Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
correccion al mostrar informacion de el widget
Browse files Browse the repository at this point in the history
  • Loading branch information
esalessandrxx committed Oct 6, 2023
1 parent 2dca355 commit 3b4f56c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import java.util.Date;
import java.util.Locale;

@RequiresApi(29)
@RequiresApi(28)
public class BalancesBroadcast extends BroadcastReceiver {

private UssdUtils ussd;
Expand All @@ -45,7 +45,8 @@ public class BalancesBroadcast extends BroadcastReceiver {

private static final String CHANNEL_ID = "Balances";
private static final String CHANNEL = "Update balances";


@RequiresApi(28)
@Override
public void onReceive(Context context, Intent intent) {

Expand Down
5 changes: 5 additions & 0 deletions app/src/main/java/com/arr/simple/widget/WidgetBalances.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import android.widget.RemoteViews;
import android.widget.Toast;

import androidx.annotation.RequiresApi;
import androidx.core.content.ContextCompat;

import androidx.preference.PreferenceManager;
Expand All @@ -23,6 +24,7 @@
import com.arr.ussd.ResponseUssd;
import com.arr.ussd.utils.UssdUtils;

@RequiresApi(28)
public class WidgetBalances extends AppWidgetProvider {

private RemoteViews views;
Expand Down Expand Up @@ -80,6 +82,9 @@ public void run() {

//update to 5 seconds
handler.postDelayed(this, 5000);

/* actualizar vista del widget */
appWidgetManager.updateAppWidget(appWidgetId, views);
}
};
handler.post(runnable);
Expand Down

0 comments on commit 3b4f56c

Please sign in to comment.