Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hds
flexin
android-app
Commits
4d630f11
Commit
4d630f11
authored
Nov 05, 2017
by
Nastuzzi Samy
Browse files
Reload bug
Stop reloading all time Return to main activity if disconnected
parent
78e437dc
Changes
5
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/fr/utc/simde/payutc/ArticleGroupActivity.java
View file @
4d630f11
...
...
@@ -180,13 +180,6 @@ public abstract class ArticleGroupActivity extends BaseActivity {
});
}
@Override
public
void
onRestart
()
{
super
.
onRestart
();
startArticleGroupActivity
(
ArticleGroupActivity
.
this
);
}
@Override
protected
void
onIdentification
(
final
String
badgeId
)
{
if
(
dialog
.
isShowing
())
...
...
app/src/main/java/fr/utc/simde/payutc/BuyerInfoActivity.java
View file @
4d630f11
...
...
@@ -83,13 +83,6 @@ public class BuyerInfoActivity extends BaseActivity {
}
}
@Override
public
void
onRestart
()
{
super
.
onRestart
();
startBuyerInfoActivity
(
BuyerInfoActivity
.
this
,
this
.
badgeId
);
}
@Override
protected
void
onIdentification
(
final
String
badgeId
)
{
}
...
...
app/src/main/java/fr/utc/simde/payutc/FoundationListActivity.java
View file @
4d630f11
...
...
@@ -46,13 +46,6 @@ public class FoundationListActivity extends BaseActivity {
}
}
@Override
public
void
onRestart
()
{
super
.
onRestart
();
startFoundationListActivity
(
FoundationListActivity
.
this
);
}
@Override
protected
void
onIdentification
(
final
String
badgeId
)
{}
...
...
app/src/main/java/fr/utc/simde/payutc/MainActivity.java
View file @
4d630f11
...
...
@@ -95,13 +95,6 @@ public class MainActivity extends BaseActivity {
setConfig
();
}
@Override
public
void
onRestart
()
{
super
.
onRestart
();
startMainActivity
(
MainActivity
.
this
);
}
@Override
protected
void
onDestroy
()
{
super
.
onDestroy
();
...
...
app/src/main/java/fr/utc/simde/payutc/tools/NemopaySession.java
View file @
4d630f11
...
...
@@ -101,7 +101,7 @@ public class NemopaySession {
public
int
cancelTransaction
(
final
int
foundationId
,
final
int
purchaseId
)
throws
Exception
{
if
(!
isConnected
())
throw
new
Exception
(
"Not connect
ed
"
);
throw
new
Exception
(
this
.
notLogg
ed
);
return
request
(
"POSS3"
,
...
...
@@ -118,7 +118,7 @@ public class NemopaySession {
public
int
setTransaction
(
final
String
badgeId
,
final
List
<
Integer
>
articleList
)
throws
Exception
{
if
(!
isConnected
())
throw
new
Exception
(
"Not connect
ed
"
);
throw
new
Exception
(
this
.
notLogg
ed
);
if
(
this
.
foundationId
==
-
1
)
throw
new
Exception
(
"No foundation set"
);
...
...
@@ -144,7 +144,7 @@ public class NemopaySession {
public
int
getBuyerInfoByLogin
(
final
String
login
)
throws
Exception
{
if
(!
isConnected
())
throw
new
Exception
(
"Not connect
ed
"
);
throw
new
Exception
(
this
.
notLogg
ed
);
return
request
(
"POSS3"
,
...
...
@@ -160,7 +160,7 @@ public class NemopaySession {
public
int
getBuyerInfo
(
final
String
badgeId
)
throws
Exception
{
if
(!
isConnected
())
throw
new
Exception
(
"Not connect
ed
"
);
throw
new
Exception
(
this
.
notLogg
ed
);
return
request
(
"POSS3"
,
...
...
@@ -178,7 +178,7 @@ public class NemopaySession {
public
int
getArticles
()
throws
Exception
{
if
(!
isConnected
())
throw
new
Exception
(
"Not connect
ed
"
);
throw
new
Exception
(
this
.
notLogg
ed
);
if
(
this
.
foundationId
==
-
1
)
throw
new
Exception
(
"No foundation set"
);
...
...
@@ -197,7 +197,7 @@ public class NemopaySession {
public
int
getKeyboards
()
throws
Exception
{
if
(!
isConnected
())
throw
new
Exception
(
"Not connect
ed
"
);
throw
new
Exception
(
this
.
notLogg
ed
);
if
(
this
.
foundationId
==
-
1
)
throw
new
Exception
(
"No foundation set"
);
...
...
@@ -216,7 +216,7 @@ public class NemopaySession {
public
int
getCategories
()
throws
Exception
{
if
(!
isConnected
())
throw
new
Exception
(
"Not connect
ed
"
);
throw
new
Exception
(
this
.
notLogg
ed
);
if
(
this
.
foundationId
==
-
1
)
throw
new
Exception
(
"No foundation set"
);
...
...
@@ -235,27 +235,27 @@ public class NemopaySession {
public
int
getFoundations
()
throws
Exception
{
if
(!
isConnected
())
throw
new
Exception
(
"Not connect
ed
"
);
throw
new
Exception
(
this
.
notLogg
ed
);
return
request
(
"POSS3"
,
"getFundations"
,
new
String
[]{
new
String
[]{
"sale"
}
}
);
}
public
int
getCASUrl
()
throws
Exception
{
return
request
(
"POSS3"
,
"getCasUrl"
"POSS3"
,
"getCasUrl"
);
}
public
int
registerApp
(
final
String
name
,
final
String
description
,
final
String
service
)
throws
Exception
{
if
(!
isConnected
())
throw
new
Exception
(
"Not connect
ed
"
);
throw
new
Exception
(
this
.
notLogg
ed
);
int
reponseCode
=
request
(
"KEY"
,
...
...
@@ -303,7 +303,7 @@ public class NemopaySession {
if
(
reponseCode
==
200
&&
this
.
request
.
isJSONResponse
())
response
=
this
.
request
.
getJSONResponse
();
else
throw
new
Exception
(
"Not authentifi
ed
"
);
throw
new
Exception
(
this
.
notLogg
ed
);
if
(
response
.
has
(
"sessionid"
)
&&
response
.
has
(
"name"
))
{
this
.
session
=
response
.
get
(
"sessionid"
).
textValue
();
...
...
@@ -318,7 +318,7 @@ public class NemopaySession {
public
int
loginBadge
(
final
String
badgeId
,
final
String
pin
)
throws
Exception
{
if
(!
isRegistered
())
throw
new
Exception
(
"Not register
ed
"
);
throw
new
Exception
(
this
.
notLogg
ed
);
int
reponseCode
=
request
(
"POSS3"
,
...
...
@@ -336,7 +336,7 @@ public class NemopaySession {
if
(
reponseCode
==
200
&&
this
.
request
.
isJSONResponse
())
response
=
this
.
request
.
getJSONResponse
();
else
throw
new
Exception
(
"Not connect
ed
"
);
throw
new
Exception
(
this
.
notLogg
ed
);
if
(
response
.
has
(
"sessionid"
)
&&
response
.
has
(
"username"
))
{
this
.
session
=
response
.
get
(
"sessionid"
).
textValue
();
...
...
@@ -362,7 +362,7 @@ public class NemopaySession {
if
(
reponseCode
==
200
&&
this
.
request
.
isJSONResponse
())
response
=
this
.
request
.
getJSONResponse
();
else
throw
new
Exception
(
"Not connect
ed
"
);
throw
new
Exception
(
this
.
notLogg
ed
);
if
(
response
.
has
(
"sessionid"
)
&&
response
.
has
(
"username"
))
{
this
.
session
=
response
.
get
(
"sessionid"
).
textValue
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment