custom font for both ios and Android in react native - android

I follow this to install custom in RN.
It works in Android but not in ios.
When running on ios, is shows error with font not found.
How do I make it work for both ios and Android?

Simply create an 'assets' folder in the root of your project (or wherever you want), drop in your font files, and define it in your project's package.json.
"rnpm": {
"assets": ["assets"]
},
Then, run react-native link and besides linking 3rd party modules, it will now also link any fonts you put in there with the respective project files.
from
React Native: Things I wish I knew before starting out.

Related

How to add custom fonts in React Native Version 0.70.5

I am trying to load custom fonts in my React Native App. However, I am using version 0.69 and I don't know how to add them anymore, because:
link and unlink commands have been removed in the favour of autolinking
Removed assets and hooks from react-native.config.js – you'll need to remove these properties from your config
So how can this now be done in Android and iOS now?
You can add your font files to the project's main assets folder, it should automatically link for you but you should still run the following command from your terminal: npx react-native-asset.
Afterwards, you would be able to use your font like normal: fontFamily: 'Awesome-Font'

How to set up an Angular project for iOS universal links and Android asset links to open links in the native mobile apps

Does anyone know how I should set up my Angular project to use native mobile app linkage?
E.g.
iOS: Universal Links: https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html
Android: Digital Asset Links: https://developers.google.com/digital-asset-links/v1/getting-started
Thanks a bunch!
I found out a few things:
1.) I've placed the .well-known folder in the src folder of my angular project. The .well-known folder contains both the apple-app-site-association file for iOS apps, as well as the assetlinks.json for android apps.
2.) In the .angular-cli.json configuration, I've added the .well-known folder to the apps->assets configuration.
3.) For the deployment in the nginx.conf file, I've added:
# Used to open links in the native iOS app, if available
location = /.well-known/apple-app-site-association { }
# Used to open links in the native Android app, if available
location = /.well-known/assetlinks.json { }

Connection with SQLLite on Unity3D using Javascript in Android

How can connect with SQLLite from Android using Unit3D and Javascript?
Someone can'i help me?
Here are the specific steps to getting SQLite set up in your project.
Download SQLite - you'll want the ZIP file with the DLL inside
that's in the Precompiled Binaries for Windows section.
Important Copy sqlite3.dll into your into your project's Plugins folder (make a folder called Plugins if you don't have one).
You won't get a warning if you don't do this, and your project will run fine in the editor, however, it will fail to work when you actually build your project, and will only provide information about this in the log file.
This will give you a License Error if you're using Unity Indie, but it doesn't seem to have an effect on the actual play in the editor, nor does it seem to effect the ability to build stand-alone versions.
Alternately, you can leave it out of your project entirely, but when you build your application, you'll need to include a copy of sqlite3.dll in the same directory as the .exe in order for it to work.
In your project, add in the dbAccess.js file: http://wiki.unity3d.com/index.php/SQLite#dbAccess.js
You should be good to go!
Source (and the above is pretty much copied word-for-word from):
http://wiki.unity3d.com/index.php/SQLite

Cordova plugin with precompiled .so files not loading onto the device

I'm using a 3rd party library that is for an Android app, but I need to use it in a Cordova plugin (Phonegap) and after I build/run debug running on the device, the logger is throwing an error about not being able to find the .so file. They use this file with JNI. How can I ensure that the files are being added to apk? Their documentation states that the files need to go in the libs directory like:
/libs/armeabi-v7a/<filename>.so
I've added them to this directory and it seems that only jar files are being added to the plugin. How can I get this file to load onto the device when building the plugin? I'm using Android Studio 0.3.6 with Android API level 19. ( I can't change the versions because that's what we currently support in our app)
Android studio opens by default in "Android view" wich can be quite confusing.
To change the view you click on the down arrow at the right of the word android just above your project content. If you switch to the project view, you will see something that will be less confusing for you and where what's displayed matches the file system structure.
Then you can copy your .so files in the libs/something folder (something being the name of the processor architecture).
If you switch back to the android view, you will see the file inside jniLibs.
Please pay attention to that topic How to include *.so library in Android Studio?. You need put the files into "app\src\main\jniLibs". In plugin.xml that looks like
<source-file src="src/android/armeabi-v7a/some_file.so" target-dir="app\src\main\jniLibs\armeabi-v7a" />

How to make an executable out of my LIBGDX game

I've never made a program into an executable before, and I've been looking into how to do this for some time now. When I try to put it into a jar everything works fine but when I try to run it nothing happens.
How do I make my game into an executable so it can be run (on windows, not android)
I feel like I am not Linking it to the libraries or something... Not sure.
Thanks!
Edit:
I should add I get the error
JAR export finished with warnings. See details for additional information.
duplicate entry: com/badlogic/gdx/utils/arial-15.fnt
duplicate entry: com/badlogic/gdx/utils/arial-15.fnt
duplicate entry: com/badlogic/gdx/utils/arial-15.png
duplicate entry: com/badlogic/gdx/utils/arial-15.png
Jar export finished with problems.
See details for additional information.
Your problem is that when you use eclipse export as Executable jar file it does not include the assets (graphical, sounds ...) that you used in your gdx project. What you can do manually is either copy your assets folder right next to the generated jar file or include your assets folder in your jar file with your favorite zip management tool.
Another way would be to use this same eclipse export wizard and check "Save as ANT script" and then edit the generated ant file to include all the files and folders needed by your app.
Hope this helps
This is an old question, but if you are using a new version of LibGDX and Gradle you can use the command line to make an executable.
There are several commands, but these are for packaging:
Desktop
gradlew desktop:dist
Android (unsigned)
gradlew android:assembleRelease
iOS
gradlew ios:createIPA
Web
gradlew html:dist
Read more at https://github.com/libgdx/libgdx/wiki/Gradle-on-the-Commandline
I'm assuming your application is setup as the libgdx wiki page suggests (with a "main project" and separate "desktop" and "android" projects that share the sources from the "main" project).
Since your app is written in Java, it requires a JVM to run on a desktop. You have to decide if you want to package that up, or rely on a JVM already being installed by the user. I believe packaging up the JVM with Java class files is very complicated and raises a host of other issues (and it becomes very platform specific). So, I believe most libgdx-based games get distributed as an executable Jar file, which means the user must already have Java. (It works for Minecraft, so its probably good enough for you, too. :)
Eclipse makes that really easy: File -> Export ... -> Java -> Executable Jar File. There may be additional steps required to include assets like your app's images and sounds into this .jar file. (My game is currently "asset free", so I don't have any experience with this part.)
You might also consider side-stepping the desktop executable, and packaging your game as an applet and running it in a web browser so there is very little "installation" required by the folks you want to show it to. Here's a walkthrough for making an applet from a libgdx-based game. (I haven't actually tried this myself yet, but I do have a libgdx-based game that I'm planning on doing this for.)
If you're using Android Studio, you can create a custom configuration to distribute from within the program.
On the Run dropdown list select edit configurations.
Click the "+". Select Gradle.
On the right half of that screen give your configuration a Name.
Gradle Project: Use the browse button to select your desktop application. This will look something like (project name):desktop
Tasks: type "desktop:dist"
Apply.
Close the configuration editor and select your new configuration from the dropdown. Hit run and it should build your project.
Your new Jar file should be located in (ProjectName)/desktop/build/libs

Categories

Resources