hyperion_android.pdf

7166bc2cbc462ab5fd1987a76d0fe709?s=47 takahirom
April 13, 2018
9

 hyperion_android.pdf

7166bc2cbc462ab5fd1987a76d0fe709?s=128

takahirom

April 13, 2018
Tweet

Transcript

  1. 2.

    荈ⴓחאְג ˖ UBLBIJSPN !OFX@SVOOBCMF  ˖ 劤せכ嬁「䃨峔 ׭׿ׄױ׋ַמ׹  ˖

    "OESPJEָ㥨ֹדׅկ ˖ "CFNB57ך"OESPJE،فٔ׾⡲׏גְתׅկ
  2. 3.

    ˖ رغحؚ儗ך׫剣⸬חׇׁ׷ךٓ؎ـٓٔ ˖ 4UFUIPװ-FBL$BOBSZծ%FCVH"MUFSזו הずׄ ˖ سٗٙ٦חرغحًؚصُ٦׾鷄⸇דֹ׷ ˖ ♧א♧אךًصُ٦ָהג׮⤑ⵃ ˖

    䭁䓸䚍ָ֮׷
 (PPHMF"VUP4FSWJDFח״׶ծEFQFOEFODZ ח鷄⸇ׅ׷׌ֽדծ؝٦س׾箟꧊ׇ׆חر غحؚ堣腉׾鷄⸇דֹ׷ )ZQFSJPO"OESPJEהכ
  3. 4.
  4. 19.

    ˖ )ZQFSJPOָ剑倜ך4VQQPSU-JCSBSZזו׾⢪׏גְ׷ךָ⾱㔓 ד׃׋կ %BUB#JOEJOHך#JOEJOH欰䧭ך
 ؒٓ٦חז׷ +--- com.willowtreeapps.hyperion:hyperion-core:0.9.21 | +--- com.willowtreeapps.hyperion:hyperion-plugin:0.9.21

    | +--- com.android.support:appcompat-v7:27.1.0 (*) | +--- com.android.support:recyclerview-v7:27.1.0 (*) | \--- com.google.dagger:dagger:2.15 | \--- javax.inject:javax.inject:1 ̒؝ٖ
  5. 20.

    ["hyperion-core", "hyperion-attr", "hyperion-measurement", "hyperion- disk", "hyperion-recorder","hyperion-phoenix","hyperion-crash"].forEach { debugImplementation ("com.willowtreeapps.hyperion:$it:0.9.20"){ exclude

    group: 'com.android.support' exclude group: 'com.google.dagger' } } ·ͨ͸ɺҎԼͷΑ͏ʹόʔδϣϯΛݻఆͯ͋͛͠Δ͜ͱͰରԠͰ͖·͢ɻ
 (STAR_ZERO͞Μ͋Γ͕ͱ͏͍͟͝·͢) configurations.all { resolutionStrategy { eachDependency { DependencyResolveDetails details -> if (details.requested.group == 'com.android.support') { details.useVersion '26.1.0' } } } } %BUB#JOEJOHך#JOEJOH欰䧭ך
 ؒٓ٦חז׷ ⟃♴ך״ֲחꤐ㢩ׅ׷
 鷞ח)ZQFSJPOֲָתֻ⹛ַזֻז׷鿇ⴓָ֮׷ַ׮׃׸תׇ׿կ
  6. 24.

    傀㶷ךرغحًؚصُ٦׾ Ꟛֻ׋׭ח荈ⴓד1MVHJO׾⡲׷ @AutoService(Plugin.class) class HelloWorldPlugin extends Plugin { @Override public

    PluginModule createPluginModule() { return new HelloWorldPluginModule(); } } class HelloWorldPluginModule extends PluginModule { @Override public View createPluginView(@NonNull LayoutInf @NonNull ViewGroup parent) { final TextView textView = new TextView(pare textView.setText("Hello Hyperion Plugin"); textView.setTextSize(50); textView.setOnClickListener(new View.OnClic @Override public void onClick(View v) { Log.d("Hyperion", “goto debugmenu") ҎԼͷΑ͏ͳΫϥεΛ࡞Δɻ
  7. 25.

    @AutoService(Plugin.class) class HelloWorldPlugin extends Plugin { @Override public PluginModule createPluginModule()

    { return new HelloWorldPluginModule(); } } class HelloWorldPluginModule extends PluginModule { @Override public View createPluginView(@NonNull LayoutInflater layoutInflater, @NonNull ViewGroup parent) { final TextView textView = new TextView(parent.getContext()); textView.setText("Hello Hyperion Plugin"); textView.setTextSize(50); textView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Log.d("Hyperion", “goto debugmenu"); } }); return textView; } } "VUP4FSWJDF،ظذ٦ءّٝ׾⢪ֲ
  8. 26.

    @AutoService(Plugin.class) class HelloWorldPlugin extends Plugin { @Override public PluginModule createPluginModule()

    { return new HelloWorldPluginModule(); } } class HelloWorldPluginModule extends PluginModule { @Override public View createPluginView(@NonNull LayoutInflater layoutInflater, @NonNull ViewGroup parent) { final TextView textView = new TextView(parent.getContext()); textView.setText("Hello Hyperion Plugin"); textView.setTextSize(50); textView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Log.d("Hyperion", “goto debugmenu"); } }); return textView; } } 1MVHJOؙٓأ׾⡲׶׉ֿד1MVHJO.PEVMF׾⡲䧭
  9. 27.

    @AutoService(Plugin.class) class HelloWorldPlugin extends Plugin { @Override public PluginModule createPluginModule()

    { return new HelloWorldPluginModule(); } } class HelloWorldPluginModule extends PluginModule { @Override public View createPluginView(@NonNull LayoutInflater layoutInflater, @NonNull ViewGroup parent) { final TextView textView = new TextView(parent.getContext()); textView.setText("Hello Hyperion Plugin"); textView.setTextSize(50); textView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Log.d("Hyperion", “goto debugmenu"); } }); return textView; } } 1MVHJO.PEVMFؙٓأד7JFX׾⡲׏ג鵤ׅ
  10. 28.

    @AutoService(Plugin.class) class HelloWorldPlugin extends Plugin { @Override public PluginModule createPluginModule()

    { return new HelloWorldPluginModule(); } } class HelloWorldPluginModule extends PluginModule { @Override public View createPluginView(@NonNull LayoutInflater layoutInflater, @NonNull ViewGroup parent) { final TextView textView = new TextView(parent.getContext()); textView.setText("Hello Hyperion Plugin"); textView.setTextSize(50); textView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Log.d("Hyperion", “goto debugmenu"); } }); return textView; } } 1MVHJO.PEVMFؙٓأחכ
 葿ղ⤑ⵃזًاحسָ欰ִגְ׷ךדⵃ欽׃ג׫׷ה葺ׁ׉ֲ
  11. 29.

    ،فٔⰻד⢪ֲ1MVHJO׾⡲׷ ㉏겗挿 EFCVHTPVSDF TFU ผϞδϡʔϧ !"VUP4FSWJDFΛ ࢖͏৔߹ º ͳ͔ͥ(PPHMF "VUP4FSWJDF͕


    ࢀরͰ͖ͳ͍ ˚
 ΞϓϦ಺ͷΫϥε͕ ࢀরͰ͖ͳ͍ ،فٔ欽ך فؚٓ؎ָٝ鷄⸇ָꨇ׃ְ
  12. 31.

    1MVHJOָ
 䩛⹛ד鷄⸇דֹ׷״ֲחז׶ת׃׋ PluginSource source = Hyperion.getPluginSource(); class MyPluginSource implements PluginSource

    { private PluginSource originalPluginSource; MyPluginSource(PluginSource originalPluginSource) { this.originalPluginSource = originalPluginSource; } @Override public Set<Plugin> getPlugins() { final HashSet<Plugin> plugins = new HashSet<>(); plugins.addAll(originalPluginSource.getPlugins()); plugins.add(new HelloWorldPlugin()); return plugins; } } Hyperion.setPlugins(new MyPluginSource(source)); 1MVHJO4PVSDF׾XSBQEFMFHBUFׅ׷
  13. 34.

    )ZQFSJPO4JNQMF*UFN app/src/debug/java/.../DebugApp.java // Extends your main Application classs public class

    DebugApp extends App { @Override public void onCreate() { super.onCreate(); final SimpleItem item = new SimpleItem.Builder("all: this is the title") .text("this is the text") .image(R.drawable.ic_list_black_24dp) .clickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(App.this, "click",Toast.LENGTH_SHORT).show(); } }) .build(); SimpleItemHyperionPlugin.addItem(item); 知⽃ח،؎ذي׾鷄⸇דֹ׷׌ֽ IUUQTHJUIVCDPNUBLBIJSPN)ZQFSJPO4JNQMF*UFN )ZQFSJPO"OESPJEך3&"%.&ח׮鯹׶ת׃׋ أة٦ֶ격ְ׃תׅ