I have a project that has 3 themes (support,crm,sales), when I compile a version, I have to change the tiapp.xml:
id (com.website.[support/crm/sales])
name (Website [Support/CRM/Sales])
android manifest
My question is: there are any way to replace or merge the android manifest or some parts of tiapp.xml file:
uses-permission android:name="com.website[support/crm/sales].permission.MAPS_RECEIVE"
permission android:name="com.website.[support/crm/sales].permission.MAPS_RECEIVE"
activity android:name=".Website[Support/CRM/Sales]Activity"
This is my manifest:
<android xmlns:android="http://schemas.android.com/apk/res/android">
<tool-api-level>14</tool-api-level>
<manifest>
<uses-sdk android:maxSdkVersion="23"
android:minSdkVersion="14" android:targetSdkVersion="23"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<uses-permission android:name="com.website.[support/crm/sales].permission.MAPS_RECEIVE"/>
<permission
android:name="com.website.[support/crm/sales].permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<application android:debuggable="true"
android:largeHeap="true" android:theme="#style/Theme.MyTheme">
<meta-data
android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyDcN-CWFqg4-Ai4Es10E0sSDmJ7seo4XAg"/>
<activity
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:name=".Website[Support/CRM/Sales]Activity" android:screenOrientation="landscape"/>
</application>
<supports-screens android:anyDensity="true"/>
</manifest>
</android>
The main/default icons, I've to replace them manually, while this feature isn't added: https://jira.appcelerator.org/browse/ALOY-1318
Unfortunately tiapp.xml is amongst the few things you cannot theme through Alloy yet:
https://jira.appcelerator.org/browse/ALOY-1118
This because a chicken-egg problem. tiapp.xml is the main config file of your app which is loaded before anything else.
I'd suggest using grunt or gulp to modify the file before you hand it over to Titanium to build.
Related
I am using the flutter_webview_pro plugin for webview in my flutter application, but I am not able to download file/image etc. in the that application.
I added following in androidmanifest.xml file
<provider
android:name="vn.hunghd.flutterdownloader.DownloadedFileProvider"
android:authorities="${applicationId}.flutter_downloader.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/provider_paths"/>
</provider>
and also added the permission in the same file
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
the application cannot be uploaded to the playstore with the reason that it must define android:exported, even though I have defined it in the flutterProject/android/app/src/main/AndroidManifest.xml, but the error remains the same, I suspect because the package I am using is old school,
I want to update it manually but the manifest is just like below
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.onesignal.flutter">
</manifest>
how to solve it?
Simply do like this:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
<application
android:label="App"
android:name="${applicationName}"
android:icon="#mipmap/launcher_icon">
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/>
<meta-data android:name="com.facebook.sdk.ClientToken" android:value="#string/facebook_client_token"/>
<activity
android:name=".MainActivity"
android:exported="true" //here ------
you need to add this in Activity Tag
(Must Add Launcher Activity : android:exported="true")
When using package 1 or package 2 for tracking the user, It's working fine in debug mode, But when generate release mode APK and trying to test on device this error obtains.
E/flutter (19926): [ERROR:flutter/shell/common/shell.cc(93)] Dart Error: Dart_LookupLibrary: library '.../LocationCallbackHandler' not found.
This is all permission which i added in manifest file
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
What is the meaning of this error? and How can I solve it?
I want run a existing project. It's fully run on under Android 12 but when I going to run a samsung phone which version is Android 12. Then I get this type of error.
Error :
✓ Built build/app/outputs/flutter-apk/app-release.apk (104.1MB).
Installing build/app/outputs/flutter-apk/app.apk... 3.3s
Error: ADB exited with exit code 1
Performing Streamed Install
adb: failed to install /Users/abir/Documents/Office
Work/appName-App-Old-Version/build/app/outputs/flutter-apk/app.apk: Failure
[INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI:
/data/app/vmdl2043233695.tmp/base.apk (at Binary XML file line #124):
io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService: Targeting S+
(version 31 and above) requires that an explicit value for android:exported be
defined when intent filters are present]
Error running application on SM G781B.
Here is my AndroidManifest.xml file :
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="care.appname.health">
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- The Agora SDK requires Bluetooth permissions in case users are using Bluetooth devices.-->
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:label="appname"
android:name="${applicationName}"
android:icon="#mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="#style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="#style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
I tried android:exported="true" true and false also. But nothing is worked. How can I solve this ?
Add service to application, it's work for me.
<service android:name="io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService" android:exported="true"/>
my application worsks perfectly fine. but when i add some uses-permission for internet and map and api key for google map it gives me error. i tried flutter clean, flutter run but still getting the same error. I dont understand what i am doing wrong in manifest file. please someone help me.
Here is my manifest file code:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.food_order">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<application
android:label="food_order"
android:icon="#mipmap/ic_launcher"
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="#style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="#style/NormalTheme"
/>
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="#drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCn************ratM"/>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
You are missing > after the android:icon="#mipmap/ic_launcher", so it should be like this:
<application
android:label="food_order"
android:icon="#mipmap/ic_launcher">
<activity...
Your IDE should have given you hints about this, like so
If you aren't using an IDE I strongly suggest you start using one :).
This sometimes is usually because you commented some part of code snippet in the AndroidManifest.xml out; not knowing some other parts of the entire code is also commented out.
So I recommend you checking well to know what's actually wrong before deciding to move on with other alternative ways of fixing such.
remove all spaces between <manifest> node and <application>
Like this :
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.companyname.myappname">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.USE_BIOMETRIC"/>
<application
android:label="My App"
android:name="${applicationName}"
android:icon="#mipmap/launcher_icon">