Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master2.0 #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 19 additions & 20 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 13 additions & 5 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions .idea/render.experimental.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ android {
dependencies {
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1'
implementation files('/home/slayer/Descargas/mongo-java-driver-3.2.0-SNAPSHOT.jar')
implementation files('libs/mongo-java-driver-3.2.0-SNAPSHOT.jar')
compileOnly 'com.github.pengrad:jdk9-deps:1.0'
implementation 'com.journeyapps:zxing-android-embedded:4.2.0'
implementation 'com.google.zxing:core:3.4.0'
Expand Down Expand Up @@ -109,7 +109,7 @@ dependencies {
implementation platform('com.google.firebase:firebase-bom:28.4.0')
implementation 'com.google.firebase:firebase-analytics-ktx'

implementation 'com.google.android.gms:play-services-auth:19.2.0'
implementation 'com.google.android.gms:play-services-auth:20.2.0'
implementation 'com.facebook.android:facebook-android-sdk:[8,9)'
implementation 'com.google.firebase:firebase-auth-ktx'

Expand Down
Binary file added app/libs/mongo-java-driver-3.2.0-SNAPSHOT.jar
Binary file not shown.
4 changes: 4 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>

<application

android:usesCleartextTraffic="true"
android:allowBackup="true"
android:name="com.example.fromdeskhelper.ActivityMainApp"
Expand Down Expand Up @@ -68,6 +70,7 @@
android:value="@string/facebook_app_id" />

<meta-data

android:name="com.google.android.gms.common.api"
android:value="@string/app_id" />

Expand Down Expand Up @@ -107,6 +110,7 @@
android:label="@string/app_name"
android:screenOrientation="portrait"
android:supportsRtl="true"
android:launchMode="singleTask"
android:theme="@style/SplashThemeDos"
android:windowSoftInputMode="adjustPan"/>
<!-- Actividad principal de la aplicacion-->
Expand Down
24 changes: 22 additions & 2 deletions app/src/main/java/com/example/fromdeskhelper/core/Autorisation.kt
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
package com.example.fromdeskhelper.core

import com.example.fromdeskhelper.data.model.LoginIntProvider
import dagger.Provides
import android.util.Log
import okhttp3.Interceptor
import okhttp3.Request
import okhttp3.Response
import okhttp3.ResponseBody
import java.io.IOException
import java.lang.Exception
import java.net.SocketTimeoutException
import javax.inject.Inject
import javax.inject.Qualifier
import javax.inject.Singleton


@Singleton
class AuthorizationInterceptor @Inject constructor (): Interceptor {
private var sessionToken: String = "NUll"
Expand Down Expand Up @@ -49,4 +53,20 @@ class MyServiceInterceptor @Inject constructor() : Interceptor {
// }
return chain.proceed(requestBuilder.build())
}
}


@Throws(IOException::class)
public fun onOnIntercept(chain: Interceptor.Chain): Response {
try {
val response: Response = chain.proceed(chain.request())
// val content: String = UtilityMethods.convertResponseToString(response)
// Log.d(TAG, lastCalledMethodName.toString() + " - " + content)
return response.newBuilder().body(ResponseBody.create(response.body!!.contentType(), response.toString())).build()
} catch (exception: Exception) {
exception.printStackTrace()
Log.i("se atrevio",exception.toString())
// if (listener != null) listener.onConnectionTimeout()
}
return chain.proceed(chain.request())
}
Loading