Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
8a64baca
Commit
8a64baca
authored
Jul 23, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #241 from abarth/sky_shell_apk
Create a SkyShell.apk
parents
765881f2
c14ba336
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
39 deletions
+8
-39
README.md
packages/flutter/README.md
+3
-3
BUILD.gn
packages/flutter/example/demo_launcher/apk/BUILD.gn
+0
-4
SkyDemoApplication.java
...launcher/apk/org/domokit/sky/demo/SkyDemoApplication.java
+0
-27
sky_tool
packages/flutter/lib/sky_tool
+5
-5
No files found.
packages/flutter/README.md
View file @
8a64baca
...
...
@@ -68,19 +68,19 @@ Running a Sky application
-------------------------
The
`sky`
pub package includes a
`sky_tool`
script to assist in running
Sky applications inside the
`Sky
Demo
.apk`
harness. The
`sky_tool`
script
Sky applications inside the
`Sky
Shell
.apk`
harness. The
`sky_tool`
script
expects to be run from the root directory of your application's package (i.e.,
the same directory that contains the
`pubspec.yaml`
file). To run your app,
follow these instructions:
-
`./packages/sky/sky_tool start`
to start the dev server and upload your
app to the device.
(NOTE: add a
`--install`
flag to install
`Sky
Demo
.apk`
if it is not already
(NOTE: add a
`--install`
flag to install
`Sky
Shell
.apk`
if it is not already
installed on the device.)
-
Use
`adb logcat`
to view any errors or Dart
`print()`
output from the app.
`adb logcat -s sky`
can be used to filter only adb messages from
`Sky
Demo
.apk`
.
`Sky
Shell
.apk`
.
Debugging
---------
...
...
packages/flutter/example/demo_launcher/apk/BUILD.gn
View file @
8a64baca
...
...
@@ -17,10 +17,6 @@ android_library("java") {
"//base:base_java",
"//mojo/public/java:bindings",
"//mojo/public/java:system",
"//mojo/services/sensors/public/interfaces:interfaces_java",
"//services/sensors:sensors_lib",
"//sky/services/media:media_lib",
"//sky/services/media:interfaces_java",
"//sky/shell:java",
]
}
...
...
packages/flutter/example/demo_launcher/apk/org/domokit/sky/demo/SkyDemoApplication.java
View file @
8a64baca
...
...
@@ -6,15 +6,7 @@ package org.domokit.sky.demo;
import
android.content.Context
;
import
org.chromium.mojo.sensors.SensorServiceImpl
;
import
org.chromium.mojo.system.Core
;
import
org.chromium.mojo.system.MessagePipeHandle
;
import
org.chromium.mojom.media.MediaService
;
import
org.chromium.mojom.sensors.SensorService
;
import
org.domokit.media.MediaServiceImpl
;
import
org.domokit.sky.shell.ResourceExtractor
;
import
org.domokit.sky.shell.ServiceFactory
;
import
org.domokit.sky.shell.ServiceRegistry
;
import
org.domokit.sky.shell.SkyApplication
;
/**
...
...
@@ -35,23 +27,4 @@ public class SkyDemoApplication extends SkyApplication {
super
.
onBeforeResourceExtraction
(
extractor
);
extractor
.
addResources
(
DEMO_RESOURCES
);
}
@Override
public
void
onServiceRegistryAvailable
(
ServiceRegistry
registry
)
{
super
.
onServiceRegistryAvailable
(
registry
);
registry
.
register
(
SensorService
.
MANAGER
.
getName
(),
new
ServiceFactory
()
{
@Override
public
void
connectToService
(
Context
context
,
Core
core
,
MessagePipeHandle
pipe
)
{
SensorService
.
MANAGER
.
bind
(
new
SensorServiceImpl
(
context
),
pipe
);
}
});
registry
.
register
(
MediaService
.
MANAGER
.
getName
(),
new
ServiceFactory
()
{
@Override
public
void
connectToService
(
Context
context
,
Core
core
,
MessagePipeHandle
pipe
)
{
MediaService
.
MANAGER
.
bind
(
new
MediaServiceImpl
(
context
,
core
),
pipe
);
}
});
}
}
packages/flutter/lib/sky_tool
View file @
8a64baca
...
...
@@ -21,9 +21,9 @@ SKY_PACKAGE_ROOT = os.path.realpath(os.path.dirname(LIB_DIR))
SKY_SERVER_PORT
=
9888
OBSERVATORY_PORT
=
8181
APK_NAME
=
'Sky
Demo
.apk'
ANDROID_PACKAGE
=
"org.domokit.sky.
demo
"
ANDROID_COMPONENT
=
'
%
s/
%
s.Sky
Demo
Activity'
%
(
ANDROID_PACKAGE
,
ANDROID_PACKAGE
)
APK_NAME
=
'Sky
Shell
.apk'
ANDROID_PACKAGE
=
"org.domokit.sky.
shell
"
ANDROID_COMPONENT
=
'
%
s/
%
s.SkyActivity'
%
(
ANDROID_PACKAGE
,
ANDROID_PACKAGE
)
# FIXME: This assumes adb is in $PATH, we could look for ANDROID_HOME, etc?
ADB_PATH
=
'adb'
# FIXME: Do we need to look in $DART_SDK?
...
...
@@ -243,7 +243,7 @@ class StartTracing(object):
def
run
(
self
,
args
,
pids
):
subprocess
.
check_output
([
ADB_PATH
,
'shell'
,
'am'
,
'broadcast'
,
'-a'
,
'org.domokit.sky.
demo
.TRACING_START'
])
'-a'
,
'org.domokit.sky.
shell
.TRACING_START'
])
TRACE_COMPLETE_REGEXP
=
re
.
compile
(
'Trace complete'
)
...
...
@@ -260,7 +260,7 @@ class StopTracing(object):
subprocess
.
check_output
([
ADB_PATH
,
'logcat'
,
'-c'
])
subprocess
.
check_output
([
ADB_PATH
,
'shell'
,
'am'
,
'broadcast'
,
'-a'
,
'org.domokit.sky.
demo
.TRACING_STOP'
])
'-a'
,
'org.domokit.sky.
shell
.TRACING_STOP'
])
device_path
=
None
is_complete
=
False
while
not
is_complete
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment