Starting tvout via "am start" - adb

i have a widget to switch to tvout
I d like to start that widget manually via "am start" command.
This the manifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="8" android:versionName="2.2.1" package="com.archos.tvoutwidget"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" />
<uses-feature android:name="android.hardware.tvout" />
<application android:label="#string/app_name" android:icon="#drawable/app_icon">
<activity android:label="#string/app_name" android:name=".TvOutWidget" android:screenOrientation="landscape" android:configChanges="orientation" />
<receiver android:label="#string/app_name" android:icon="#drawable/app_icon" android:name="TvOutWidgetProvider">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="archos.intent.action.ARCHOS_UPDATE_TVOUT_WIDGET" />
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="#xml/tvout_widget_info" />
</receiver>
</application>
</manifest>
Is this possible ?

Yes, this is possible. Just use:
am start -n com.archos.tvoutwidget/.TvOutWidget
You can start any app using:
am start -n package_name/activity_name

Related

Referenced assembly FSharp.Data.SqlProvider.dll has assembly level attribute but no public type provider classes were found

How to make SQLProvider work in F#? I followed their steps but had few errors.
I run PM> Install-Package SQLProvider
Create a new .fsx script file
Load the dll #r #"C:\src\FSharpDB\DBTest\packages\SQLProvider.1.2.10\lib\net472\FSharp.Data.SqlProvider.dll"
At that stage, I have this warning:
Referenced assembly
'C:\src\FSharpDB\DBTest\packages\SQLProvider.1.2.10\lib\net472\FSharp.Data.SqlProvider.dll'
has assembly level attribute
'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute'
but no public type provider classes were found
If I continue and try to run the example script, it can't recongnised SqlDataProvider:
#r #"C:\src\FSharpDB\DBTest\packages\SQLProvider.1.2.10\lib\net472\FSharp.Data.SqlProvider.dll"
open FSharp.Data.Sql
type Sql = SqlDataProvider<
Common.DatabaseProviderTypes.MSSQLSERVER,
"Server=myServer;Database=myDB;Trusted_Connection=True;">
Error:
The type 'SqlDataProvider' is not defined.
Am I missing anything?
Edit:
As asked in the comments below, more information on the project configuration
App.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>
packages.config
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FSharp.Core" version="6.0.1" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="SQLProvider" version="1.2.10" targetFramework="net48" />
<package id="System.IO" version="4.3.0" targetFramework="net48" />
<package id="System.Net.Http" version="4.3.4" targetFramework="net48" />
<package id="System.Runtime" version="4.3.1" targetFramework="net48" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net48" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net48" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net48" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net48" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net48" />
</packages>

I don't know why my app doesn't show ads?

I created an app, I added react-native-admob and linked it
I changed /node_modules/react-native-admob/android/build.gradle file:
compile 'com.google.android.gms:play-services-ads:+'
to
compile 'com.google.android.gms:play-services-ads:15.0.0'
and then build the apk with "./gradlew clean && ./gradlew assembleRelease", but when I install the app in my phone it doesn't show ads.
This is my code
import {
AdMobBanner,
AdMobInterstitial,
PublisherBanner,
AdMobRewarded,
} from 'react-native-admob';
....
<View>
<AdMobBanner
adSize="fullBanner"
adUnitID="ca-app-pub-2174326550695558/6129769558"
onAdFailedToLoad={error => console.error(error)}
/>
</View>
Here is my AndroidManifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.brawlcalculator">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest>
In your AndroidManifest.xml file:
Add you admob application id to a meta tag inside your application tag
<application
android:name=".MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="#style/AppTheme"
> // Look at this ... after the closing tag
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-2174326550695558~2753605675"
/>
</application>

Android Build keep failing with build hint telephony

I want to make the App work only for Android phones and not on tablets so I tried to add the following build hint telephony() to make the App work on Phone for Android under xpermissions:
""
I'm attaching the generated XML with telephony hint added twice one with false(default) and duplicate added with true(added by me).I'm not sure where is the option to replace the default build hint which added with false value. I'm suspecting that was causing the issue for build to fail on the server.
Please find the generated log below:
<receiver android:name="com.codename1.impl.android.LocalNotificationPublisher" ></receiver>
<service android:name="com.codename1.impl.android.BackgroundFetchHandler" android:exported="false" />
<activity android:name="com.codename1.impl.android.CodenameOneBackgroundFetchActivity" android:theme="#android:style/Theme.NoDisplay" />
<activity android:name="com.codename1.location.CodenameOneBackgroundLocationActivity" android:theme="#android:style/Theme.NoDisplay" />
<service android:name="com.codename1.location.BackgroundLocationHandler" android:exported="false" />
<service android:name="com.codename1.location.GeofenceHandler" android:exported="false" />
<service android:name="com.codename1.media.AudioService" android:exported="false" /> </application>
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-permission android:name="android.permission.INTERNET" android:required="false" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:required="false" />
<uses-feature android:name="android.hardware.location" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:required="false" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" android:required="false" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" android:required="false" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/><uses-feature android:name="android.hardware.telephony"/></manifest>
You shouldn't include a manifest entry that's already included. We always mark dependencies as required false. That means the permission is desired but that the app will not fail if the permission is revoked. That's generally good practice as the true flag for required is probably a mistake especially in a cross platform application.

Wix installer error code 2343 received for a simple configuration. (WIX Newbie)

I am receiving the following error when using the following simple WIX configuration. The application being installed is WPF.
Product: Web Miner Installer -- The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2343. The arguments are: , ,
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="Application Title" Language="1033" Version="1.0.0.0" Manufacturer="Avant Prime" UpgradeCode="855a8b6e-c576-41e2-8118-8f3511613478">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="Application Title" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
<UIRef Id="WixUI_InstallDir" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
<DirectoryRef Id="ShortcutFolder">
<Component Id="ShortcutsComponent" Feature="ProductFeature" Guid="{B40F2C3F-CACC-4196-8F8F-C0F6B082404E}">
<CreateFolder Directory="ShortcutFolder" />
<RemoveFolder Id="RemoveShorcutFolder" Directory="ShortcutFolder" On="uninstall" />
<Shortcut Id="UninstallProduct"
Name="Uninstall xxxxxxx"
Target="[System64Folder]msiexec.exe"
Arguments="/x [ProductCode]"
Directory="ShortcutFolder"
Description="Uninstalls xxxxxxx"/>
<RegistryValue Id="RegistryShortcut"
Root="HKCU"
Key="SOFTWARE\xxxxxx\settings"
Name="Shortcut"
Value="1"
Type="integer"
KeyPath="yes" />
</Component>
</DirectoryRef>
<PropertyRef Id="NETFRAMEWORK45" />
<Condition Message="This setup requires the .NET Framework 4.5.1 to be installed.">
Installed OR NETFRAMEWORK45
</Condition>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramMenuFolder">
<Directory Id="ShortcutFolder" Name="xxxxxx"></Directory>
</Directory>
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="xxxxxxx" />
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="ProductComponent">
<File Source="$(var.MyApplication.TargetPath)" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
What am I missing or doing wrong?
Here is the requested log information. It is big so I attached a link.
WIX Installer Error Log
You should replace INSTALLLOCATION with the real property (INSTALLFOLDER in your case)

Log4net not printing to console in wpf

I have a WPF application with 2 log4net appenders in log4net, the first printing to file and the second should print to console.
For some reason I am not being able to show the result on log4net, but I do see it in the file. What is wrong?
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<log4net debug="true">
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="C:\\Temp\\1.txt" />
<appendToFile value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="10MB" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%-5p %d %5rms %-22.22c{1} %-18.18M - %m%n" />
</layout>
</appender>
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" >
<layout type="log4net.Layout.PatternLayout">
<param name="Header" value="[Header]\r\n" />
<param name="Footer" value="[Footer]\r\n" />
<param name="ConversionPattern" value="%-5p %d %5rms %-22.22c{1} %-18.18M - %m%n" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="RollingLogFileAppender" />
<appender-ref ref="ConsoleAppender" />
</root>
</log4net>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>
Do you see a console pop up when you start the application.
It could be you have to configure your application as a console project to have a console window...
Otherwise you can check trace info. Normally an appender tries to leave one error message there if he can't log to the desired location.
Output window of visual studio catches trace messages when debugging...
Possible duplicate: Log4net won't log to console (WinForms app)
If you are wanting to see the messages in the output window in visual studio you should use the following instead:
<appender name="TraceAppender" type="log4net.Appender.TraceAppender" >
Do you call once XmlConfigurator.Configure() ?

Resources