assets folder wasn't created in android app whan using phonegap - android

I try to create a mobile app using stand-alone phonegap. When I use the following coding
D:\phonegap-2.8.0\lib\android\bin>create \foldername myapp.package.com proname
there is no assets folder created in the project folder. What can be the reason for that?

It doesn't get created automatically. You will have to create it on your own. Use this tutorial to make a move.

Related

Android 11: Create *package name* folder in Android/data by default?

Im trying to create a specific folder in /Android/data/package name/ from C++. Im using mkdirs for that. Not a big surprise it crashes the whole app because it doesnt have an access to Android/data (that means app cannot create it's own app folder). If i create package name folder by myself, then i can easily create folders and/or files inside it.
How can i do this? Am i missing something?
FIXED: Thanks #blackapps for a hint with getExternalFilesDir! You're lifesaver!

How create folder (and file) within the installation of app in Android?

I want to create a folder with pictures just in installation.
I searched a lot for this but I didn't found nothing but a lots of apps do that. I speciffically mean the Android folder in /storage/emulated/0/ or /sdcard/.
That is not possible, sorry. You are welcome to create directories and files when your app is run by the user. There is no option for doing so just because your app is installed.
you can create the folder after the app is installed.. However you can design your code such that it creates folder while loading the Application for first time.

Access folder throughout Xamarin app

Is there any folder that can be accessed through a Xamarin.Forms app? The app will be deployed to Android, iOS and as a UWP app. I have a database file and so far, I am using SpecialFolders.Personal, which works for Android and iOS, but not UWP. I would need to get permission for this folder in Windows.
So is there any folder I can use across all 3 devices for which I don't need any special permissions?
Xamarin.Forms has provided Environment.SpecialFolder.LocalApplicationData enum that use to get universal storage path. And it need to be combined with Environment.GetFolderPath method.
var ApplicationDataPath = Environment.GetFolderPath(SpecialFolder.LocalApplicationData);
For more please refer File Handling in Xamarin.Forms

Reference a local file in my phonegap android app

I am trying to reference a local html file in my phonegap android app. I am seeing where something like www/myapp_name/somefile.html does not work, is there a away to do this?
You don't have to add the www. If you structure is as follow
/myprojectname/www/index.html
/myprojectname/www/contact.html
And you wish to make a link from index.html to contact.html you can juse use
contact.html
Just use the relative path. Don't add a / up front.

how to open Iphone's database(created) in Android?

Database is created in Iphone using SQLite.Now I want to use same database file in Android and insert the data into tables.How to do that?
Android Developer
The easiest way is to copy the file in your applications folder say assets folder and copy the database from the local file, first time the app is loading.
this link will give you a solution.

Categories

Resources