René's URL Explorer Experiment


Title: Adding file to Android build at app/src/main/assets for `getAssets()` · Issue #3560 · NativeScript/NativeScript · GitHub

Open Graph Title: Adding file to Android build at app/src/main/assets for `getAssets()` · Issue #3560 · NativeScript/NativeScript

X Title: Adding file to Android build at app/src/main/assets for `getAssets()` · Issue #3560 · NativeScript/NativeScript

Description: Dear friend, we, the rest of the NativeScript community really appreciate your feedback! While we are doing all we can to take care of every issue, sometimes we get overwhelmed. Because of that, we will consider issues that are not const...

Open Graph Description: Dear friend, we, the rest of the NativeScript community really appreciate your feedback! While we are doing all we can to take care of every issue, sometimes we get overwhelmed. Because of that, we...

X Description: Dear friend, we, the rest of the NativeScript community really appreciate your feedback! While we are doing all we can to take care of every issue, sometimes we get overwhelmed. Because of that, we...

Opengraph URL: https://github.com/NativeScript/NativeScript/issues/3560

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Adding file to Android build at app/src/main/assets for `getAssets()`","articleBody":"Dear friend, we, the rest of the NativeScript community really\r\nappreciate your feedback! While we are doing all we can to take care of every\r\nissue, sometimes we get overwhelmed. Because of that, we will consider issues\r\nthat are not constructive or problems that cannot be reproduced \"dead\".\r\nAdditionally, we will treat feature requests or bug reports with unanswered\r\nquestions regarding the behavior/reproduction for more than 20 days \"dead\". All\r\n\"dead\" issues will get closed.\r\n\r\n## Please, provide the details below:\r\n\r\nTrying to build a plugin which is calling the following code:\r\n\r\n```\r\n public static Cancellable fromAssetFileName(Context context, String fileName, OnCompositionLoadedListener loadedListener) {\r\n        InputStream stream;\r\n        try {\r\n            stream = context.getAssets().open(fileName);\r\n        } catch (IOException e) {\r\n            throw new IllegalStateException(\"Unable to find file \" + fileName, e);\r\n        }\r\n        return fromInputStream(context, stream, loadedListener);\r\n    }\r\n```\r\n\r\nThe public method to get to that ^^^ is just accepting a string for the `fileName` argument. The README for the android lib says to put the file at `app/src/main/assets`. I've tried creating an `assets` folder in app_resources which obviously doesn't package up there. I've tried at the root of the `app` folder and no good. So is there some way to add files (this is a .json file) to that location for an android build with NS. The android code calling `getAssets()` returns the [AssetManager](https://developer.android.com/reference/android/content/res/AssetManager.html) and is calling `open()` with the given file name. So how do we get files to be accessible with this in a NS app is the question now that I think about it 😄 \r\n\r\n\r\n### Did you verify this is a real problem by searching [Stack Overflow](http://stackoverflow.com/questions/tagged/nativescript) and the [other open issues in this repo](https://github.com/NativeScript/nativescript/issues)?\r\n\r\nYes.\r\n\r\n### Which platform(s) does your issue occur on?\r\n\r\nAndroid\r\n\r\n### Please provide the following version numbers that your issue occurs with:\r\n\r\nNS 2.5 everything - just updated.\r\n\r\n### Please tell us how to recreate the issue in as much detail as possible.\r\n\r\nCreate an app, try to create an .apk with a file located in `app/src/main/assets` at the output I suppose.\r\n\r\n### Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.\r\n\r\nNo, just wrapping a lib.\r\n\r\n","author":{"url":"https://github.com/bradmartin","@type":"Person","name":"bradmartin"},"datePublished":"2017-02-02T06:33:15Z","url":"https://github.com/NativeScript/NativeScript/issues/3560"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b5d0ba4b-bf8b-a47d-3988-d443791dcf96
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB58C:1F65:3A4A03:49BADC:6B012416
html-safe-nonce5289587988dc9786be87bd9a595bf11358512a9089fcae753a1c90a384ddf157
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNThDOjFGNjU6M0E0QTAzOjQ5QkFEQzo2QjAxMjQxNiIsInZpc2l0b3JfaWQiOiIzODYxMzE3ODExNTYxMzc0NzQyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac6863aebffe96084d82f6283667deb4fdae01c4ff5688fa23ef5ccfa4bccac990
hovercard-subject-tagissue:204793428
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/3560/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5541e965714daad4254bd6df731760c4badb056e3a303d42397676bf7e848814/NativeScript/NativeScript/issues/3560
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5541e965714daad4254bd6df731760c4badb056e3a303d42397676bf7e848814/NativeScript/NativeScript/issues/3560
og:image:altDear friend, we, the rest of the NativeScript community really appreciate your feedback! While we are doing all we can to take care of every issue, sometimes we get overwhelmed. Because of that, we...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebradmartin
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id31492490
octolytics-dimension-repository_nwoNativeScript/NativeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31492490
octolytics-dimension-repository_network_root_nwoNativeScript/NativeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/NativeScript/NativeScript/issues/3560#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F3560
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F3560
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=NativeScript%2FNativeScript
Reloadhttps://github.com/NativeScript/NativeScript/issues/3560
Reloadhttps://github.com/NativeScript/NativeScript/issues/3560
Reloadhttps://github.com/NativeScript/NativeScript/issues/3560
NativeScripthttps://github.com/NativeScript
NativeScripthttps://github.com/NativeScript/NativeScript
Codehttps://github.com/NativeScript/NativeScript
Issues231 (231)https://github.com/NativeScript/NativeScript/issues
Pull requests107 (107)https://github.com/NativeScript/NativeScript/pulls
Discussionshttps://github.com/NativeScript/NativeScript/discussions
Actionshttps://github.com/NativeScript/NativeScript/actions
Projectshttps://github.com/NativeScript/NativeScript/projects
Wikihttps://github.com/NativeScript/NativeScript/wiki
Security and qualityhttps://github.com/NativeScript/NativeScript/security
Insightshttps://github.com/NativeScript/NativeScript/insights
https://github.com/NativeScript/NativeScript
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/3560
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/3560
Adding file to Android build at app/src/main/assets for getAssets()https://github.com/NativeScript/NativeScript/issues/3560#top
https://github.com/bradmartin
bradmartinhttps://github.com/bradmartin
on Feb 2, 2017https://github.com/NativeScript/NativeScript/issues/3560#issue-204793428
AssetManagerhttps://developer.android.com/reference/android/content/res/AssetManager.html
Stack Overflowhttp://stackoverflow.com/questions/tagged/nativescript
other open issues in this repohttps://github.com/NativeScript/nativescript/issues
bradmartinhttps://github.com/bradmartin
on Feb 2, 2017https://github.com/NativeScript/NativeScript/issues/3560#event-945965783
https://github.com/bradmartin
bradmartinhttps://github.com/bradmartin
on Feb 2, 2017https://github.com/NativeScript/NativeScript/issues/3560#issuecomment-276881009
https://github.com/bradmartin
bradmartinhttps://github.com/bradmartin
on Feb 2, 2017https://github.com/NativeScript/NativeScript/issues/3560#issuecomment-276883655
petekanevhttps://github.com/petekanev
completedhttps://github.com/NativeScript/NativeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Feb 2, 2017https://github.com/NativeScript/NativeScript/issues/3560#event-946055369
https://github.com/petekanev
petekanevhttps://github.com/petekanev
on Feb 2, 2017https://github.com/NativeScript/NativeScript/issues/3560#issuecomment-276897409
NativeScript/android-runtime #700https://github.com/NativeScript/android-runtime/issues/700
ZenHubhttps://www.zenhub.com/
https://github.com/apps/lock
lockhttps://github.com/apps/lock
on Aug 29, 2019https://github.com/NativeScript/NativeScript/issues/3560#issuecomment-525977084
lockhttps://github.com/apps/lock
on Aug 29, 2019https://github.com/NativeScript/NativeScript/issues/3560#event-2592337827
Sign up for freehttps://github.com/signup?return_to=https://github.com/NativeScript/NativeScript/issues/3560
Sign in to commenthttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/3560
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.