Hallo zusammen,
ich bin der Tom und habe recht wenig Ahnung vom Programieren. Ich habe mir das Programm allerdings direkt gekauft, da ich Eclipse zu kompliziert finde.
Ich habe es allerdings geschafft, durch dieses Forum eine App zu bauen, die meinen internen Browser vom Gerät zu öffnen und eine Rufnummer die ich in die App fest in den Quellcode implementiere anzurufen.
Nun habe ich vor, die Anmeldedaten direkt in den Browser zu übertragen, damit ich die nicht über die Handytastatur eingeben muss.
Hier der Code von der Webseite. Diese soll mit dem Standardbrowser vom Gerät geöffnet werden und in die entsprechenden Felder soll der Benutzername und das Passwort eingetragen werden. wenn dann noch der Automatische Login klappen würde, wäre es perfekt.
Die Seite ist mein Schichtplan.
Hier der Code von meiner App.
Die Rufnummern sind natürlich nicht richtig
Vielleicht kann mir ja geholfen werden.
LG an alle Tom
ich bin der Tom und habe recht wenig Ahnung vom Programieren. Ich habe mir das Programm allerdings direkt gekauft, da ich Eclipse zu kompliziert finde.
Ich habe es allerdings geschafft, durch dieses Forum eine App zu bauen, die meinen internen Browser vom Gerät zu öffnen und eine Rufnummer die ich in die App fest in den Quellcode implementiere anzurufen.
Nun habe ich vor, die Anmeldedaten direkt in den Browser zu übertragen, damit ich die nicht über die Handytastatur eingeben muss.
Hier der Code von der Webseite. Diese soll mit dem Standardbrowser vom Gerät geöffnet werden und in die entsprechenden Felder soll der Benutzername und das Passwort eingetragen werden. wenn dann noch der Automatische Login klappen würde, wäre es perfekt.
Die Seite ist mein Schichtplan.
B4X:
window.onerror=do_nothing;
function do_nothing()
{
return false;
}
if (parent.LID === "" || isNaN(parent.LID)) parent.LID = "1031";
var Lang =
{
LangIds: new Array(1031, 1033, 3082, 1036, 1040, 1053, 2057, 2070, 1043, 1044, 1049, 1045, 1024, 1055, 1035),
Get: function()
{
for (var Index in this.LangIds)
{
var Id = this.LangIds[Index];
if (top.location.search.indexOf(Id) != -1)
{
return Id;
}
}
return 1031;
}
}
logoutLang=0+parseInt("");
if (isNaN(logoutLang)) logoutLang = Lang.Get();
function init()
{
var ExtLoginPath="";
if (ExtLoginPath != "")
{
parent.window.location.href = ExtLoginPath;
}
else
{
detectbrowser();
document.login.bws.value=browser;
changeLang(parent.LID);
document.login.uname.focus();
setLoginBox();
}
}
function setLoginBox()
{
topLoginBox=(document.body.clientHeight/2)-120;
leftLoginBox=(document.body.clientWidth/2)-160;
document.getElementById("divLogin").style.top=topLoginBox;
document.getElementById("divLogin").style.left=leftLoginBox;
}
function changeLang(_mLang)
{
if (_mLang=="1045")
{
document.charset="windows-1250";
document.charachterSet="windows-1250";
}
else if (_mLang=="1049")
{
document.charset="windows-1251";
document.charachterSet="windows-1251";
}
else
{
document.charset="iso-8859-1";
document.charachterSet="iso-8859-1";
}
document.login.usrlang.value=_mLang;
document.login.name.title=document.getElementById("_name").innerHTML;
document.getElementById("_name").innerHTML=_formTooltip[_mLang][0];
document.login.uname.title=document.getElementById("_name").innerHTML;
document.getElementById("_name").innerHTML=_formTooltip[_mLang][1];
document.login.upwd.title=document.getElementById("_name").innerHTML;
document.getElementById("_name").innerHTML=_formTooltip[_mLang][2];
document.login.usrlang.title=document.getElementById("_name").innerHTML;
document.getElementById("_ok").innerHTML=_formTrans[_mLang][3];
document.getElementById("_name").innerHTML=_formTrans[_mLang][0];
document.getElementById("_password").innerHTML=_formTrans[_mLang][1];
document.getElementById("_lang").innerHTML=_formTrans[_mLang][2];
document.getElementById("_infothek_login").innerHTML=_formTrans[_mLang][4];
if (browser==1) document.recalc();
}
function getIEVersionNumber()
{
var ua = navigator.userAgent;
var MSIEOffset = ua.indexOf("MSIE ");
if (MSIEOffset == -1) {
return 0;
} else {
return parseFloat(ua.substring(MSIEOffset + 5, ua.indexOf(";", MSIEOffset)));
}
}
function CheckEnter(e, chkEnter)
{
var code = 0;
if (e.keyCode) code = e.keyCode;
else if (e.which) code = e.which;
var ie = getIEVersionNumber();
if (code==13 || chkEnter == 0)
{
if(document.login.uname.value == '' || document.login.upwd.value == '')
{
top.window.location="/isps/plugins/shtml/"+document.login.failtarget.value+"?usrlang="+document.login.usrlang.value+"&status="+3;
return;
}
if(ie > 0) {
document.login.fireEvent('onsubmit');
}
parent.uname = document.login.uname.value;
parent.upwd = document.login.upwd.value;
parent.LID = document.login.usrlang.value;
parent.target = document.login.target.value;
parent.failtarget = document.login.failtarget.value;
parent.usrsys = 0;
parent.bws = document.login.bws.value;
document.login.submit();
}
return;
}
window.onunload=parent.doLogin;
Hier der Code von meiner App.
Die Rufnummern sind natürlich nicht richtig
B4X:
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim link As String
link= "http://wfm.xxxxxxxxxxxx.net/isps/infothek/index.html"
Dim btnInvision As Button
Dim btnCall1 As Button
Dim btnCall2 As Button
Dim btnCall3 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Tectum")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub btnInvision_Click
Dim i As Intent
i.Initialize(i.ACTION_VIEW,link)
StartActivity(i)
End Sub
Sub btnCall1_Click
Dim result As Int
result = Msgbox2("Teamleiter Handy", "Soll der Teamleiter im Erdgeschoß angerufen werden ?", "Ja", "", "Nein", Null)
If result = DialogResponse.Positive Then
Dim i As Intent
i.Initialize(i.ACTION_CALL, "tel:+492311234567")
StartActivity(i)
End If
End Sub
Sub btnCall2_Click
Dim result As Int
result = Msgbox2("Teamleiter Handy", "Soll der Teamleiter im 1.Obergeschoß angerufen werden ?", "Ja", "", "Nein", Null)
If result = DialogResponse.Positive Then
Dim i As Intent
i.Initialize(i.ACTION_CALL, "tel:+492311234568")
StartActivity(i)
End If
End Sub
Sub btnCall3_Click
Dim result As Int
result = Msgbox2("Teamleiter Handy", "Soll der Teamleiter im 3.Obergeschoß angerufen werden ?", "Ja", "", "Nein", Null)
If result = DialogResponse.Positive Then
Dim i As Intent
i.Initialize(i.ACTION_CALL, "tel:+492311234569")
StartActivity(i)
End If
End Sub
Vielleicht kann mir ja geholfen werden.
LG an alle Tom
Last edited: