2015-10-09 5 views
8

मेरे पास वेबव्यू + लिस्ट व्यू और स्क्रीन के नीचे विज्ञापन दृश्य है। WebView या ListView पुराने डिवाइस (4.0-4.3 एंड्रॉइड) पर भयानक लग रहा है जब तक कि विज्ञापन दृश्य लोड नहीं हो जाता है, फिर यह बहुत आसानी से काम करता है।विज्ञापन दृश्य पूरे ऐप को धीमा कर देता है, संभावित कारण

लॉगकैट दिखाता है कि AdMob अविश्वसनीय रूप से बिना किसी सफलता के कुछ लोड करने का प्रयास करता है .. सफलता और फिर ऐप चिकनी है। क्या यह एक कारण हो सकता है? इसे कैसे जोड़ेंगे?

10-10 01:02:20.954 7160-7214/com.test.test V/webcore﹕ webkitDraw NEW_PICTURE_MSG_ID 
10-10 01:02:20.964 7160-7214/com.test.test V/webcore﹕ WEBKIT_DRAW arg1=0 arg2=0 obj=null 
10-10 01:02:20.974 7160-7214/com.test.test V/webcore﹕ webkitDraw start 
10-10 01:02:20.974 7160-7214/com.test.test V/webcore﹕ webkitDraw NEW_PICTURE_MSG_ID 
10-10 01:02:21.004 7160-7160/com.test.test V/webview﹕ NEW_PICTURE_MSG_ID 
10-10 01:02:21.004 7160-7160/com.test.test V/webview﹕ NEW_PICTURE_MSG_ID 
10-10 01:02:21.004 7160-7214/com.test.test V/webcore﹕ WEBKIT_DRAW arg1=0 arg2=0 obj=null 
10-10 01:02:21.004 7160-7214/com.test.test V/webcore﹕ webkitDraw start 
10-10 01:02:21.014 7160-7214/com.test.test V/webcore﹕ webkitDraw NEW_PICTURE_MSG_ID 
10-10 01:02:21.024 7160-7214/com.test.test V/webcore﹕ WEBKIT_DRAW arg1=0 arg2=0 obj=null 
10-10 01:02:21.024 7160-7214/com.test.test V/webcore﹕ webkitDraw start 
10-10 01:02:21.044 7160-7214/com.test.test V/webcore﹕ webkitDraw NEW_PICTURE_MSG_ID 
10-10 01:02:21.044 7160-7160/com.test.test V/webview﹕ NEW_PICTURE_MSG_ID 
10-10 01:02:21.054 7160-7214/com.test.test V/webcore﹕ WEBKIT_DRAW arg1=0 arg2=0 obj=null 
10-10 01:02:21.054 7160-7214/com.test.test V/webcore﹕ webkitDraw start 
10-10 01:02:21.054 7160-7160/com.test.test V/webview﹕ NEW_PICTURE_MSG_ID 
10-10 01:02:21.054 7160-7214/com.test.test V/webcore﹕ webkitDraw NEW_PICTURE_MSG_ID 
10-10 01:02:21.074 7160-7214/com.test.test V/webcore﹕ WEBKIT_DRAW arg1=0 arg2=0 obj=null 
10-10 01:02:21.074 7160-7214/com.test.test V/webcore﹕ webkitDraw start 
10-10 01:02:21.084 7160-7214/com.test.test V/webcore﹕ webkitDraw NEW_PICTURE_MSG_ID 
10-10 01:02:21.084 7160-7160/com.test.test V/webview﹕ NEW_PICTURE_MSG_ID 
10-10 01:02:21.094 7160-7160/com.test.test V/webview﹕ NEW_PICTURE_MSG_ID 
10-10 01:02:21.104 7160-7214/com.test.test V/webcore﹕ WEBKIT_DRAW arg1=0 arg2=0 obj=null 
10-10 01:02:21.114 7160-7214/com.test.test V/webcore﹕ webkitDraw start 
10-10 01:02:21.114 7160-7214/com.test.test V/webcore﹕ webkitDraw NEW_PICTURE_MSG_ID 
10-10 01:02:21.124 7160-7214/com.test.test V/webcore﹕ WEBKIT_DRAW arg1=0 arg2=0 obj=null 
10-10 01:02:21.134 7160-7160/com.test.test V/webview﹕ NEW_PICTURE_MSG_ID 
10-10 01:02:21.134 7160-7214/com.test.test V/webcore﹕ WEBKIT_DRAW arg1=0 arg2=0 obj=null 
10-10 01:02:21.144 7160-7214/com.test.test V/webcore﹕ webkitDraw start 
10-10 01:02:21.144 7160-7214/com.test.test V/webcore﹕ webkitDraw NEW_PICTURE_MSG_ID 
10-10 01:02:21.164 7160-7214/com.test.test V/webcore﹕ WEBKIT_DRAW arg1=0 arg2=0 obj=null 
10-10 01:02:21.164 7160-7214/com.test.test V/webcore﹕ webkitDraw start 
10-10 01:02:21.164 7160-7214/com.test.test V/webcore﹕ webkitDraw NEW_PICTURE_MSG_ID 
10-10 01:02:21.174 7160-7214/com.test.test V/webcore﹕ WEBKIT_DRAW arg1=0 arg2=0 obj=null 
10-10 01:02:21.184 7160-7160/com.test.test V/webview﹕ NEW_PICTURE_MSG_ID 
10-10 01:02:21.184 7160-7214/com.test.test V/webcore﹕ WEBKIT_DRAW arg1=0 arg2=0 obj=null 
10-10 01:02:21.184 7160-7214/com.test.test V/webcore﹕ webkitDraw start 
10-10 01:02:21.194 7160-7214/com.test.test V/webcore﹕ webkitDraw NEW_PICTURE_MSG_ID 
10-10 01:02:21.194 7160-7160/com.test.test V/webview﹕ NEW_PICTURE_MSG_ID 
10-10 01:02:21.194 7160-7214/com.test.test V/webcore﹕ WEBKIT_DRAW arg1=0 arg2=0 obj=null 
10-10 01:02:21.204 7160-7214/com.test.test V/webcore﹕ webkitDraw start 
10-10 01:02:21.224 7160-7214/com.test.test V/webcore﹕ webkitDraw NEW_PICTURE_MSG_ID 
10-10 01:02:21.234 7160-7160/com.test.test V/webview﹕ NEW_PICTURE_MSG_ID 
10-10 01:02:21.234 7160-7160/com.test.test V/webview﹕ NEW_PICTURE_MSG_ID 
10-10 01:02:22.754 7160-7163/com.test.test D/dalvikvm﹕ GC_CONCURRENT freed 380K, 12% free 7624K/8583K, paused 17ms+38ms, total 102ms 
10-10 01:02:24.514 7160-7214/com.test.test V/webcore﹕ SET_BACKGROUND_COLOR arg1=0 arg2=0 obj=null 
10-10 01:02:24.534 7160-7214/com.test.test V/webcore﹕ SET_ACTIVE arg1=0 arg2=0 obj=null 
10-10 01:02:24.554 7160-7214/com.test.test V/webcore﹕ LOAD_DATA arg1=0 arg2=0 [email protected] 
10-10 01:02:24.564 7160-7160/com.test.test V/webview﹕ WEBCORE_INITIALIZED_MSG_ID 
10-10 01:02:24.714 7160-7160/com.test.test V/webview﹕ setCertificate=null 
10-10 01:02:24.744 7160-7160/com.test.test V/webview﹕ WEBCORE_NEED_TOUCH_EVENTS 
10-10 01:02:24.894 7160-7160/com.test.test V/webview﹕ SELECTION_STRING_CHANGED 
10-10 01:02:24.904 7160-7160/com.test.test V/webview﹕ SELECTION_STRING_CHANGED 
10-10 01:02:24.904 7160-7160/com.test.test V/webview﹕ SELECTION_STRING_CHANGED 
10-10 01:02:24.904 7160-7214/com.test.test V/webcore﹕ didFirstLayout standardLoad =true 
10-10 01:02:24.904 7160-7214/com.test.test V/webcore﹕ Can't get the viewWidth yet 
10-10 01:02:24.914 7160-7160/com.test.test V/webview﹕ SAVE_WEBARCHIVE_FINISHED 
10-10 01:02:25.064 7160-7160/com.test.test I/Ads﹕ Scheduling ad refresh 60000 milliseconds from now. 
10-10 01:02:25.084 7160-7214/com.test.test V/webcore﹕ LOAD_URL arg1=0 arg2=0 [email protected] 
10-10 01:02:25.084 7160-7214/com.test.test V/webcore﹕ CORE loadUrl about:blank 
10-10 01:02:25.224 7160-7214/com.test.test V/webcore﹕ didFirstLayout standardLoad =true 
10-10 01:02:25.234 7160-7214/com.test.test V/webcore﹕ setupViewport mRestoredScale=0.0 mViewScale=1.0 mTextWrapScale=1.0 data.mScale= 1.0 
10-10 01:02:25.234 7160-7214/com.test.test V/webcore﹕ viewSizeChanged w=320; h=50; textwrapWidth=320; scale=1.0 
10-10 01:02:25.244 7160-7214/com.test.test V/webcore﹕ WEBKIT_DRAW arg1=0 arg2=0 obj=null 
10-10 01:02:25.254 7160-7214/com.test.test V/webcore﹕ webkitDraw start 
10-10 01:02:25.254 7160-7214/com.test.test V/webcore﹕ webkitDraw NEW_PICTURE_MSG_ID 
10-10 01:02:25.254 7160-7214/com.test.test V/webcore﹕ LOAD_URL arg1=0 arg2=0 [email protected] 
10-10 01:02:25.264 7160-7214/com.test.test V/webcore﹕ CORE loadUrl javascript:AFMA_updateActiveView({"units":[{"viewBox":{"bottom":480,"right":320,"left":0,"top":0},"isScreenOn":true,"isPaused":false,"adFormat":"320x50_as","localVisibleBoxVisible":false,"activeViewJSON":{"click_string":"BBggidEcYVtTJNpG6pAPDj7qgBAD1k7K5qQIAABABOAHIAQPIA4gEoAYD","active_experiment_ids":"","is_active_view_immediate_enabled":true,"activeview_cpm_urls":[]},"hashCode":"a096ae7d-5728-4f8b-9c0b-95ea0edc1618","afmaVersion":"afma-sdk-a-v8115000.8115000.0","windowVisibility":0,"screenDensity":1,"localVisibleBox":{"bottom":0,"right":0,"left":0,"top":0},"isAttachedToWindow":true,"timestamp":13403686,"globalVisibleBox":{"bottom":0,"right":0,"left":0,"top":0},"isVisible":true,"adBox":{"bottom":430,"right":0,"left":0,"top":430},"hitBox":{"bottom":0,"right":0,"left":0,"top":0},"isMraid":false,"globalVisibleBoxVisible":false,"isStopped":false}]}); 
10-10 01:02:25.364 7160-7160/com.test.test I/Ads﹕ Ad finished loading. 
10-10 01:02:25.594 7160-7160/com.test.test V/webview﹕ setCertificate=null 
10-10 01:02:25.594 7160-7160/com.test.test V/webview﹕ WEBCORE_NEED_TOUCH_EVENTS 
10-10 01:02:25.594 7160-7160/com.test.test V/webview﹕ SELECTION_STRING_CHANGED 
10-10 01:02:25.594 7160-7160/com.test.test V/webview﹕ SELECTION_STRING_CHANGED 
10-10 01:02:25.594 7160-7160/com.test.test V/webview﹕ SELECTION_STRING_CHANGED 
10-10 01:02:25.604 7160-7160/com.test.test V/webview﹕ SAVE_WEBARCHIVE_FINISHED 
10-10 01:02:25.604 7160-7160/com.test.test V/webview﹕ NEW_PICTURE_MSG_ID 
10-10 01:02:25.644 7160-7160/com.test.test V/webview﹕ sendOurVisibleRect=(0,430,r=320,b=480 
10-10 01:02:25.664 7160-7163/com.test.test D/dalvikvm﹕ GC_CONCURRENT freed 324K, 11% free 7716K/8583K, paused 24ms+32ms, total 130ms 
10-10 01:02:26.434 7160-7214/com.test.test V/webcore﹕ LOAD_URL arg1=0 arg2=0 [email protected] 
10-10 01:02:26.434 7160-7214/com.test.test V/webcore﹕ CORE loadUrl javascript:AFMA_updateActiveView({"units":[{"viewBox":{"bottom":480,"right":320,"left":0,"top":0},"isScreenOn":true,"isPaused":false,"adFormat":"320x50_as","localVisibleBoxVisible":false,"activeViewJSON":{"click_string":"BBggidEcYVtTJNpG6pAPDj7qgBAD1k7K5qQIAABABOAHIAQPIA4gEoAYD","active_experiment_ids":"","is_active_view_immediate_enabled":true,"activeview_cpm_urls":[]},"hashCode":"a096ae7d-5728-4f8b-9c0b-95ea0edc1618","afmaVersion":"afma-sdk-a-v8115000.8115000.0","windowVisibility":0,"screenDensity":1,"localVisibleBox":{"bottom":0,"right":0,"left":0,"top":0},"isAttachedToWindow":true,"timestamp":13403836,"globalVisibleBox":{"bottom":0,"right":0,"left":0,"top":0},"isVisible":true,"adBox":{"bottom":430,"right":0,"left":0,"top":430},"hitBox":{"bottom":0,"right":0,"left":0,"top":0},"isMraid":false,"globalVisibleBoxVisible":false,"isStopped":false}]}); 
10-10 01:02:26.474 7160-7214/com.test.test V/webcore﹕ LOAD_URL arg1=0 arg2=0 [email protected] 
10-10 01:02:26.474 7160-7214/com.test.test V/webcore﹕ CORE loadUrl javascript:AFMA_updateActiveView({"units":[{"viewBox":{"bottom":480,"right":320,"left":0,"top":0},"isScreenOn":true,"isPaused":false,"adFormat":"320x50_as","localVisibleBoxVisible":true,"activeViewJSON":{"click_string":"BBggidEcYVtTJNpG6pAPDj7qgBAD1k7K5qQIAABABOAHIAQPIA4gEoAYD","active_experiment_ids":"","is_active_view_immediate_enabled":true,"activeview_cpm_urls":[]},"hashCode":"a096ae7d-5728-4f8b-9c0b-95ea0edc1618","afmaVersion":"afma-sdk-a-v8115000.8115000.0","windowVisibility":0,"screenDensity":1,"localVisibleBox":{"bottom":50,"right":320,"left":0,"top":0},"isAttachedToWindow":true,"timestamp":13404006,"globalVisibleBox":{"bottom":480,"right":320,"left":0,"top":430},"isVisible":true,"adBox":{"bottom":480,"right":320,"left":0,"top":430},"hitBox":{"bottom":50,"right":320,"left":0,"top":0},"isMraid":false,"globalVisibleBoxVisible":true,"isStopped":false}]}); 
10-10 01:02:26.484 7160-7214/com.test.test V/webcore﹕ SET_SCROLL_OFFSET arg1=1 arg2=0 obj=Point(0, 0) 
10-10 01:02:26.514 7160-7214/com.test.test V/webcore﹕ SET_GLOBAL_BOUNDS arg1=0 arg2=0 obj=Rect(0, 430 - 320, 480) 
10-10 01:02:26.524 7160-7214/com.test.test V/webcore﹕ VIEW_SIZE_CHANGED arg1=0 arg2=0 [email protected] 
10-10 01:02:26.524 7160-7214/com.test.test V/webcore﹕ viewSizeChanged w=320; h=50; textwrapWidth=320; scale=1.0 

संपादित करें:

adview Activity.onCreate विधि में बनाया जाता है। शुरुआत पर दृश्यमान। http://pastebin.com/xZ7C8WGK

+0

इस बारे में कोड कि आप विज्ञापन कैसे जोड़ रहे हैं और जब आप इसे जोड़ रहे हैं तो यह अच्छा होगा –

+0

क्या यह था। यदि आपके पास थोड़ी देर है तो देखो। – ElSajko

+0

मैंने इसे देखा और सबकुछ अच्छा दिखता है। जैसा कि मैंने आपकी लॉग फ़ाइल से देखा है वेब व्यू कुछ "कर रहा है"। शायद समस्या लेआउट से आता है। क्या आपके पास हार्डवेयर त्वरण है? क्या ऐप व्यू दिखाने से वेब/सूचीदृश्य की आवश्यकता होती है। क्या एनीमेशन दिखाने के लिए है और क्या कोई कारण है कि यह एनीमेशन प्रत्येक फ्रेम पर लेआउट गणना का कारण बन सकता है? –

उत्तर

2

अधिकतर यह एक समस्या है। इसे आसानी से AdView (यदि मैं आपको सही ढंग से समझता हूं) को हटाकर चेक किया जा सकता है मुझे आपके एप्लिकेशन के विनिर्देशों को नहीं पता है, लेकिन मैं आपको Crosswalk Project आज़माने की सलाह देता हूं।

सामान्य रूप से, Admob के साथ सिंक्रोनस होने के साथ काम करें, लेकिन आप इसके निर्माण के लिए AsyncTask का उपयोग करने का प्रयास कर सकते हैं। वैकल्पिक रूप से, आप तुरंत विज्ञापन चलाने की कोशिश कर सकते हैं, लेकिन कुछ समय बाद।

फिर भी मैं Admob के लिए third-party plug-in का उपयोग करने का प्रयास करने की सलाह दे सकता हूं।

अंत में, मामला एक अस्थिर इंटरनेट चैनल में हो सकता है। मैं बस इतना सोच सकता था। मुझे आशा है कि सब कुछ ठीक रहेगा।

+0

क्रॉसवॉक प्रोजेक्ट का उपयोग नहीं कर सकता है, क्योंकि वे सेवा संदर्भ के साथ दृश्य को तुरंत चालू करने की अनुमति नहीं देते हैं (इसके अलावा यह एपीके में 20 एमबी अतिरिक्त जोड़ता है) AsyncTask विज्ञापन विज्ञापन में विज्ञापन लोड करने के लिए निर्माण AdView ऑब्जेक्ट, या ASyncTask? मैं तीसरे पक्ष के प्लग-इन पर एक नज़र डालेगा, यह नहीं पता था कि admob के लिए विकल्प है, लेकिन अभी भी admob से जुड़ा हुआ है। अस्थिर इंटरनेट चैनल कोई मामला नहीं है, क्योंकि कई उपयोगकर्ता इसका अनुभव करते हैं। – ElSajko

+0

सभी के लिए एक कार्य का उपयोग करने का प्रयास करें। यह सिर्फ एक विचार है। तो मैं तीसरे पक्ष के प्लग-इन देखने की सलाह देता हूं। सौभाग्य। मुझे खेद है कि मैं मदद नहीं कर सकता। – user2413972

2

मेरे पास एक साधारण एनीमेशन है जो ऐप शुरू होने पर चलता है, यह AdMob विज्ञापनों को रखने से पहले आसानी से चलाने के लिए प्रयुक्त होता है, जाहिर है AdMob को शुरू करने के लिए बहुत से संसाधनों की आवश्यकता होती है।

इसलिए मेरा समाधान एनिमेशन समाप्त होने की प्रतीक्षा करना था, फिर विज्ञापन लोड करना शुरू करें।

Handler handler = new Handler(); 
handler.postDelayed(new Runnable() { 
    @Override 
    public void run() { 
      AdRequest bannerRequest = new AdRequest.Builder().build(); 
      mAdView.loadAd(bannerRequest); 
    } 
},2000); 

एडमोब शुरू करने में केवल धीमा है, इसलिए इसने शुरुआत को हल किया।

संबंधित मुद्दे