I don't know why it says unresolved class, although the documentation doesn't mention anything related to declaring it or anything.
<activity android:name="com.facebook.FacebookActivity"
android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
in both the customTabActivity and FacebookActivity it says unresolved class
Class referenced in the manifest, com.facebook.CustomTabActivity, was
not found in the project or the libraries
and
Class referenced in the manifest, com.facebook.FacebookActivity, was
not found in the project or the libraries
Related
I am testing to send a notification to my android emulator, it is working as it prints the details as it able to receive and means that is being triggered but the problem here is it doesn't pop up and even show on the notification panel of the android.
Firebase cloud messaging
Terminal
AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.rnfirebaseapp101">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<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|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Change the value to true to enable pop-up for in foreground on receiving remote notifications (for prevent duplicating while showing local notifications set this to false) -->
<meta-data android:name="com.dieam.reactnativepushnotification.notification_foreground" android:value="false"/>
<!-- Change the resource name to your App's accent color - or any other color you want -->
<meta-data android:name="com.dieam.reactnativepushnotification.notification_color" android:resource="#color/white"/> <!-- or #android:color/{name} to use a standard color -->
<!-- <meta-data android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="#string/default_notification_channel_id" /> -->
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationActions" />
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" />
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
</intent-filter>
</receiver>
<service
android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
</application>
</manifest>
EDIT:
Here is the guide I am following: https://blog.jscrambler.com/implementing-react-native-push-notifications-in-android-apps
I am trying to create a default launcher app for Android TV box. Here is the manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.raza.mlauncher">
<uses-feature
android:name="android.software.leanback"
android:required="false" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<queries>
<intent>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
</intent>
</queries>
<application
android:allowBackup="true"
android:banner="#mipmap/ic_launcher"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme.NoActionBar">
<activity
android:launchMode="singleTask"
android:name=".MainActivity"
android:exported="true"
android:priority="2">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LAUNCHER_APP" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.MONKEY" />
</intent-filter>
</activity>
</application>
</manifest>
But when I press home button on Android TV simulator, it does not ask to select the default home app. Even in settings of the device, there is no option available to choose a default launcher from installed ones. Is there any limitation on creating launcher apps for Android TV boxes?
I did in Manifest.xml file
<!-- Start For Android Tv Box-->
<uses-feature
android:name="android.software.leanback"
android:required="true" />
<uses-feature
android:name="android.software.live_tv"
android:required="false" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<!-- End For Android Tv Box-->
MainActivity is my first activity which is the firest screen of my app.
<activity
android:name=".MainActivity"
android:hardwareAccelerated="false"
android:screenOrientation="landscape"
android:clearTaskOnLaunch="true"
android:stateNotNeeded="true"
android:launchMode="singleInstance"
android:autoRemoveFromRecents="true"
android:resumeWhilePausing="true"
android:resizeableActivity="true"
tools:targetApi="n">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<meta-data android:name="supports_leanback" android:value="true" />
</activity>
When user tapped on Home button of AndroidTv remote Home/Launcher popup should come up and choose a launcher app for AndroidTv device, then whenever user power on device my app should be come as a launcher app.
Making an app as the launcher in Android TV is the same as other android devices. You only need to add a category named android.intent.category.HOME in your activiy's intent-filter. Use the following lines to change your AndroidManifest.xml:
<activity
android:name=".MainActivity"
...>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
...
</intent-filter>
</activity>
I'm following this link to implement localization in Angular using i18n.
When i navigate to "url/en" or "url/fr", instead of pointing to respective directory folders it is trying to search for a route and giving the below error message.
core.js:15723 ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'fr'
I have created this Angular 7 project using VS2019.
For the backend i'm using asp.net core 2.2 web api.
Running following commands shows the page with the correct translations locally.
ng serve --configuration=fr
My angular.json file as shown below.
My Package.json file as shown below
I have configured route in this way in app.modules.ts
RouterModule.forRoot([
{
path:'',
component:HomeComponent,
canActivate:[AuthGuard]
},
I modified the .csproj file in this way.
<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build-locale" />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build-locale:ssr" Condition=" '$(BuildServerSideRenderer)' == 'true' " />
Here are my directory structure
Looks like you should overide the url on Web server level. For example add web.config:
<rule name="FR Rule" stopProcessing="true">
<match url="(fr/)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/fr/" />
</rule>
I need to implement a reverse proxy using only my web.config and I'm having trouble with the 500.52 error. As suggested in many places online, I added the serverVariables section to include the HTTP_ACCEPT_ENCODING variable, but I am met with an error:
Config Error Unrecognized element 'serverVariables'
Below is my web.config.
<rewrite>
<allowedServerVariables>
<add name="HTTP_ACCEPT_ENCODING" />
</allowedServerVariables>
<outboundRules>
<rule name="reverseProxy">
<match pattern="http://linkInCode.com"></match>
<serverVariables>
<set name="HTTP_ACCEPT_ENCODING" value="" />
</serverVariables>
<action type="Rewrite" value="https://linkIWant.com/script.js"></action>
</rule>
</outboundRules>
</rewrite>
What is the problem? ServerVariables should be a recognised element.
You need to have the server variable registered previously in <allowedServerVariables>,
https://learn.microsoft.com/en-us/iis/extensions/url-rewrite-module/url-rewrite-module-20-configuration-reference#Allowed_Server_Variables_List
Using this blog post, I copied the examples given and changed sections for my needs.
<rewrite>
<rules>
<rule name="Rewrite to article.aspx">
<match url="^article/([0-9]+)/([_0-9a-z-]+)" />
<action type="Rewrite" url="https://URLtoHide.com" />
</rule>
</rules>
<outboundRules>
<rule name="Rewrite to clean URL" preCondition="IsHTML">
<match filterByTags="A" pattern="http://http://URLtoShow.com" />
<action type="Rewrite" value="https://URLtoHide.com" />
</rule>
<preConditions>
<preCondition name="IsHTML">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>