{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/3189","labels_url":"https://api.github.com/repos/facebook/react-native/issues/3189/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/3189/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/3189/events","html_url":"https://github.com/facebook/react-native/pull/3189","id":109433914,"number":3189,"title":"[Android] Allow developers to load JavaScript bundle from any source.","user":{"login":"arbesfeld","id":2458431,"avatar_url":"https://avatars.githubusercontent.com/u/2458431?v=3","gravatar_id":"","url":"https://api.github.com/users/arbesfeld","html_url":"https://github.com/arbesfeld","followers_url":"https://api.github.com/users/arbesfeld/followers","following_url":"https://api.github.com/users/arbesfeld/following{/other_user}","gists_url":"https://api.github.com/users/arbesfeld/gists{/gist_id}","starred_url":"https://api.github.com/users/arbesfeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arbesfeld/subscriptions","organizations_url":"https://api.github.com/users/arbesfeld/orgs","repos_url":"https://api.github.com/users/arbesfeld/repos","events_url":"https://api.github.com/users/arbesfeld/events{/privacy}","received_events_url":"https://api.github.com/users/arbesfeld/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react-native/labels/CLA%20Signed","name":"CLA Signed","color":"e7e7e7"},{"url":"https://api.github.com/repos/facebook/react-native/labels/GH%20Review:%20needs-revision","name":"GH Review: needs-revision","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":30,"created_at":"2015-10-02T05:36:18Z","updated_at":"2015-10-13T17:19:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/3189","html_url":"https://github.com/facebook/react-native/pull/3189","diff_url":"https://github.com/facebook/react-native/pull/3189.diff","patch_url":"https://github.com/facebook/react-native/pull/3189.patch"},"body":"This patch adds two pieces of functionality:\r\n\r\n- Exposes `JSBundleLoader` to allow a developer to load JavaScript bundles as they choose.\r\n- Adds `ReactBridge.loadScripFromFile` method which loads a JavaScript bundle from an arbitrary file path.\r\n\r\nExample usage:\r\n\r\n```\r\nJSBundleLoader jsBundleLoader = new JSBundleLoader() {\r\n    @Override\r\n    public void loadScript(ReactBridge reactBridge) {\r\n        reactBridge.loadScriptFromFile(\"/sdcard/Download/index.android.bundle\");\r\n    }\r\n};\r\n\r\nmReactInstanceManager = ReactInstanceManager.builder()\r\n        .setApplication(getApplication())\r\n        .setJSBundleLoader(jsBundleLoader)\r\n        .setJSMainModuleName(\"\") /* necessary due to TODO(6803830) */\r\n        .addPackage(new MainReactPackage())\r\n        .setInitialLifecycleState(LifecycleState.RESUMED)\r\n        .build();\r\n```\r\n\r\ncc @ide "},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/147782544","html_url":"https://github.com/facebook/react-native/pull/3189#issuecomment-147782544","issue_url":"https://api.github.com/repos/facebook/react-native/issues/3189","id":147782544,"user":{"login":"mkonicek","id":346214,"avatar_url":"https://avatars.githubusercontent.com/u/346214?v=3","gravatar_id":"","url":"https://api.github.com/users/mkonicek","html_url":"https://github.com/mkonicek","followers_url":"https://api.github.com/users/mkonicek/followers","following_url":"https://api.github.com/users/mkonicek/following{/other_user}","gists_url":"https://api.github.com/users/mkonicek/gists{/gist_id}","starred_url":"https://api.github.com/users/mkonicek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkonicek/subscriptions","organizations_url":"https://api.github.com/users/mkonicek/orgs","repos_url":"https://api.github.com/users/mkonicek/repos","events_url":"https://api.github.com/users/mkonicek/events{/privacy}","received_events_url":"https://api.github.com/users/mkonicek/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T17:19:09Z","updated_at":"2015-10-13T17:19:09Z","body":"@dsibiski Can you explain more how you would use the API in the React Native Playground use case?"}}