- Uses GooglePlay API to declare an update as immediate / flexible
- No need of 3rd party store like Firebase Remote Config
- Shows a Floating Bubble for Flexible updates
- Closes app if Immediate update is ignored
- "Don't show again" for Flexible update
- Simple Plug-n-play
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"pet": { | |
"name": "Bella", | |
"breed": "German Shepherd", | |
"bcs": 5, | |
"gender": "Female", | |
"weight": 15.0, | |
"neuterStatus": "Neutered", | |
"activityLevel": "Active", | |
"dietPreference": "Mixed", |
This Gist guides you to implement In-App Updates from the Play Store in your Android app.
- RemoteConfig is used to fetch the minRequiredVersionCode (
Int
), shutdown (Boolean
), shutdownMessage (String
) - Latest version available on Play Store is fetched using Google Play App Update library
- Based on the above two inputs, update (if available) type is decided i.e. Immediate or Flexible
- In case of Immediate Update, Full Screen Update UI from Google Play App Update library is launched
- In case of Flexible Update, a simple dialog with choice (whether to update) is displayed.
- If agreed, Play Store page will be opened. (In app download progress is not shown)
- User can also ignore the update to avoid seeing it again and again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
public class ObjectClone { | |
static class A { | |
ArrayList<String> list; | |
public A(ArrayList<String> list) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.streamliners.myecom; | |
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.ViewGroup; | |
import androidx.annotation.NonNull; | |
import androidx.recyclerview.widget.RecyclerView; | |
import com.streamliners.myecom.databinding.ListItemBinding; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
N = int(input()) | |
A = [] | |
occ = {} | |
no_of_distinct = 0 | |
for i in range(0, N): | |
A.append(int(input())) | |
if not A[i] in occ: | |
occ[A[i]] = 1 | |
no_of_distinct += 1 |