android-activity

How to Navigate between Android Specific Pages and Shared Pages in Xamarin.Forms?

半城伤御伤魂 提交于 2021-02-17 05:14:46
问题 I am trying to implement a camera overlay for my android app in Xamarin Forms. I am able to get my overlay to work for Android when I set my activity MainLauncher to True. How can I instead navigate to the activity page from my Xamarin.Forms shared code, and then later navigate back to the shared pages? My Android Activity: namespace CustomCamera.Droid { [Activity(Label = "CustomCamera", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges =

Request Permission from Application class [duplicate]

时光怂恿深爱的人放手 提交于 2021-02-16 16:09:43
问题 This question already has an answer here : Android: ActivityCompat.requestPermissions requires activity and not context :/ (1 answer) Closed 4 years ago . As per the new Android doc, In order to collect certain data, I need to request for permission. So I am doing this : @Override public void onCreate() { super.onCreate(); ... ... if (PermissionUtility.isPermitted(applicationContext, android.Manifest.permission.READ_SMS)) { userNumber = getUserPhoneNumber(); } else { ActivityCompat

Request Permission from Application class [duplicate]

蓝咒 提交于 2021-02-16 16:09:14
问题 This question already has an answer here : Android: ActivityCompat.requestPermissions requires activity and not context :/ (1 answer) Closed 4 years ago . As per the new Android doc, In order to collect certain data, I need to request for permission. So I am doing this : @Override public void onCreate() { super.onCreate(); ... ... if (PermissionUtility.isPermitted(applicationContext, android.Manifest.permission.READ_SMS)) { userNumber = getUserPhoneNumber(); } else { ActivityCompat

Request Permission from Application class [duplicate]

ε祈祈猫儿з 提交于 2021-02-16 16:08:37
问题 This question already has an answer here : Android: ActivityCompat.requestPermissions requires activity and not context :/ (1 answer) Closed 4 years ago . As per the new Android doc, In order to collect certain data, I need to request for permission. So I am doing this : @Override public void onCreate() { super.onCreate(); ... ... if (PermissionUtility.isPermitted(applicationContext, android.Manifest.permission.READ_SMS)) { userNumber = getUserPhoneNumber(); } else { ActivityCompat

Request Permission from Application class [duplicate]

夙愿已清 提交于 2021-02-16 16:08:27
问题 This question already has an answer here : Android: ActivityCompat.requestPermissions requires activity and not context :/ (1 answer) Closed 4 years ago . As per the new Android doc, In order to collect certain data, I need to request for permission. So I am doing this : @Override public void onCreate() { super.onCreate(); ... ... if (PermissionUtility.isPermitted(applicationContext, android.Manifest.permission.READ_SMS)) { userNumber = getUserPhoneNumber(); } else { ActivityCompat

Calling function from another activity

五迷三道 提交于 2021-02-16 13:35:27
问题 I have an activity that contains all the functions for controlling my database, and I want all other activities to use to these functions when interacting with the database. Below is an example of my problem. Clock script: public class Clock extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_clock); Data.createTable(); //<<< } //... } Data script: public class Data extends Activity {

Android send Data from fragment to Activity

笑着哭i 提交于 2021-02-11 15:57:38
问题 I'm working on an Android app, I get some datas in a fragment and I want to use them in an other fragment. So I was looking to create a bundle, get it in the activity with a simple getBasicInfos() method that return my bundle then send it to my other fragment. But the problem is I can't use this method in my activity. fragment = new DashboardFragment(); fragment.getBasicInfos(); //Does not recognize the method toolbar.setTitle(getResources().getString(R.string.dashboard)); break; I want to

App showing “Display in this area” while opening

北战南征 提交于 2021-02-11 15:31:36
问题 I am facing little problem in my android app. When i open my android app in new notched android devices, There is a blank space at bottom of the app displaying the text " Display in this area " as shown in the screenshot. Here is main xml <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:background="#fffafafa" android:fitsSystemWindows="true" android:scrollbars="none

how can I sync second screen and make it clickable?

那年仲夏 提交于 2021-02-11 15:12:34
问题 I am making an app for a dual display device for 1:1, face to face consulting. Basically, the secondary screen is not clickable. So, what I need to do is implementing a presentation. But some activities are sharable screen. So, it must be clickable in both screens. By default, the second screen is not clickable, but the second monitor displays the same screen. For making it clickable, I need to implement the presentation class for it. However, it will take a lot of times to implement it. So,

how can I sync second screen and make it clickable?

跟風遠走 提交于 2021-02-11 15:11:47
问题 I am making an app for a dual display device for 1:1, face to face consulting. Basically, the secondary screen is not clickable. So, what I need to do is implementing a presentation. But some activities are sharable screen. So, it must be clickable in both screens. By default, the second screen is not clickable, but the second monitor displays the same screen. For making it clickable, I need to implement the presentation class for it. However, it will take a lot of times to implement it. So,