Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b2a46edf
authored
Feb 22, 2017
by
Fernando Martínez Santiago
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
trabajando en las notificaciones
parent
48b4080a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
14 deletions
android/Pictogram/.gitignore
android/Pictogram/commonlibrary/src/main/java/com/yottacode/net/RestapiWrapper.java
android/Pictogram/supervisor_tablet/supervisor_tablet.iml
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/net/NetServiceTablet.java
android/Pictogram/tabletlibrary/tabletlibrary.iml
android/Pictogram/watch/src/main/java/com/yottacode/pictogram/watch/net/NetServiceWatch.java
android/Pictogram/yotta_tablet/yotta_tablet.iml
android/Pictogram/.gitignore
View file @
b2a46edf
...
...
@@ -64,3 +64,18 @@ gen/
/Pictogram.iml
/.gitignore
!/tabletlibrary/tabletlibrary.iml
supervisor_tablet/src/main/res/drawable-xhdpi/
supervisor_tablet/src/main/res/drawable-xxhdpi/
supervisor_tablet/src/main/res/drawable-xxxhdpi/
tabletlibrary/libs/
tabletlibrary/src/main/res/anim/slide_in.xml
tabletlibrary/src/main/res/anim/slide_out.xml
tabletlibrary/src/main/res/drawable-hdpi/descarga.png
tabletlibrary/src/main/res/drawable-hdpi/flash.png
tabletlibrary/src/main/res/drawable-hdpi/session_talk.png
yotta_tablet/src/main/res/drawable-hdpi/
yotta_tablet/src/main/res/drawable-xhdpi/
yotta_tablet/src/main/res/drawable-xxhdpi/
yotta_tablet/src/main/res/drawable-xxxhdpi/
/watch/watch.iml
android/Pictogram/commonlibrary/src/main/java/com/yottacode/net/RestapiWrapper.java
View file @
b2a46edf
...
...
@@ -172,8 +172,7 @@ public class RestapiWrapper {
surl
=
surl
.
substring
(
0
,
surl
.
length
()-
1
);
}
url
=
new
URL
(
surl
);
HttpURLConnection
urlConnection
=
null
;
urlConnection
=
(
HttpURLConnection
)
url
.
openConnection
();
HttpURLConnection
urlConnection
=
(
HttpURLConnection
)
url
.
openConnection
();
urlConnection
.
setReadTimeout
(
TIME_OUT
);
urlConnection
.
setConnectTimeout
(
TIME_OUT
);
urlConnection
.
setRequestMethod
(
"GET"
);
...
...
android/Pictogram/supervisor_tablet/supervisor_tablet.iml
View file @
b2a46edf
...
...
@@ -42,6 +42,13 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavorDebug/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavorDebug/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavorDebug/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/build/generated/source/r/androidTest/CIFlavor/debug"
isTestSource=
"true"
generated=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/build/generated/source/aidl/androidTest/CIFlavor/debug"
isTestSource=
"true"
generated=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/CIFlavor/debug"
isTestSource=
"true"
generated=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/build/generated/source/rs/androidTest/CIFlavor/debug"
isTestSource=
"true"
generated=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/build/generated/source/apt/androidTest/CIFlavor/debug"
isTestSource=
"true"
generated=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/build/generated/res/rs/androidTest/CIFlavor/debug"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/build/generated/res/resValues/androidTest/CIFlavor/debug"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/assets"
type=
"java-test-resource"
/>
...
...
@@ -50,13 +57,6 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/build/generated/source/r/androidTest/CIFlavor/debug"
isTestSource=
"true"
generated=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/build/generated/source/aidl/androidTest/CIFlavor/debug"
isTestSource=
"true"
generated=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/CIFlavor/debug"
isTestSource=
"true"
generated=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/build/generated/source/rs/androidTest/CIFlavor/debug"
isTestSource=
"true"
generated=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/build/generated/source/apt/androidTest/CIFlavor/debug"
isTestSource=
"true"
generated=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/build/generated/res/rs/androidTest/CIFlavor/debug"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/build/generated/res/resValues/androidTest/CIFlavor/debug"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavor/res"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavor/resources"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavor/assets"
type=
"java-resource"
/>
...
...
@@ -122,6 +122,8 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/shaders"
isTestSource=
"true"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/blame"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/classes"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/dependency-cache"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/24.2.1/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/24.2.1/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-compat/24.2.1/jars"
/>
...
...
@@ -132,11 +134,13 @@
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/24.2.1/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/24.2.1/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/incremental"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/incremental-safeguard"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/manifests"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/res"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/rs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/symbols"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/outputs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/tmp"
/>
</content>
<orderEntry
type=
"jdk"
jdkName=
"Android API 24 Platform"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/net/NetServiceTablet.java
View file @
b2a46edf
...
...
@@ -2,9 +2,11 @@ package com.yottacode.pictogram.tabletlibrary.net;
import
android.app.Activity
;
import
android.app.NotificationManager
;
import
android.app.PendingIntent
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.support.v4.app.NotificationCompat
;
import
android.support.v4.app.TaskStackBuilder
;
import
android.util.Log
;
import
com.yottacode.pictogram.dao.User
;
...
...
@@ -29,14 +31,14 @@ public class NetServiceTablet implements NetService.iNetServiceDevice {
public
void
build
()
{
this
.
builder
=
new
NotificationCompat
.
Builder
(
PCBcontext
.
getContext
()).
setAutoCancel
(
true
);
/*
Intent resultIntent = new Intent(PCBcontext.getContext(), PictogramActivity.class);
this
.
builder
=
new
NotificationCompat
.
Builder
(
PCBcontext
.
getContext
()).
setAutoCancel
(
true
)
.
setOngoing
(
true
)
;
Intent
resultIntent
=
new
Intent
(
PCBcontext
.
getContext
(),
PictogramActivity
.
class
);
TaskStackBuilder
stackBuilder
=
TaskStackBuilder
.
create
(
PCBcontext
.
getContext
());
stackBuilder
.
addParentStack
(
PictogramActivity
.
class
);
stackBuilder
.
addNextIntent
(
resultIntent
);
PendingIntent
resultPendingIntent
=
stackBuilder
.
getPendingIntent
(
0
,
PendingIntent
.
FLAG_UPDATE_CURRENT
);
builder.setContentIntent(resultPendingIntent);
*/
builder
.
setContentIntent
(
resultPendingIntent
);
}
public
void
notifyStatus
(
boolean
updated
)
{
...
...
@@ -71,8 +73,15 @@ public class NetServiceTablet implements NetService.iNetServiceDevice {
public
static
void
restart_PictogramTablet
(
Activity
activity
)
{
Log
.
i
(
LOG_TAG
,
"App restarting"
);
Intent
serialActivity
=
activity
.
getIntent
();
Context
context
=
activity
.
getBaseContext
();
Class
serialClass
;
try
{
serialClass
=
Class
.
forName
(
PCBcontext
.
getContext
().
getString
(
R
.
string
.
SerialClass
));
}
catch
(
ClassNotFoundException
e
)
{
Log
.
e
(
LOG_TAG
,
"S:"
+
PCBcontext
.
getContext
().
getString
(
R
.
string
.
SerialClass
));
serialClass
=
SerialActivity
.
class
;
}
Intent
serialActivity
=
new
Intent
(
context
,
serialClass
);
serialActivity
.
putExtra
(
"resetPrevUser"
,
false
);
serialActivity
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
context
.
startActivity
(
serialActivity
);
...
...
android/Pictogram/tabletlibrary/tabletlibrary.iml
View file @
b2a46edf
This diff is collapsed.
Click to expand it.
android/Pictogram/watch/src/main/java/com/yottacode/pictogram/watch/net/NetServiceWatch.java
View file @
b2a46edf
...
...
@@ -46,7 +46,7 @@ public class NetServiceWatch implements NetService.iNetServiceDevice {
restart_app
(
new
Intent
(
PCBcontext
.
getContext
(),
Activity
),
direct_login
);
}
@Override
public
void
restart_app
(
Intent
intent
,
boolean
direct_login
)
{
intent
.
putExtra
(
"resetPrevUser"
,
!
direct_login
);
PCBcontext
.
getContext
().
startActivity
(
intent
);
...
...
android/Pictogram/yotta_tablet/yotta_tablet.iml
View file @
b2a46edf
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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