Xamarin Azure Mobile Services App Permissions - azure

I have a quick question I am trying to find an answer for but failed.
I built a Xamarin android app using Azure Mobile Services (Offline sync etc) and all works perfectly in Android Emulator but after I distributed the app, generated the APK and installed it on my device, I am not getting any data.
I realise that it could be anything so I need to run logcat and check what is going on, therefore I am not asking for the solution to this but I have a quick question.
Do I need to grant any sort of permissions to the app as it is using
the internet on user's device?
In my manifest, I don't grant any permissions
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.company.pagesAndroid2" android:versionCode="1" android:versionName="1.0" android:installLocation="auto">
<uses-sdk android:minSdkVersion="15" />
<application android:label="#string/app_name" android:icon="#drawable/Icon" android:theme="#style/Theme.AppTheme"></application>
</manifest>
Thanks

Yes, you need to enable the INTERNET permission:
<uses-permission android:name="android.permission.INTERNET" />
The how-to page for Xamarin doesn't say so, but the page for Android does.

Related

DM101 Smart Watch Android Application - Issue with application not filling the screen

When I deploy the application to the device for testing, the application does not fill the screen.
FYI: the DM101 SmartWatch does not support wear OS, it uses Android 7.1.1 (API 25)
if you want to see what it looks like
link to watch
I am using Android Studio and setup the Manifest to be compatible with the Device:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.appnft">
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- <uses-feature android:name="android.hardware.type.watch" />-->
<application
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="false"
android:resizeableActivity="true"
android:theme="#android:style/Theme.DeviceDefault"
>
<!-- <uses-library-->
<!-- android:name="com.android." "com.google.android.wearable"-->
<!-- android:required="false" />-->
<!-- <meta-data-->
<!-- android:name="com.google.android.wearable.standalone"-->
<!-- android:value="true" />-->
<meta-data
android:name="android.max_aspect"
android:value="2"/>
<activity
android:name=".MainActivity"
android:exported="true"
android:label="#string/app_name"
android:configChanges="orientation"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
issue visual
picture of the actual issue on watch with app running
I Found the answer after researching for almost a week.
In part it was embedded my question; the DM101 does not support wear OS and because of this I should have started a new android studio project with target a mobile application.
My first mistake was to try adapting the wear OS template manifest.
Second: on the DM101 Smart Watch under developer options, there is the ability to allow third party applications to go full screen; which did not work when using the adapted wear OS Manifest template.

How to set supported device type in Android Studio?

I have created an android TV application that ready to publish by the google play developer console. But I would like to just let users use this application on Android TV devices. (not a mobile device, tablets, etc.). How can I do that on the android studio side?
In your AndroidManifest.xml, include:
<uses-feature android:name="android.software.leanback" android:required="true" />
Only Android TV devices support the Leanback UI, so requiring it in the manifest effectively marks the app has TV-only.
See https://developer.android.com/training/tv/start/start#leanback-req for further details

Multiple apps on my emulator for my one project

Wondering why I'm working on one project in my Android Studio window, but when using the emulator, I see multiple applications that go to different activities. I'm trying to develop one application, not a couple that toss the user around to different applications.
I also notice that when I uninstall one application from virtual machine/emulator, all four icons disappear.
EDIT: Found an answer on a different thread: Android App activities installed as multiple icons
check your manifest:
prpbably you have more than one activity with intent filter tag
<intent-filter>
<action
android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
once delete all from emulator and in your project manifest just luncher activity must have intent-filter tag

My app icon has changed back to Android default after updating Android OS

I was prompted with an Android update today which I agreed to and after it had run and rebooted the app I've been working on has gone back to the Android default icon. The text is correct but even after uninstalling the app and re-installing it the default icon remains. I've checked the Android manifest and the settings remain the same as below
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
I've checked the files and they are the same, so why does my app still show the Android icon? Has anyone else experienced this?
I did had similar problem, what i did is replaced my logo file with standard resolutions framed by google Here
with exiting one in the project. As your exiting logo might not following the new and updated standards of Android.

In visual studio 2017, why won't xamarin app controls (button, editText) show up?

I just built my first Xamarin app using Visual Studio 2017.
I built the main app from the template and it ran fine.
Now, I added two controls to the layout (a button and an EditText) which render fine in the design view but do not show up when the app runs.
Here's the layout xml:
<?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"
android:minWidth="25px"
android:minHeight="25px">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:text="DoWork"
android:layout_width="0dp"
android:layout_weight=".5"
android:layout_height="wrap_content"
android:id="#+id/doWorkButton" />
<EditText
android:layout_width="0dp"
android:layout_weight=".5"
android:layout_height="wrap_content"
android:id="#+id/workText" />
</LinearLayout>
</LinearLayout>
Here's what it looks like in design view:
Here's what it looks like after running it.
I've tried running numerous times in debug and non-debug mode but it never shows the controls.
EDIT 1
Additional things I've tried.
I just did a manual uninstall of the package using command-line adb:
c:\>adb uninstall FirstXam.FirstXam <ENTER>
Success*
*Success is how adb uinstall reports that it worked.
I went and had VS 2017 deploy again, but the controls still don't show up.
:(
EDIT 2
I altered the string displayed at the top of the app in an attempt to verify if anything is changing and it fails too.
You can see where I've altered the ApplicationName string on the right, but again after building, deploying and running again, the changes do not show up.
It's beginning to feel like I'm debugging Visual Studio 2017. :(
EDIT 3
This is now at new levels : Entirely Ludicrous
I deployed found the signed apk in the debug directory and deployed it to my phone (physical hardware).
The app installed just fine -- though it required complete network access and the ability to write to my SD card, which is interesting to have by default.
When I ran the app, it showed the UI just long enough that I could see that the controls were missing and the title bar shows up with the original string text "FirstXam".
Then the app crashes.

Resources