How to display rolling updates on Android and iOS - android

I have a requirement to display the different stages of a Process in a dialog box overlay on the mobile app such as "Process 1 started" "Process 1 completed" "Process 2 started" and so on until the process is completed.
Essentially, what I'm looking for is scrollable text in an overlay screen appearing as the app receives different notifications(BLE characteristics). No user interaction required. Is there an out-of-the-box dialog box control that I can use? Any other suggestions for such a display?

U can add the DialogFragment and
if(process1.isDone())
{
informationOnDialogFragment
}
if(process2.isDone())
...
But the easiest way is add ProgressDialog
U can set message to ProgressDialog

You can achieve it using simple toast or other innovative libraries like:
1. EFInternetIndicator
2. FTIndicator

You can use Progress Dialog . With progress.setCancelable(false); you can make it so the user can`t navigate away from the dialog.

Related

I have used advanced_in_app_review plugin, but rating dialog not popup

I have used advanced_in_app_review plugin, but rating dialog not popup
void initState() {
super.initState();
//initPlatformState(),
AdvancedInAppReview()
.setMinDaysBeforeRemind(7)
.setMinDaysAfterInstall(2)
.setMinLaunchTimes(2)
.monitor();
}
I removed initPlatformState() because it is useless.
now it seems that rating dialog not showing automatically, Should I add initPlatformState()?
or is it the issue of this plugin?
https://github.com/eeoom/advanced_in_app_review/issues/2
Using the cascade operator when calling multiple methods on one object is safer:
AdvancedInAppReview()
..setMinDaysBeforeRemind(7)
..setMinDaysAfterInstall(2)
..setMinLaunchTimes(2)
..monitor();
It is okay to remove initPlatformState().
It's not an issue of plugin.
In app reviews do not show up every time. The operating system decides when the alert is shown. The parameters of the plug in indicate only the minimum values before the system is asked to show the dialog, but as I said, the system decides afterwards if the dialog is shown.
Please note also that it is not shown in debug mode of android.

AlertDialog displays briefly and disappears

I have an android app written with Xamarin which needs to notify from a class that does not have good access to an activity or context, so I am using a System Alert dialog to display the message.
In Android 4.4, the pop-up appears and the user must tap the OK button to clear it. The rest of the screen is dim and the user cannot interact with any other UI elements until the pop-up is cleared. This is the desired behavior.
In Android 5.0 (tested on a Galaxy S6 and a tablet), the pop-up will appear for about one second and then disappear without requiring any interaction whatsoever. I have done a number of Google and SO searches to no avail.
private static void ShowSystemAlert(Context context, string message)
{
var dialog = new AlertDialog.Builder(context, Android.Resource.Style.ThemeHoloLightDialog)
.SetNeutralButton("OK", (alertSender, args) => {})
.SetMessage(message)
.Create();
dialog.SetCanceledOnTouchOutside(false);
dialog.Window.SetType(WindowManagerTypes.SystemAlert);
dialog.Show();
dialog.Window.DecorView.SetBackgroundResource(Android.Resource.Color.Transparent); //remove strange small border around dialog
}
How can I get the pop-up to work like it does in Android 4.4? The best answer will work in Lollipop, Marshmallow, and Nougat.
I would also very much appreciate an explanation as to why this happened, or any background information you can give. Thanks!
Is it xamarin? Create your alertdialog with just the context, don't use the theme.

How to create pop up in phone gap

Helo,
Is there a possibility to click on button and show a popupover and inside it there is two buttons. When i click on each of them , i have an alert.
If there isn't a possibility with a popupover is there a possibilty of any other popup window?
My Android application is developped in phonegap
Thanks a lot
Take a look at the cordova dialogue api.
https://github.com/apache/cordova-plugin-dialogs/blob/master/doc/index.md
I think you are looking for the navigator.notification.confirm feature.
Using this feature you can display a popup with multiple options for the user to tap on.
The index of the button the user taps on is returned to the confirmCallback, so you can handle the user input.
navigator.notification.confirm(message, onConfirm, [button1], [button2]);
function onConfirm(buttonIndex) {
alert('You selected button ' + buttonIndex);
}
perform operations based on buttonIndex.

Recent Apps on UiAutomator

I am now working with Android UiAutomator on for UI Test on my Android app. My app has a function that requires the user to verify the email to continue, so I try to do it like this: after reach to that function -> getUiDevice.pressHome -> Browser -> try to log in email -> PressHome again -> Press RecentApps then I stuck here, I cannot press on my Apps to return to it again. I try another way by clicking on my App icon but it starts my app again, not at the state before. Can anyone suggest me a solution for this? Any help is appreciate.
Thanks in advance.
Try this :
UiObject appBackground = new UiObject(new UiSelector().description("ABC"));
appBackground.click();
It did not show any description through 'uiautomatorviewer' command but this worked for me.
I could manage to create this behavior with:
fun backgroundAndForeground() {
val device = UiDevice.getInstance(getInstrumentation())
device.pressHome()
// Pressing app switch two times makes the last app put on background come to foreground.
device.pressKeyCode(KeyEvent.KEYCODE_APP_SWITCH)
device.pressKeyCode(KeyEvent.KEYCODE_APP_SWITCH)
}
In this case, I think that android only resume app when clicking the recent app image. It does not work on clicking display text or app icon. So, we need to click image of your app in recent app list. At that time you need to write as below. I always do that for similar case.
// Take all image view by class type and click by instance no.
new UiObject(new UiSelector().className("android.widget.ImageView").instance(3)).click();
You need to count instance no of your recent app image view. Not app icon image in recent app scroll view. Please try this. Thanks.
I've spent half a day on this and concluded I needed to issue a device.click(). Since my use-case is that my app was the last one running (not switching to the browser like you), I can safely click the middle of the screen and it'll always work.
If you're the 2nd to last running app, you can probably do x: 0 and y: device.displayHeight/2.
I've not tested this on many operating systems, only 9.

Android pop up spinning loader

I'm creating an android app where user loads some data from an online server when he hits a button
I need to add the following :
when user hits the button a pop-up screen shows on top of current screen & shows something like
"loading" "spinning loader" or anything like this
any thoughts ?
Have a look at this Android Developer page at the section "Creating a ProgressDialog". Android offers such a dialog out of the box.
You can try a function like showProgressDialog(Activity activity)with this context:
if ((mySpinnerDialog== null) || (!mySpinnerDialog.isShowing())) {
mySpinnerDialog= new Dialog(activity);
mySpinnerDialog.getWindow().getCurrentFocus();
mySpinnerDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
mySpinnerDialog.setContentView(R.layout.some_layout);
mySpinnerDialog.setCancelable(false);
mySpinnerDialog.setOwnerActivity(activity);
mySpinnerDialog.show();
} else {
mySpinnerDialog.setOwnerActivity(activity);
}
and dismiss this with mySpinnerDialog.dismiss();. Handle Illegalargumentexception on dismiss()

Categories

Resources