Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Krishna Vemulavada
/
vera_2.1_app
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
37dd591d
authored
Sep 01, 2016
by
Kunj Gupta
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
UOFLMA-64: Integrated Google Analytics.
parent
8bddb5d7
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
139 additions
and
3 deletions
app/build.gradle
app/google-services.json
app/src/main/AndroidManifest.xml
app/src/main/java/com/vsoft/uofl_catalogue/CatalogueApplication.java
app/src/main/java/com/vsoft/uofl_catalogue/ui/CatalogueItemScreen.java
app/src/main/java/com/vsoft/uofl_catalogue/ui/CatalogueScreen.java
app/src/main/java/com/vsoft/uofl_catalogue/ui/CatalogueVariableScreen.java
app/src/main/java/com/vsoft/uofl_catalogue/ui/HomeScreen.java
app/src/main/java/com/vsoft/uofl_catalogue/ui/LoginScreen.java
app/src/main/java/com/vsoft/uofl_catalogue/ui/MyIncidentScreen.java
app/src/main/java/com/vsoft/uofl_catalogue/ui/MyRequestActivity.java
app/src/main/java/com/vsoft/uofl_catalogue/ui/ReportIncidentScreen.java
app/src/main/java/com/vsoft/uofl_catalogue/utils/Util.java
app/src/main/res/values/strings.xml
app/src/main/res/xml/global_tracker.xml
build.gradle
app/build.gradle
View file @
37dd591d
...
@@ -47,4 +47,5 @@ dependencies {
...
@@ -47,4 +47,5 @@ dependencies {
compile
'com.jakewharton:butterknife:8.2.1'
compile
'com.jakewharton:butterknife:8.2.1'
apt
'com.jakewharton:butterknife-compiler:8.2.1'
apt
'com.jakewharton:butterknife-compiler:8.2.1'
compile
'com.android.support:cardview-v7:24.1.1'
compile
'com.android.support:cardview-v7:24.1.1'
compile
'com.google.android.gms:play-services-analytics:9.2.0'
}
}
app/google-services.json
0 → 100644
View file @
37dd591d
{
"project_info"
:
{
"project_number"
:
"593992849158"
,
"project_id"
:
"uofl-servicenow-android"
},
"client"
:
[
{
"client_info"
:
{
"mobilesdk_app_id"
:
"1:593992849158:android:84f481659dc7e412"
,
"android_client_info"
:
{
"package_name"
:
"com.vsoft.uoflservicenow"
}
},
"oauth_client"
:
[],
"api_key"
:
[
{
"current_key"
:
"AIzaSyBEzc7fo12bQLx8CkogSGIb2j-vivdbJNg"
}
],
"services"
:
{
"analytics_service"
:
{
"status"
:
2
,
"analytics_property"
:
{
"tracking_id"
:
"UA-83545030-1"
}
},
"appinvite_service"
:
{
"status"
:
1
,
"other_platform_oauth_client"
:
[]
},
"ads_service"
:
{
"status"
:
1
}
}
}
],
"configuration_version"
:
"1"
}
\ No newline at end of file
app/src/main/AndroidManifest.xml
View file @
37dd591d
...
@@ -77,8 +77,7 @@
...
@@ -77,8 +77,7 @@
android:windowSoftInputMode=
"stateHidden|adjustResize"
/>
android:windowSoftInputMode=
"stateHidden|adjustResize"
/>
<activity
<activity
android:name=
".ui.MyRequestActivity"
android:name=
".ui.MyRequestActivity"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
/>
/>
<activity
<activity
android:name=
".ui.MyIncidentScreen"
android:name=
".ui.MyIncidentScreen"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
/>
...
...
app/src/main/java/com/vsoft/uofl_catalogue/CatalogueApplication.java
View file @
37dd591d
...
@@ -5,10 +5,14 @@ import android.content.Context;
...
@@ -5,10 +5,14 @@ import android.content.Context;
import
android.net.ConnectivityManager
;
import
android.net.ConnectivityManager
;
import
android.net.NetworkInfo
;
import
android.net.NetworkInfo
;
import
com.google.android.gms.analytics.GoogleAnalytics
;
import
com.google.android.gms.analytics.Tracker
;
public
class
CatalogueApplication
extends
Application
{
public
class
CatalogueApplication
extends
Application
{
private
ConnectivityManager
mConMgr
;
private
ConnectivityManager
mConMgr
;
private
static
Context
mContext
;
private
static
Context
mContext
;
private
Tracker
mTracker
;
@Override
@Override
public
void
onCreate
()
{
public
void
onCreate
()
{
...
@@ -21,6 +25,15 @@ public class CatalogueApplication extends Application {
...
@@ -21,6 +25,15 @@ public class CatalogueApplication extends Application {
return
mContext
;
return
mContext
;
}
}
synchronized
public
Tracker
getDefaultTracker
()
{
if
(
mTracker
==
null
)
{
GoogleAnalytics
analytics
=
GoogleAnalytics
.
getInstance
(
this
);
// To enable debug logging use: adb shell setprop log.tag.GAv4 DEBUG
mTracker
=
analytics
.
newTracker
(
R
.
xml
.
global_tracker
);
}
return
mTracker
;
}
public
boolean
isNetConnected
()
{
public
boolean
isNetConnected
()
{
if
(
mConMgr
==
null
)
if
(
mConMgr
==
null
)
mConMgr
=
(
ConnectivityManager
)
getSystemService
(
Context
.
CONNECTIVITY_SERVICE
);
mConMgr
=
(
ConnectivityManager
)
getSystemService
(
Context
.
CONNECTIVITY_SERVICE
);
...
...
app/src/main/java/com/vsoft/uofl_catalogue/ui/CatalogueItemScreen.java
View file @
37dd591d
...
@@ -15,6 +15,7 @@ import android.widget.AdapterView;
...
@@ -15,6 +15,7 @@ import android.widget.AdapterView;
import
android.widget.ListView
;
import
android.widget.ListView
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.google.android.gms.analytics.Tracker
;
import
com.vsoft.uofl_catalogue.CatalogueApplication
;
import
com.vsoft.uofl_catalogue.CatalogueApplication
;
import
com.vsoft.uofl_catalogue.R
;
import
com.vsoft.uofl_catalogue.R
;
import
com.vsoft.uofl_catalogue.adapters.CatalogueCategoryItemAdapter
;
import
com.vsoft.uofl_catalogue.adapters.CatalogueCategoryItemAdapter
;
...
@@ -24,6 +25,7 @@ import com.vsoft.uofl_catalogue.db.models.CatalogueItem;
...
@@ -24,6 +25,7 @@ import com.vsoft.uofl_catalogue.db.models.CatalogueItem;
import
com.vsoft.uofl_catalogue.enums.SyncStatus
;
import
com.vsoft.uofl_catalogue.enums.SyncStatus
;
import
com.vsoft.uofl_catalogue.utils.CatalogueLog
;
import
com.vsoft.uofl_catalogue.utils.CatalogueLog
;
import
com.vsoft.uofl_catalogue.utils.Constants
;
import
com.vsoft.uofl_catalogue.utils.Constants
;
import
com.vsoft.uofl_catalogue.utils.Util
;
import
java.util.List
;
import
java.util.List
;
...
@@ -68,6 +70,10 @@ public class CatalogueItemScreen extends AppCompatActivity {
...
@@ -68,6 +70,10 @@ public class CatalogueItemScreen extends AppCompatActivity {
actionBar
.
setDisplayShowTitleEnabled
(
true
);
actionBar
.
setDisplayShowTitleEnabled
(
true
);
}
}
Tracker
tracker
=
application
.
getDefaultTracker
();
// Send initial screen view hit.
Util
.
sendScreenName
(
tracker
,
actionBar
.
getTitle
().
toString
());
if
(
application
.
isNetConnected
())
{
if
(
application
.
isNetConnected
())
{
new
FetchCatalogueItem
().
execute
();
new
FetchCatalogueItem
().
execute
();
}
else
{
}
else
{
...
...
app/src/main/java/com/vsoft/uofl_catalogue/ui/CatalogueScreen.java
View file @
37dd591d
...
@@ -14,6 +14,7 @@ import android.view.View;
...
@@ -14,6 +14,7 @@ import android.view.View;
import
android.widget.AdapterView
;
import
android.widget.AdapterView
;
import
android.widget.ListView
;
import
android.widget.ListView
;
import
com.google.android.gms.analytics.Tracker
;
import
com.vsoft.uofl_catalogue.CatalogueApplication
;
import
com.vsoft.uofl_catalogue.CatalogueApplication
;
import
com.vsoft.uofl_catalogue.R
;
import
com.vsoft.uofl_catalogue.R
;
import
com.vsoft.uofl_catalogue.adapters.CatalogueCategoryAdapter
;
import
com.vsoft.uofl_catalogue.adapters.CatalogueCategoryAdapter
;
...
@@ -23,6 +24,7 @@ import com.vsoft.uofl_catalogue.db.models.Catalogue;
...
@@ -23,6 +24,7 @@ import com.vsoft.uofl_catalogue.db.models.Catalogue;
import
com.vsoft.uofl_catalogue.enums.SyncStatus
;
import
com.vsoft.uofl_catalogue.enums.SyncStatus
;
import
com.vsoft.uofl_catalogue.utils.CatalogueLog
;
import
com.vsoft.uofl_catalogue.utils.CatalogueLog
;
import
com.vsoft.uofl_catalogue.utils.Constants
;
import
com.vsoft.uofl_catalogue.utils.Constants
;
import
com.vsoft.uofl_catalogue.utils.Util
;
import
java.util.List
;
import
java.util.List
;
...
@@ -59,6 +61,10 @@ public class CatalogueScreen extends AppCompatActivity {
...
@@ -59,6 +61,10 @@ public class CatalogueScreen extends AppCompatActivity {
actionBar
.
setDisplayShowTitleEnabled
(
true
);
actionBar
.
setDisplayShowTitleEnabled
(
true
);
}
}
Tracker
tracker
=
application
.
getDefaultTracker
();
// Send initial screen view hit.
Util
.
sendScreenName
(
tracker
,
actionBar
.
getTitle
().
toString
());
if
(
application
.
isNetConnected
())
{
if
(
application
.
isNetConnected
())
{
new
FetchCatalogue
().
execute
();
new
FetchCatalogue
().
execute
();
}
else
{
}
else
{
...
...
app/src/main/java/com/vsoft/uofl_catalogue/ui/CatalogueVariableScreen.java
View file @
37dd591d
...
@@ -24,6 +24,7 @@ import android.widget.RelativeLayout;
...
@@ -24,6 +24,7 @@ import android.widget.RelativeLayout;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
android.widget.TimePicker
;
import
android.widget.TimePicker
;
import
com.google.android.gms.analytics.Tracker
;
import
com.vsoft.uofl_catalogue.CatalogueApplication
;
import
com.vsoft.uofl_catalogue.CatalogueApplication
;
import
com.vsoft.uofl_catalogue.R
;
import
com.vsoft.uofl_catalogue.R
;
import
com.vsoft.uofl_catalogue.api.listeners.get.GetCatalogueVariableApiListener
;
import
com.vsoft.uofl_catalogue.api.listeners.get.GetCatalogueVariableApiListener
;
...
@@ -102,6 +103,10 @@ public class CatalogueVariableScreen extends AppCompatActivity {
...
@@ -102,6 +103,10 @@ public class CatalogueVariableScreen extends AppCompatActivity {
actionBar
.
setDisplayShowTitleEnabled
(
true
);
actionBar
.
setDisplayShowTitleEnabled
(
true
);
}
}
Tracker
tracker
=
mApplication
.
getDefaultTracker
();
// Send initial screen view hit.
Util
.
sendScreenName
(
tracker
,
actionBar
.
getTitle
().
toString
());
if
(
mApplication
.
isNetConnected
())
{
if
(
mApplication
.
isNetConnected
())
{
new
FetchCatalogueVariable
().
execute
();
new
FetchCatalogueVariable
().
execute
();
}
else
{
}
else
{
...
...
app/src/main/java/com/vsoft/uofl_catalogue/ui/HomeScreen.java
View file @
37dd591d
...
@@ -2,11 +2,15 @@ package com.vsoft.uofl_catalogue.ui;
...
@@ -2,11 +2,15 @@ package com.vsoft.uofl_catalogue.ui;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.content.res.TypedArray
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.widget.GridView
;
import
android.widget.GridView
;
import
com.google.android.gms.analytics.Tracker
;
import
com.vsoft.uofl_catalogue.CatalogueApplication
;
import
com.vsoft.uofl_catalogue.R
;
import
com.vsoft.uofl_catalogue.R
;
import
com.vsoft.uofl_catalogue.adapters.HomeScreenAdapter
;
import
com.vsoft.uofl_catalogue.adapters.HomeScreenAdapter
;
import
com.vsoft.uofl_catalogue.utils.Util
;
import
butterknife.BindView
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.ButterKnife
;
...
@@ -25,7 +29,17 @@ public class HomeScreen extends Activity {
...
@@ -25,7 +29,17 @@ public class HomeScreen extends Activity {
setContentView
(
R
.
layout
.
home_screen
);
setContentView
(
R
.
layout
.
home_screen
);
ButterKnife
.
bind
(
this
);
ButterKnife
.
bind
(
this
);
mGridView
.
setAdapter
(
new
HomeScreenAdapter
(
this
,
getResources
().
getStringArray
(
R
.
array
.
home_screen_array
),
getResources
().
obtainTypedArray
(
R
.
array
.
home_screen_icon_array
)));
CatalogueApplication
application
=
(
CatalogueApplication
)
getApplication
();
Tracker
tracker
=
application
.
getDefaultTracker
();
// Send initial screen view hit.
Util
.
sendScreenName
(
tracker
,
getString
(
R
.
string
.
home_screen_string
));
String
[]
gridValuesArray
=
getResources
().
getStringArray
(
R
.
array
.
home_screen_array
);
TypedArray
gridViewIcons
=
getResources
().
obtainTypedArray
(
R
.
array
.
home_screen_icon_array
);
HomeScreenAdapter
adapter
=
new
HomeScreenAdapter
(
this
,
gridValuesArray
,
gridViewIcons
);
mGridView
.
setAdapter
(
adapter
);
}
}
@OnItemClick
(
R
.
id
.
home_screen_grid_view
)
@OnItemClick
(
R
.
id
.
home_screen_grid_view
)
...
...
app/src/main/java/com/vsoft/uofl_catalogue/ui/LoginScreen.java
View file @
37dd591d
...
@@ -8,6 +8,8 @@ import android.os.Bundle;
...
@@ -8,6 +8,8 @@ import android.os.Bundle;
import
android.widget.EditText
;
import
android.widget.EditText
;
import
android.widget.Toast
;
import
android.widget.Toast
;
import
com.google.android.gms.analytics.Tracker
;
import
com.vsoft.uofl_catalogue.CatalogueApplication
;
import
com.vsoft.uofl_catalogue.R
;
import
com.vsoft.uofl_catalogue.R
;
import
com.vsoft.uofl_catalogue.api.listeners.get.GetUserApiListener
;
import
com.vsoft.uofl_catalogue.api.listeners.get.GetUserApiListener
;
import
com.vsoft.uofl_catalogue.api.managers.LoginApiManger
;
import
com.vsoft.uofl_catalogue.api.managers.LoginApiManger
;
...
@@ -15,6 +17,7 @@ import com.vsoft.uofl_catalogue.api.managers.UserApiManager;
...
@@ -15,6 +17,7 @@ import com.vsoft.uofl_catalogue.api.managers.UserApiManager;
import
com.vsoft.uofl_catalogue.db.models.UserApiValues
;
import
com.vsoft.uofl_catalogue.db.models.UserApiValues
;
import
com.vsoft.uofl_catalogue.enums.SyncStatus
;
import
com.vsoft.uofl_catalogue.enums.SyncStatus
;
import
com.vsoft.uofl_catalogue.utils.PrefManager
;
import
com.vsoft.uofl_catalogue.utils.PrefManager
;
import
com.vsoft.uofl_catalogue.utils.Util
;
import
java.util.List
;
import
java.util.List
;
...
@@ -40,6 +43,12 @@ public class LoginScreen extends Activity {
...
@@ -40,6 +43,12 @@ public class LoginScreen extends Activity {
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
login_screen
);
setContentView
(
R
.
layout
.
login_screen
);
ButterKnife
.
bind
(
this
);
ButterKnife
.
bind
(
this
);
CatalogueApplication
application
=
(
CatalogueApplication
)
getApplication
();
Tracker
tracker
=
application
.
getDefaultTracker
();
// Send initial screen view hit.
Util
.
sendScreenName
(
tracker
,
getString
(
R
.
string
.
login_screen_string
));
}
}
@OnClick
(
R
.
id
.
login_screen_login_text_view
)
@OnClick
(
R
.
id
.
login_screen_login_text_view
)
...
...
app/src/main/java/com/vsoft/uofl_catalogue/ui/MyIncidentScreen.java
View file @
37dd591d
...
@@ -11,6 +11,7 @@ import android.support.v7.widget.Toolbar;
...
@@ -11,6 +11,7 @@ import android.support.v7.widget.Toolbar;
import
android.view.MenuItem
;
import
android.view.MenuItem
;
import
android.widget.ListView
;
import
android.widget.ListView
;
import
com.google.android.gms.analytics.Tracker
;
import
com.vsoft.uofl_catalogue.CatalogueApplication
;
import
com.vsoft.uofl_catalogue.CatalogueApplication
;
import
com.vsoft.uofl_catalogue.R
;
import
com.vsoft.uofl_catalogue.R
;
import
com.vsoft.uofl_catalogue.adapters.MyIncidentsAdapter
;
import
com.vsoft.uofl_catalogue.adapters.MyIncidentsAdapter
;
...
@@ -19,6 +20,7 @@ import com.vsoft.uofl_catalogue.api.managers.IncidentApiManager;
...
@@ -19,6 +20,7 @@ import com.vsoft.uofl_catalogue.api.managers.IncidentApiManager;
import
com.vsoft.uofl_catalogue.db.models.Incident
;
import
com.vsoft.uofl_catalogue.db.models.Incident
;
import
com.vsoft.uofl_catalogue.enums.SyncStatus
;
import
com.vsoft.uofl_catalogue.enums.SyncStatus
;
import
com.vsoft.uofl_catalogue.utils.CatalogueLog
;
import
com.vsoft.uofl_catalogue.utils.CatalogueLog
;
import
com.vsoft.uofl_catalogue.utils.Util
;
import
java.util.List
;
import
java.util.List
;
...
@@ -56,6 +58,10 @@ public class MyIncidentScreen extends AppCompatActivity {
...
@@ -56,6 +58,10 @@ public class MyIncidentScreen extends AppCompatActivity {
actionBar
.
setDisplayShowTitleEnabled
(
true
);
actionBar
.
setDisplayShowTitleEnabled
(
true
);
}
}
Tracker
tracker
=
application
.
getDefaultTracker
();
// Send initial screen view hit.
Util
.
sendScreenName
(
tracker
,
actionBar
.
getTitle
().
toString
());
if
(
application
.
isNetConnected
())
{
if
(
application
.
isNetConnected
())
{
new
FetchIncident
().
execute
();
new
FetchIncident
().
execute
();
}
else
{
}
else
{
...
...
app/src/main/java/com/vsoft/uofl_catalogue/ui/MyRequestActivity.java
View file @
37dd591d
...
@@ -10,6 +10,8 @@ import android.support.v7.app.AppCompatActivity;
...
@@ -10,6 +10,8 @@ import android.support.v7.app.AppCompatActivity;
import
android.support.v7.widget.Toolbar
;
import
android.support.v7.widget.Toolbar
;
import
android.view.MenuItem
;
import
android.view.MenuItem
;
import
android.widget.ListView
;
import
android.widget.ListView
;
import
com.google.android.gms.analytics.Tracker
;
import
com.vsoft.uofl_catalogue.CatalogueApplication
;
import
com.vsoft.uofl_catalogue.CatalogueApplication
;
import
com.vsoft.uofl_catalogue.R
;
import
com.vsoft.uofl_catalogue.R
;
import
com.vsoft.uofl_catalogue.adapters.MyRequestAdapter
;
import
com.vsoft.uofl_catalogue.adapters.MyRequestAdapter
;
...
@@ -17,6 +19,8 @@ import com.vsoft.uofl_catalogue.api.listeners.get.GetMyRequestApiListener;
...
@@ -17,6 +19,8 @@ import com.vsoft.uofl_catalogue.api.listeners.get.GetMyRequestApiListener;
import
com.vsoft.uofl_catalogue.api.managers.MyRequestApiManager
;
import
com.vsoft.uofl_catalogue.api.managers.MyRequestApiManager
;
import
com.vsoft.uofl_catalogue.db.models.MyRequest
;
import
com.vsoft.uofl_catalogue.db.models.MyRequest
;
import
com.vsoft.uofl_catalogue.enums.SyncStatus
;
import
com.vsoft.uofl_catalogue.enums.SyncStatus
;
import
com.vsoft.uofl_catalogue.utils.Util
;
import
java.util.List
;
import
java.util.List
;
import
butterknife.BindView
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.ButterKnife
;
...
@@ -54,6 +58,10 @@ public class MyRequestActivity extends AppCompatActivity {
...
@@ -54,6 +58,10 @@ public class MyRequestActivity extends AppCompatActivity {
actionBar
.
setDisplayShowTitleEnabled
(
true
);
actionBar
.
setDisplayShowTitleEnabled
(
true
);
}
}
Tracker
tracker
=
application
.
getDefaultTracker
();
// Send initial screen view hit.
Util
.
sendScreenName
(
tracker
,
actionBar
.
getTitle
().
toString
());
if
(
application
.
isNetConnected
())
{
if
(
application
.
isNetConnected
())
{
new
FetchMyRequestData
().
execute
();
new
FetchMyRequestData
().
execute
();
}
else
{
}
else
{
...
...
app/src/main/java/com/vsoft/uofl_catalogue/ui/ReportIncidentScreen.java
View file @
37dd591d
...
@@ -18,6 +18,7 @@ import android.widget.EditText;
...
@@ -18,6 +18,7 @@ import android.widget.EditText;
import
android.widget.Spinner
;
import
android.widget.Spinner
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.google.android.gms.analytics.Tracker
;
import
com.vsoft.uofl_catalogue.CatalogueApplication
;
import
com.vsoft.uofl_catalogue.CatalogueApplication
;
import
com.vsoft.uofl_catalogue.R
;
import
com.vsoft.uofl_catalogue.R
;
import
com.vsoft.uofl_catalogue.api.managers.IncidentApiManager
;
import
com.vsoft.uofl_catalogue.api.managers.IncidentApiManager
;
...
@@ -69,6 +70,10 @@ public class ReportIncidentScreen extends AppCompatActivity {
...
@@ -69,6 +70,10 @@ public class ReportIncidentScreen extends AppCompatActivity {
actionBar
.
setDisplayShowTitleEnabled
(
true
);
actionBar
.
setDisplayShowTitleEnabled
(
true
);
}
}
Tracker
tracker
=
mApplication
.
getDefaultTracker
();
// Send initial screen view hit.
Util
.
sendScreenName
(
tracker
,
actionBar
.
getTitle
().
toString
());
// Creating adapter for spinner
// Creating adapter for spinner
ArrayAdapter
<
String
>
dataAdapter
=
new
ArrayAdapter
<
String
>(
this
,
android
.
R
.
layout
.
simple_spinner_item
,
getResources
().
getStringArray
(
R
.
array
.
incident_impact_array
));
ArrayAdapter
<
String
>
dataAdapter
=
new
ArrayAdapter
<
String
>(
this
,
android
.
R
.
layout
.
simple_spinner_item
,
getResources
().
getStringArray
(
R
.
array
.
incident_impact_array
));
...
...
app/src/main/java/com/vsoft/uofl_catalogue/utils/Util.java
View file @
37dd591d
...
@@ -18,6 +18,8 @@ import android.widget.RadioGroup;
...
@@ -18,6 +18,8 @@ import android.widget.RadioGroup;
import
android.widget.Spinner
;
import
android.widget.Spinner
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.google.android.gms.analytics.HitBuilders
;
import
com.google.android.gms.analytics.Tracker
;
import
com.vsoft.uofl_catalogue.R
;
import
com.vsoft.uofl_catalogue.R
;
import
com.vsoft.uofl_catalogue.db.models.CatalogueVariable
;
import
com.vsoft.uofl_catalogue.db.models.CatalogueVariable
;
import
com.vsoft.uofl_catalogue.db.models.Reference
;
import
com.vsoft.uofl_catalogue.db.models.Reference
;
...
@@ -283,6 +285,12 @@ public class Util {
...
@@ -283,6 +285,12 @@ public class Util {
return
dateFormat
.
format
(
date
.
getTime
());
return
dateFormat
.
format
(
date
.
getTime
());
}
}
/*Record a screen view hit for the visible*/
public
static
void
sendScreenName
(
Tracker
tracker
,
String
name
)
{
tracker
.
setScreenName
(
name
);
tracker
.
send
(
new
HitBuilders
.
ScreenViewBuilder
().
build
());
}
public
static
void
hideSoftKeyboard
(
Context
context
,
View
view
)
{
public
static
void
hideSoftKeyboard
(
Context
context
,
View
view
)
{
InputMethodManager
imm
=(
InputMethodManager
)
context
.
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
);
InputMethodManager
imm
=(
InputMethodManager
)
context
.
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
);
imm
.
hideSoftInputFromWindow
(
view
.
getWindowToken
(),
0
);
imm
.
hideSoftInputFromWindow
(
view
.
getWindowToken
(),
0
);
...
...
app/src/main/res/values/strings.xml
View file @
37dd591d
...
@@ -8,6 +8,8 @@
...
@@ -8,6 +8,8 @@
<string
name=
"none_string"
>
-None-
</string>
<string
name=
"none_string"
>
-None-
</string>
<string
name=
"search_for_reference_string"
>
Reference
</string>
<string
name=
"search_for_reference_string"
>
Reference
</string>
<string
name=
"internet_validation_string"
>
Please connect to internet and try again.
</string>
<string
name=
"internet_validation_string"
>
Please connect to internet and try again.
</string>
<string
name=
"home_screen_string"
>
Home Screen
</string>
<string
name=
"login_screen_string"
>
Login Screen
</string>
<string
name=
"loading_string"
>
Loading
…
</string>
<string
name=
"loading_string"
>
Loading
…
</string>
<string
name=
"select_date_string"
>
Select Date
</string>
<string
name=
"select_date_string"
>
Select Date
</string>
...
...
app/src/main/res/xml/global_tracker.xml
0 → 100755
View file @
37dd591d
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Replace placeholder ID with your tracking ID -->
<string
name=
"ga_trackingId"
>
UA-83545030-1
</string>
<!-- Enable automatic activity tracking -->
<bool
name=
"ga_autoActivityTracking"
>
true
</bool>
<!-- Enable automatic exception tracking -->
<bool
name=
"ga_reportUncaughtExceptions"
>
true
</bool>
</resources>
\ No newline at end of file
build.gradle
View file @
37dd591d
...
@@ -7,6 +7,7 @@ buildscript {
...
@@ -7,6 +7,7 @@ buildscript {
dependencies
{
dependencies
{
classpath
'com.android.tools.build:gradle:2.1.3'
classpath
'com.android.tools.build:gradle:2.1.3'
classpath
'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath
'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath
'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
// in the individual module build.gradle files
...
...
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