™ İçin Özel Almasıyla bir Eklenti Kurmak (iOS ve Android)oluşturmak | Netgez.com
SORU
12 ŞUBAT 2013, Salı


™ İçin Özel Almasıyla bir Eklenti Kurmak (iOS ve Android)oluşturmak

Benim ™ her uygulama çalışıyor, Analitik ve FacebookConnect eklentileri de dahil olmak üzere İnşa. Ancak, şimdi Almasıyla reklamları eklemek istiyorum.

™ İnşa sağlamaz yerleşik bir eklenti Almasıyla, ama göre Phonegap Build Plugins page, şimdi sen-ebilmek eklemek senin kendi özel eklentileri (bkz Katkıda Eklentileri, alt sayfa).

™ ™ Uyumlu Eklentileri ile İnşa ile yapılabilir kullanım plugin.xml bir dosya...

Bu ™ Eklentileri sayfa referanslar özel plugin.xml kurulum için nasıl bir örnek olarak Child Browser plugins.xml on GitHub Yapı. Aşağıda Çocuk Tarayıcı plugin.xml içeriği.

Değiştirmek için neye ihtiyacım var ve bunları değiştirmek için ne olduğundan emin değilim. Bence ben doğru Kur dosya yapısı ™ Almasıyla Eklentileri için hem iOS Android (bkz: dosya yapısı aşağıda), ama emin değilim nasıl bir başvuru bu dosyaları doğru olarak plugin.xml dosya.

<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
    xmlns:android="http://schemas.android.com/apk/res/android"
    id="com.phonegap.plugins.childbrowser"
    version="3.0.4">

    <name>Child Browser</name>

    <asset src="www/childbrowser.js" target="childbrowser.js" />
    <asset src="www/childbrowser" target="childbrowser" />

    <!-- android -->
    <platform name="android">
        <config-file target="AndroidManifest.xml" parent="/manifest/application">
            <activity android:name="com.phonegap.plugins.childBrowser.ChildBrowser"
                      android:label="@string/app_name">
                <intent-filter>
                </intent-filter>
            </activity>
        </config-file>

        <!-- Cordova 1.5 - 1.9 -->
        <config-file target="res/xml/plugins.xml" parent="/plugins">
            <plugin name="ChildBrowser"
                value="com.phonegap.plugins.childBrowser.ChildBrowser"/>
        </config-file>

        <!-- Cordova 2.0.0 -->
        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
            <plugin name="ChildBrowser"
                value="com.phonegap.plugins.childBrowser.ChildBrowser"/>
        </config-file>

        <source-file src="src/android/ChildBrowser.java"
                target-dir="src/com/phonegap/plugins/childBrowser" />
    </platform>
    <!-- ios -->
    <platform name="ios">
        <plugins-plist key="ChildBrowser"
                    string="ChildBrowserCommand" />

        <resource-file src="ChildBrowser.bundle" />
        <resource-file src="ChildBrowserViewController.xib" />

        <header-file src="ChildBrowserCommand.h" />
        <header-file src="ChildBrowserViewController.h" />

        <source-file src="ChildBrowserCommand.m" />
        <source-file src="ChildBrowserViewController.m" />
    </platform>
</plugin>

App Dosya Yapısı

/index.html 
/config.xml 
  /adMob 
    /plugin.xml 
    /src
      /iOS 
        /GADAdMobExtras.h (from AdMob iOS SDK)
        /GADAdNetworkExtras.h (from AdMob iOS SDK)
        /GADAdSize.h (from AdMob iOS SDK)
        /GADBannerView.h (from AdMob iOS SDK)
        /GADBannerViewDelegate.h (from AdMob iOS SDK)
        /GADInterstitial.h (from AdMob iOS SDK)
        /GADInterstitialDelegate.h (from AdMob iOS SDK)
        /GADRequest.h (from AdMob iOS SDK)
        /GADRequestError.h (from AdMob iOS SDK)
        /libGoogleAdMobAds.a (from AdMob iOS SDK)
        /AdMobPlugin.h (from Phonegap Plugin for iOS)
        /AdMobPlugin.js (from Phonegap Plugin for iOS)
        /AdMobPlugin.m (from Phonegap Plugin for iOS)
      /android
        /AdMobPlugin.java (from Phonegap Plugin for Android)
        /AdMobPlugin.js (from Phonegap Plugin for Android)
        /GoogleAdMobAdsSdk-6.2.1.jar (from AdMob Android SDK)

Phonegap Plugin for iOS< / ^ br . AdMob iOS SDK< / ^ br . Phonegap Plugin for Android< / ^ br . AdMob Android SDK< / ^ br .

CEVAP
11 Aralık 2014, PERŞEMBE


Bu, bugün imkansız gibi beri eski cevaplanmamış bir soru. Ama ™ kendi kuralları değişikliği açıkladı: see here, şimdi Olası dış eklentileri kullanın. Senin ™ için Almasıyla Reklam ekleme uygulaması, config.html dosyasını düzenlemek ve aşağıdaki kodu yer İnşa:

<gap:plugin name="com.admob.google" source="plugins.cordova.io" />

Eklenti yazarı ve canlı bir demo görebilirsiniz uygulama sadece Android için) here ediyorum

Bunu PaylaÅŸ:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VÄ°DEO

Rastgele Yazarlar

  • cdgotx

    cdgotx

    8 Kasım 2011
  • Electro Posé

    Electro PosÃ

    21 ÅžUBAT 2013
  • Jeremy Stark

    Jeremy Stark

    23 Mayıs 2010