I'm getting ""Can't install company app error " when im installing my app xap on windows 8 mobile phone. I want to build the xap through phonegap build.https://build.phonegap.com
My zip contains following file hierarcy
css
js
index.html
config.xml
ic_launcher.png
my config.xml file is
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Roadrunner</name>
<description>
Be prepared on road - Navigational app focus towards road safety
</description>
<author email="dev#cordova.apache.org" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" version="1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="winphone">
</platform>
</widget>
Um getting the following error.
Can't install company app error -- There is a problem with this comapny app.
Please help me out/
change your app id
<widget id="io.cordova.hellocordova"
to
<widget id="com.yourcompanydomain"
Related
I have successfully built apk out of HTML/CSS/JavaScript App using Cordova. And I can successfully install the run the app on my tablet (android version 9) . However, some pages in my app fails to load. Some pages which required keyboard input doesn't work etc. When I copy over same content and host it over apache, they work fine. I wonder what I am missing.
Here is what I do:
I use https://github.com/slaszu/docker-compose-cordova-android.git to run cordova environment.
Inside of cordova container, I add "cordova platform add android" to add platform. ( Gets version8.1.0)
I copy contents of html folder over into the www folder
I have config.xml inside of my www folder which looks like this
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.abc" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>ABC 1-3</name>
<description>
epaath app
</description>
<author email="abc#example.org" href="http://cordova.io">
nepal team
</author>
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<icon src="www/img/logo.png" />
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
</widget>
I have index.html file with following lines added in suitable place
<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
<script src="cordova.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/handlebars-3.0.3.js"></script>
<script type="text/javascript" src="js/ole.index.js" defer></script>
<script type="text/javascript" src="js/ole.search.js" defer></script>
<script>
I use following commands to generate apk
#cordova build clean
#cordova build android
Tried building apk using cordova.
It was successful.
Got some minor issues while loading the pages.
I'm moving a project (and database) from Windows and SQL Server and Visual Studio, over to Linux Mint, MySQL and MonoDevelop. I'm most of the way done--but I can't get the type provider for MySQL to work. The most obvious sticking point seems to be that:
open FSharp.Data.Sql
Gives Error, the namespace of 'Sql' is not defined. (And I don't see a NuGet package for that name.)
There's no error on any of:
open MySql.Data
open MySqlConnector
open FSharp.Data
I seem to have packages/references to:
MySqlConnector
MySql.Data
FSharp.Data
FSharp.Data.SqlClient
FSharp.Data.TypeProviders
And then I also get an error for:
SqlDataProvider
"The type 'SqlDataProvider' is not defined'".
I'm sure this is very simple, but I'm not great at which or how to use references--sorry and thanks.
(And I don't really understand how to distinguish SQLProvider from FSharp.Data.Sql provider from MySql.Data.dll from MySqlConnector.dll...)
Edits: Thanks for questions. I assume this is .Net Framework, not Core. The project originated in defaults Visual Studio templates about 3 years ago, and I've never done anything to purse Core.
For the fsproj file(s)--I'm not sure what's what. I have 4 projects in the solution (only 2 actively being used). For the project with the type provider types, this is the project.fsproj.FileListAbsolute.txt, in /obj/Debug.
C:/Users/gen/Desktop/Simulations/SqlFunctions/bin/Debug/Library3.XML
C:/Users/gen/Desktop/Simulations/SqlFunctions/bin/Debug/Library3.exe
C:/Users/gen/Desktop/Simulations/SqlFunctions/bin/Debug/Library3.pdb
C:/Users/gen/Desktop/Simulations/SqlFunctions/bin/Debug/FSharp.Core.dll
C:/Users/gen/Desktop/Simulations/SqlFunctions/bin/Debug/FSharp.Data.TypeProviders.dll
C:/Users/gen/Desktop/Simulations/SqlFunctions/bin/Debug/FSharp.Core.xml
C:/Users/gen/Desktop/Simulations/SqlFunctions/bin/Debug/FSharp.Data.TypeProviders.xml
C:/Users/gen/Desktop/Simulations/SqlFunctions/obj/Debug/Library3.exe
C:/Users/gen/Desktop/Simulations/SqlFunctions/obj/Debug/Library3.pdb
/home/gen/Downloads/Simulations 2018-07-29/SqlFunctions/bin/Debug/Library3.XML
/home/gen/Downloads/Simulations 2018-07-29/SqlFunctions/obj/Debug/SqlFunctions.fsprojResolveAssemblyReference.cache
/home/gen/Downloads/Simulations 2018-07-29/SqlFunctions/obj/Debug/Library3.exe
/home/gen/Downloads/Simulations 2018-07-29/SqlFunctions/obj/Debug/Library3.pdb
The top half of those look like old Windows references-? Obviously none of it includes anything like MySql.Data--which does appear in project/References/From Packages.
Oh wait, this at the solution level may be more relevant (I've never worked with .fsproj files):
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>397e58f9-3730-4c45-a36f-7c9f64d94f1d</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Simulations</RootNamespace>
<AssemblyName>Simulations</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFSharpCoreVersion>4.4.0.0</TargetFSharpCoreVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Name>Simulations</Name>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Tailcalls>false</Tailcalls>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<DocumentationFile>bin\Debug\Simulations.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Tailcalls>true</Tailcalls>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<DocumentationFile>bin\Release\Simulations.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
</PropertyGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '11.0'">
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')">
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')">
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</Otherwise>
</Choose>
<Import Project="$(FSharpTargetsPath)" />
<ItemGroup>
<Compile Include="AssemblyInfo.fs" />
<Compile Include="1a.fs" />
<Compile Include="2a.fs" />
<Compile Include="2b.fs" />
<Compile Include="2c.fs" />
<Compile Include="2d.fs" />
<Compile Include="2e.fs" />
<Compile Include="2f.fs" />
<Compile Include="3a.fs" />
<Compile Include="3b.fs" />
<Compile Include="3c.fs" />
<Compile Include="3d.fs" />
<Compile Include="4a.fs" />
<Compile Include="4b.fs" />
<Compile Include="4c.fs" />
<Compile Include="5a.fs" />
<Compile Include="5b.fs" />
<Compile Include="5c.fs" />
<Compile Include="5d.fs" />
<Compile Include="5e.fs" />
<Compile Include="6a.fs" />
<Compile Include="6b.fs" />
<Compile Include="7a.fs" />
<None Include="Script.fsx" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data.Linq" />
<Reference Include="System.Numerics" />
<Reference Include="FSharp.Core">
<HintPath>packages\FSharp.Core.4.5.2\lib\net45\FSharp.Core.dll</HintPath>
</Reference>
<Reference Include="FSharp.Data.TypeProviders">
<HintPath>packages\FSharp.Data.TypeProviders.5.0.0.6\lib\net40\FSharp.Data.TypeProviders.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple">
<HintPath>packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="SqlFunctions\SqlFunctions.fsproj">
<Name>SqlFunctions</Name>
<Project>{14eefa95-3b68-4348-a7de-db29bfb3567f}</Project>
<Private>True</Private>
</ProjectReference>
</ItemGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
Thanks again.
Edit 2: As I comment below--the situation has progressed (I think) to: Invalid attempt to read when Reader is closed--error on the type declaration.
I have created a hosted app using this tutorial: Microsoft Tutorial Page
In this web app, there is <a href> link available which opens Google Map like:
Address URL
While tapping on this href, it puts my app in background mode and opens map either in GoogleMap application or in Safari browser.
But sometimes, the same link opens the map URL in my hosted cordova app webview itself, due to that, my app went away and user does not get any way-around to return back to my application.
Can anyone please suggest how to embedd map url into hosted web app.
Note: I have already used InAppBrowser cordova plugin into my app.
Config file:
<access origin="*" />
<access origin="http://*/*" />
<access origin="https://*/*" />
<access origin="content:///*" />
<access origin="https://*google.com/*" />
<access origin="https://maps.google.com/*" />
<access origin="https://*.mywebsite.com/*" />
<access origin="https://*.myotherwebsite.com/*" />
<access origin="https://accounts.mywebsite.com/*" />
<access origin="https://accounts.myotherwebsite.com/*" />
<access origin="https://officerapp.mywebsite.com/*" />
<access origin="https://officerapp.myotherwebsite.com/*" />
<allow-intent href="*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="https://*google.com/*" />
<allow-intent href="https://maps.google.com/*" />
<allow-intent href="https://accounts.mywebsite.com/*" />
<allow-intent href="https://accounts.myotherwebsite.com/*" />
<allow-intent href="https://officerapp.mywebsite.com/*" />
<allow-intent href="https://officerapp.myotherwebsite.com/*" />
<allow-navigation href="https://accounts.mywebsite.com/*" />
<allow-navigation href="https://accounts.myotherwebsite.com/*" />
<allow-navigation href="https://myapp.mywebsite.com/*" />
<allow-navigation href="https://myapp.myotherwebsite.com/*" />
This is pretty simple to do, try to open it as if you open the link in a new tab. Just add this attribute to your code:
target="_blank"
So, you have:
Address URL
First make sure you don't have any of this in your config.xml
<allow-navigation href="*" />
<allow-navigation href="http://*/*" />
<allow-navigation href="https://*/*" />
This tags allow the navigation to http, https or anything inside your app
And then add
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
This launches the external browser for anything that starts with http or https
I wanted to provide a Companion Configuration Activity for my Android Wear watch face. I have already build the app that has all the configuration and can communicate directly with the watch face, but I can only launch it from the launcher as app, but the gear does not show up in the watch face section of Android Wear app! Can I allow user to configure the watch face via companion app and also via Google Android Wear app?
This is how I declare my activity in phone module:
<activity
android:name=".Main"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="com.google.android.wearable.watchface.category.COMPANION_CONFIGURATION" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<data android:mimeType="image/*"></data>
</intent-filter>
</activity>
On the watch part, I added in:
<meta-data
android:name=
"com.google.android.wearable.watchface.companionConfigurationAction"
android:value=
"virtualgs.photowatch.Main" />
<meta-data
android:name=
"com.google.android.wearable.watchface.wearableConfigurationAction"
android:value=
"virtualgs.photowatch.Main" />
And the result is the same - no gear shown on the Android Wear app.
Try something like this:
Phone Manifest:
<intent-filter>
<action android:name="com.virtualgs.photowatch.MAIN_CONFIG" />
<category android:name="com.google.android.wearable.watchface.category.COMPANION_CONFIGURATION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Watch Manifest:
<meta-data
android:name="com.google.android.wearable.watchface.companionConfigurationAction"
android:value="com.virtualgs.photowatch.MAIN_CONFIG" />
I think the intent action in the phone manifest has to be the same as the meta-data value in the watch manifest to work.
I think this is the correct answer about XML file config:
<activity
android:name=".DigitalWatchFaceWearableConfigActivity"
android:label="#string/digital_config_name">
<intent-filter>
<action android:name=
"com.example.android.wearable.watchface.CONFIG_DIGITAL" />
<category android:name=
"com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
As well as having the activity defined in the phone module, you need to reference it in the wear module as part of the declaration of your watch face service like this:
<service
android:name=".MyWatchFaceService" ... />
<!-- companion configuration activity -->
<meta-data
android:name=
"com.google.android.wearable.watchface.companionConfigurationAction"
android:value=
"com.my.watchface.CompanionConfigurationActivity" />
<!-- wearable configuration activity -->
<meta-data
android:name=
"com.google.android.wearable.watchface.wearableConfigurationAction"
android:value=
"com.my.watchface.WearableConfigurationActivity" />
...
Replacing com.my.watchface.CompanionConfigurationActivity and com.my.watchface.WearableConfigurationActivity with the fully qualified names of the configuration activities in the wear and phone modules respectively.
Cordova showing white screen when app is installed in 4.4.2 android version devices and it is working fine in ios devices and 4.4.2 android version device and in 4.4.2 it was showing error in console Channel not fired: onDOMContentLoaded
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" android:windowSoftInputMode="adjustPan" package="com.Webstation.Osmosys" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:hardwareAccelerated="true" android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="#string/app_name" android:name="WebstationApp" android:screenOrientation="userPortrait" android:theme="#android:style/Theme.Black.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
</manifest>