S20 Plus "Apps stopped working"
- By Jaybee510
- Smartphones
- 0 Replies
After my S20 plus updated, it is slow in reacting and gives me APPS STOPPED WORKING all the time... Any idea as to the problem?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
public void querySkuDetailsAsync(@BillingClient.SkuType final String itemType, final List<String> skuList){
// Query the purchase async
SkuDetailsParams.Builder params = SkuDetailsParams.newBuilder();
params.setSkusList(skuList).setType(itemType);
mBillingClient.querySkuDetailsAsync(params.build(),
new SkuDetailsResponseListener() {
@Override
public void onSkuDetailsResponse(BillingResult response, List<SkuDetails> skuDetailsList) {
for (SkuDetails skuDetails : skuDetailsList) {
String Sku, Title, Description, Price;
Sku = skuDetails.getSku();
Title = skuDetails.getTitle();
Description = skuDetails.getDescription();
Price = skuDetails.getPrice();
MyIAPProduct.setSkuDetails(productsDetailsARR, getApplicationContext(), Sku, Title, Description, Price);
}
public static void setSkuDetails(ArrayList<MyIAPProduct> arr, Context cnt,
String Sku, String Title, String Description, String Price)
{
for(MyIAPProduct prod: arr){
if(Sku.equals(prod.m_Sku)) {
prod.setSkuDetails(cnt, Title, Description, Price);
}
}
}
public void setSkuDetails(Context cnt, String Title, String Description, String Price)
{
m_Title = Title;
m_Description = Description;
m_Price = Price;
saveToPreferences(cnt);
}
public void saveToPreferences(Context cnt){
SharedPreferences sharedPref = ((Activity) cnt).getPreferences(Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPref.edit();
editor.putBoolean(m_Sku + "Purchased", m_Purchased);
editor.putString(m_Sku + "Title", m_Title);
editor.putString(m_Sku + "Description", m_Description);
editor.putString(m_Sku + "Price", m_Price);
editor.commit();
}
SharedPreferences sharedPref = ((Activity) cnt).getPreferences(Context.MODE_PRIVATE);
void handlePurchases(List<Purchase> purchases) {
String str;
int numberOfPurchases = 0;
for(Purchase purchase:purchases) {
switch(purchase.getPurchaseState()) {
case Purchase.PurchaseState.PURCHASED:
if (!verifyValidSignature(purchase.getOriginalJson(), purchase.getSignature())) {
// Invalid purchase
// show error to user
Toast.makeText(getApplicationContext(), "Error : Invalid Purchase", Toast.LENGTH_SHORT).show();
return;
}
// else purchase is valid
//if item is purchased and not acknowledged
if (!purchase.isAcknowledged()) {
AcknowledgePurchaseParams acknowledgePurchaseParams =
AcknowledgePurchaseParams.newBuilder()
.setPurchaseToken(purchase.getPurchaseToken())
.build();
mBillingClient.acknowledgePurchase(acknowledgePurchaseParams, ackPurchase);
}
//else item is purchased and also acknowledged
else {
numberOfPurchases++;
// HOW DOES IT KNOW IF IT IS CONSUMED???
// DONT DELETE - if you want to keep on consuming
// ConsumeParams consumeParams = ConsumeParams.newBuilder()
// .setPurchaseToken(purchase.getPurchaseToken())
// .build();
//
//ConsumeResponseListener consumeResponseListener = new ConsumeResponseListener() {
// @Override
// public void onConsumeResponse(BillingResult billingResult, String purchaseToken) {
//
// Toast.makeText(DiamondsActivity.this, "Purchase successful", Toast.LENGTH_SHORT).show();
//
// if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK) {
//
// if (purchase.getSku().equalsIgnoreCase(ITEM_SKU_diamond_500)) {
// Toast.makeText(DiamondsActivity.this, "Thank you for purchasing!", Toast.LENGTH_SHORT).show();
// }
// }
// }
//};
//billingClient.consumeAsync(consumeParams, consumeResponseListener);
}
break;
case Purchase.PurchaseState.PENDING:
Toast.makeText(getApplicationContext(), "Purchase is Pending. Please complete Transaction", Toast.LENGTH_SHORT).show();
break;
case Purchase.PurchaseState.UNSPECIFIED_STATE:
Toast.makeText(getApplicationContext(), "Purchase Status Unknown", Toast.LENGTH_SHORT).show();
break;
}
}
}
@kendallkanderson I'm afraid we're not going to be able to offer you much help here. That appears to be an issue with the app so you'd need to contact the app's developer to get it sorted out.
I'd normally advise you to use the app's listing in the Play Store to find the developer's contact details but (surprise!) it doesn't look like that app is available on the Play Store. I agree with @mikedt here; it sounds like a scam to me.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="Menu"
android:textSize="50sp" />
<EditText
android:id="@+id/editTextTextMultiLine"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:gravity="start|top"
android:inputType="textMultiLine"
android:text="Select a layout type to view an example. The onClick atribute of each button will call a method which executes setContentView to load the new layout." />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>