Removing Nativescript application from a device, Application Settings - android

I am having trouble with a Nativescript App which use the Application Settings Module,
When i remove this App from an Android Phone, even if i clear App Data and Cache before uninstall, and i reinstall it, the settings set earlier (before unistall) seems to be still there,
Does anyone else has ever encountered this issue ?
Regards,
Kansen

<application
android:allowBackup="false">...</application>
Try this in AndroidManifest.xml

Related

How to fix loading issue with flutter app on apk release

I am building a flutter app. I use Getx State Management. I fetch the data from internet using Getxservices
The app works fine on debug but I face this issue on apk-release. First when I install the app on android phone, it will work perfectly like this:
But when I close the app and re-open it, I will have a screen like this:
Below is my AndroidManifest
The app works fine on debug mode so there is no way I can debug it to know the exact thing causing the issue.
Give internet permission in your AndroidManifest
<manifest xmlns:android="...">
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
I have gotten the solution. I added splash screen and loaded all my resources on splash screen and the issue is gone.

Force Stop Running Application Before Build in Android Studio

I know there is an option to "force stop running application before launching activity" (which I do have enabled) but I'm after a way to have the same program exit as soon as I click the "play" button. I believe this is what use to happen before an upgrade but ever since the upgrade I've been unable to find a way to do it.
The reason I'm after this is because before (when the app closed when I pressed the button) it was really easy to tell when the new edit of my app was up and running on the device. Now that the old version keeps running I frequently make mistakes thinking the new version is already running before it is, or more commonly, not realising the new version is ready thinking the version I am looking at is the old one.
Is there a way to bring back the behaviour I seem to remember having before?
Thanks.
You can disable Instant Run via Settings -> Build, Execution, Deployment in Android Studio
Disable the Instant Run option from Settings as follows:
I think check thd delendencues and any error code written in any java as well as manifest file of application . I have done and my app is running.

SharedPreferences are not stored after restarting app

maybe someone experienced the same problem with Android 8.
I wrote an application for an older Android version ( Android 6 and 7 ).
Now, after having updated my mobile phone to Android 8 it seems as if SharedPreferences are not stored anymore although my application was working fine for a long time with older Android versions.
As long as I save my settings for the current session everything is working fine but as soon as I restart my application all the settings seem to be lost.
I also checked my security settings in Android but they seem to be fine, too.
I have not changed any line of code in my app so I think it has something to do with Android itself.
Did somebody experience the same problem or maybe he/she knows how to solve the problem?
Thank you very much!
At the moment you write your questions you always find the answer.
The problem lies within the security settings for SharedPreferences: MODE_WORLD_READABLE is not allowed anymore or it was deprecated and now it was deleted.

Hide application shortcut

I am trying to make an application of which I am trying to hide the launcher shortcut. The reason for this is so I could use this apps as a module / extension for another app without it being visible or cluttering the launcher environment (ie. having this app on your phone will unlock partial functionality in another app). I have been looking into how to do this for a while now, but I can't find a proper solution.
I have read a 'solution' to this issue that tells me to remove <category android:name="android.intent.category.LAUNCHER" /> from the AndroidManifest.xml file. This however results in Android Studio not being able to build or run the app at all, giving me an error that says Default Activity not found (I have tried this with a fresh project and an empty activity).
I am trying to develop this app on my personal device which is a Huawei P9 Lite, running android 6.0
Is there a way to do this?
EDIT
I've read somewhere that Google has removed the ability to uninstall shortcuts since android 6.0. Although it doesn't really say anything about hiding shortcuts for your application, I went ahead and assumed it's part of the same security fix.
Is there a way to do this for the newest platform versions?
I have read a 'solution' to this issue that tells me to remove from the AndroidManifest.xml file.
That is the correct answer.
This however results in Android Studio not being able to build or run the app at all, giving me an error that says Default Activity not found (I have tried this with a fresh project and an empty activity).
Well, it may not make sense to run it. After all, you say that this app is a plugin to some other app. In many cases, a plugin itself cannot run independently (e.g., you cannot run a browser plugin except via the hosting browser).
That being said, you can edit your run configuration via Run > Edit Configurations, and choose what you want to have happen when you run the module:
The run configuration for an app module defaults to "Default Activity", but you can choose something else (e.g., "Specific Activity").
I've read somewhere that Google has removed the ability to uninstall shortcuts since android 6.0.
That answer is unrelated to your question.

Xamarin Android deployment not using the latest code?

I'm creating an Android app in Visual Studio. When I create the aligned APK to side load on my device (from the Tools -> Android -> Publish Android App), it installs and runs, but doesn't seem to have the very latest changes. The series of events I've experienced is as follows:
Installed a version of the app on my device
Updated a color on the login page and set the application theme (among other things)
Re-installed the app
Saw the new theme but not the new color on the login page
Made a random text change on the login page as a test
Re-installed the app
Saw the color change but not the random text change?!
Any suggestions on what I might be doing wrong?
I have experienced similar issues, my go to for fixing this issue has been the following
Clean all projects.
Build all projects (especially the project containing the xcml files).
Delete (remove application) from the device.
If for some reason this doesn't solve the problem, typically a full restart of Xamarin Studio or Visual Studio does.
I have a similar weird problem where old code from only a single project doesn't get updated. All other projects do get updated/deployed. It only happens on a single emulator, only in Debug mode, and only for that one project.
Cleaning+rebuilding the entire solution did not work. However, telling VS to rebuild the individual project does.
Why doesn't rebuilding the solution rebuild the project? I have no freakin' clue, but I can consistently reproduce this issue and workaround.
In my case, I had a similar problem with connected device, and no one proposed solution like Clean\Rebuild\Restart\Reinstall\etc could help me.
At the same time on the AVD everything worked perfectly, latest code deployed ok.
I found that asked issue depended on selected settings in the [USB Developer] section on the connected device (mine was Xiaomi smartphone). Because some vendors provide us with too many security settings...
What I found, you have to turn on both USB Debugging & USB debugging (Security settings), and turn off MIUI Optimization (it's true for Xiaomi vendor, but you can check your device for similar options). Hope this helps.

Categories

Resources