I am using titanium 3.x studio. I want to display google advertisement in my application.
For that i am using admob module for android.
My xml file settings are:
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest android:versionCode="1" android:versionName="1.0"/>
<uses-sdk android:maxSdkVersion="13" android:minSdkVersion="8" android:targetSdkVersion="13"/>
<tool-api-level>13</tool-api-level>
</android>
<modules>
<module platform="android">ti.admob</module>
</modules>
But im getting error Emulator process exited with code 1
please help me to get out of this thanks in advance
update maxSdkVersion to 16 and tool-api-level to 16
Related
I am trying to setup AppConfig variables through our EMM server for an internal-only app.
I have reviewed the documentation "Set up managed configurations" here https://developer.android.com/work/managed-configurations and verified that my AndroidManifest.xml and app_restrictions.xml files are correctly populated.
AndroidManifesst.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
<application>
...
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/file_paths"></meta-data>
<meta-data
android:name="android.content.APP_RESTRICTIONS"
android:resource="#xml/app_restrictions"></meta-data>
</provider>
</application>
...
</manifest>
app_restrictions.xml:
<?xml version="1.0" encoding="utf-8"?>
<restrictions xmlns:android="http://schemas.android.com/apk/res/android">
<restriction
android:key="app_configurator"
android:title="#string/app_configurator"
android:restrictionType="bool"
android:defaultValue="false">
</restriction>
<restriction
android:key="z_number"
android:title="#string/z_number"
android:restrictionType="string"
android:defaultValue="Testing123">
</restriction>
</restrictions>
In testing, using the Test DPC app with Device Owner:
the button "LOAD APP MANIFEST RESTRICTIONS" does nothing (when I expect it should load the details defined in app_restrictions.xml)
if I manually add the keys and values my app responds as expected
When publishing, through Managed Google Play and setting up the app from our EMM solution:
the app configuration tab is not populated with any parameters and a message "This app doesn't support app configuration." is shown leaving no way to configure the app.
Given that the app does respond when the values are set, but the inability to set the values seems to indicate the Test DPC and the EMM solution cannot read the values of my app_restrictions.xml.
The documentation indicates that the above two files are all that is needed. However, I have seen some reference to Google Play services providing this information to MDMs so I'm not sure I understand the process here to investigate further.
Hoping someone could help me with some pointers.
In the AndroidManifest.xml file, the location of the 'meta-data' tag is incorrect. The issue is resolved after the following update:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
<application>
<meta-data
android:name="android.content.APP_RESTRICTIONS"
android:resource="#xml/app_restrictions"></meta-data>
...
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/file_paths"></meta-data>
</provider>
</application>
...
</manifest>
I'm a bit confused about MonoAndroid versions related to SDK and JDK.
I'm trying to add Xamarin.Android.Support.v7.AppCompat but installation fails because it seems that is installing AppCompat 25.1.1 with MonoAndroid Version v6.0.
What is the problem?
This is my Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="HCApp.HCApp" android:versionCode="1" android:versionName="1.0" android:installLocation="auto">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:label="HCApp" android:theme="#style/HCTheme" android:icon="#drawable/Icon"></application>
</manifest>
Thank you!
Im following the tutorial to add Google Cloud Messaging to your xamarin android project (Walkthrough - Using Remote Notifications in Xamarin.Android).
But im having trouble trying to connect to Google Services.
Everytime i try to build/ run my app, Visual Studio just trys to launch the app but then stops about a second later.
Heres the output message:
Android application is debugging. The application could not be
started. Ensure that the application has been installed to the target
device and has a launchable activity (MainLauncher = true).
Additionally, check Build->Configuration Manager to ensure this
project is set to Deploy for this configuration.
Here is my manifest file also:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="PushNotificationsAndroid.PushNotificationsAndroid"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="auto">
<uses-sdk android:minSdkVersion="16" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" />
<user-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="PushNotificationsAndroid.PushNotificationsAndroid.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="PushNotificationsAndroid.PushNotificationsAndroid.permission.C2D_MESSAGE" />
<application android:label="PushNotificationsAndroid"></application>
</manifest>
I commented out some of the permission lines and this issue seems just to happen when i added the line:
<permission android:name="PushNotificationsAndroid.PushNotificationsAndroid.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
Can anyone give me some advice to why this is happening?
Found a solution. I just had to make the package name lowercase for some reason
com.notifications.pushnotificationsandroid
I'm trying to upgrade a 6.3 project to 7.1 in Studio and the upgrade keeps crashing and closing the project.
If I remove the windows8 project files from my apps, the upgrade works successfully. I have attached my appx.manifest file in case this helps debug the issue.
10:49:13 AM: [2016-02-09 10:46:18] Adding WLWin8Native reference and AuthWinRT.targets to the Windows 8 project file
[2016-02-09 10:46:21] FWLST1226I: Added Authorization Manager Cordova plugin to config.xml (C:\Users\IBM_ADMIN\MobileFirst71Prototype\MaximoAnywhere\apps\WorkExecution\iphone\native\config.xml).
[2016-02-09 10:46:21] Unexpected error during upgrade: java.lang.NullPointerException at com.worklight.upgrader.upgraders.windows8.AppXManifestUpgrade.upgrade(AppXManifestUpgrade.java:69)
at com.worklight.upgrader.WLUpgradeEngine.executeUpgrader(WLUpgradeEngine.java:368) at com.worklight.upgrader.WLUpgradeEngine.performUpgrade(WLUpgradeEngine.java:301)
at com.worklight.upgrader.WLUpgradeEngine.upgradeProject(WLUpgradeEngine.java:188) at com.worklight.studio.plugin.upgrader.WLUpgraderWorkspaceJob.runInWorkspace(Unknown
Source) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
[2016-02-09 10:46:21] java.lang.NullPointerException
Here's my package.appxmanifest file
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest">
<Identity Name="a02b50fe-bb55-4be5-8bd9-6c2f93cef175" Version="7.5.2.1" Publisher="CN=application's author"/>
<Properties>
<DisplayName>Work Execution</DisplayName>
<PublisherDisplayName>IBM</PublisherDisplayName>
<Logo>images\storelogo.png</Logo>
</Properties>
<Prerequisites>
<OSMinVersion>6.3.0</OSMinVersion>
<OSMaxVersionTested>6.3.0</OSMaxVersionTested>
</Prerequisites>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App" StartPage="www\default\index.html">
<m2:VisualElements DisplayName="Work Execution" Description="Work Execution" BackgroundColor="#003f69" ForegroundText="light"
Square150x150Logo="images\logo.png" Square30x30Logo="images\smalllogo.png">
<m2:SplashScreen Image="images\splashscreen.png"/>
</m2:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="privateNetworkClientServer"/>
<Capability Name="internetClient"/>
<Capability Name="picturesLibrary"/>
<DeviceCapability Name="webcam"/>
<DeviceCapability Name="location"/>
</Capabilities>
</Package>
somehow I had some invalid XML in there for my VisualElements elements. Once I fixed the manifest's VisualElements section to look like this, the upgrade went through.
<VisualElements BackgroundColor="#003f69" Description="Inspection" DisplayName="Inspection" ForegroundText="light" Logo="images\logo.png" SmallLogo="images\smalllogo.png" ToastCapable="true">
<SplashScreen Image="images\splashscreen.png"/>
</VisualElements>
I am new in titanium development. How i can create a custom alloy theme or change the holo theme action bar background. please help me with a example if you have solution.
The best way to do this is with this "actionbar generator". its works amazing to me.
ActionBar Generator
You should take a look at this thread in the Appcelerator forum. In short: You create a style where you define your color and apply it to your actionbar.
Android Themes documentation
Example:
platform/android/res/values/builtin_themes.xml
<!-- Works for Titanium SDK 3.2.x and earlier when built against Android 4.0x/API Level 14 -->
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Available for Android 4.0.x/API Level 14 and later -->
<style name="LightDarkBar" parent="#android:style/Theme.Holo.Light.DarkActionBar"/>
<!-- Available for Android 3.0.x/API Level 11 and later -->
<style name="Light" parent="#android:style/Theme.Holo.Light"/>
<style name="Dark" parent="#android:style/Theme.Holo"/>
<!-- Available for all Android versions -->
<style name="OldLight" parent="#android:style/Theme.Light"/>
<style name="OldDark" parent="#android:style/Theme.Black"/>
</resources>
modify the Android section of your tiapp.xml
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>
<application android:theme="#style/LightDarkBar"/>
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19"/>
</manifest>
</android>