Skip to Content
0
Former Member
Jun 25, 2015 at 09:24 AM

Adapter class in Agentry Android Client Solution not working.

39 Views

Hello Experts,

Bill Froelich

Pratik Chavan

renos renosa

I want to call google map on agentry client for that I generate one new class i.e. ZDisplay and extend it by ExternalDataDisplayAdapter.

Here is my Code :

package com.sap.mobile.platform.client.openui.extensions;

import android.content.Context;

import android.view.View;

import android.webkit.WebView;

import android.widget.LinearLayout;

import com.sap.mobile.platform.client.openui.adapters.ExternalDataDisplayAdapter;

import com.sap.mobile.platform.client.openui.models.ExternalDataDisplayModel;

public class ZDisplay extends ExternalDataDisplayAdapter {

ExternalDataDisplayModel _model;

Context _context;

@Override

public void initialize(ExternalDataDisplayModel model, Context context) {

// TODO Auto-generated method stub

System.out.println("In initialize1");

_model = model;

_context = context;

System.out.println("In initialize");

}

@Override

public View getView() {

System.out.println("In getView");

WebView webview = null;

if (_context != null) {

LinearLayout ll = new LinearLayout(_context);

ll.setOrientation(LinearLayout.VERTICAL);

webview = new WebView(_context);

webview.loadUrl("http://google.com/");

// WebView browser = null;

// browser.loadUrl("https://www.google.co.in/");

}

return webview;

}

}

Also I add my class name in Agentry and take External field as a value. But I got blank screen even don't get print statements in logcat.also I add Toast there but nothing display on screen.I think that the control not get into my class that's why not a single print statement couldn't display.

But why I cant get the error so I am unable to findout the solution.Is there anyone face the same issue or have the solution for the same.

Regards

Prajakta