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

chore: Release v1.3.0 #2321

Merged
merged 48 commits into from
Jul 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
1270757
fixed visibility of voice search icon in chat activity and stt fragment
atm1504 May 30, 2019
d61dbd5
fix: fixed visibility of voice search icon in chat activity and stt f…
iamareebjamal May 30, 2019
a9e6bb6
fix: Fixed the crash of signup page in landscape mode (#2240)
atm1504 May 31, 2019
61b4207
fix: Settings and menu mal function fixed (#2231)
atm1504 Jun 3, 2019
8b4a9f5
fix: Fix the bug in the try button of skill details page (#2247)
atm1504 Jun 4, 2019
b387efe
fix: unclickable mic or send icon in chat activity (#2236)
atm1504 Jun 6, 2019
a4202d7
fix: Resolve skill details page contraction (#2233)
atm1504 Jun 6, 2019
972a628
fix: Back press in login activity handled (#2230)
atm1504 Jun 6, 2019
7e2fb88
fix: Fix voice commands actions in voice prompt window (#2248)
atm1504 Jun 8, 2019
f11b2d0
feat: Voice search implemented on skills listing (#2202)
atm1504 Jun 8, 2019
fcf980d
feat: Implement the feature to redirect to login page to rate skills …
atm1504 Jun 10, 2019
d1d17aa
fix: hotword detection problem after speech recongnition fails (#2256)
atm1504 Jun 11, 2019
4f1ef16
fix: Toast message in rating susi response (#2257)
atm1504 Jun 12, 2019
83ff6cd
fix: Increase voice detection time in voice message query (#2259)
atm1504 Jun 12, 2019
e71bdc7
fix: Fixed malfunction of settings fragment (#2203)
atm1504 Jun 13, 2019
05b86ec
fix: Run speech recognition in default language (#2262)
atm1504 Jun 15, 2019
1397aad
fix: Fix the smart speaker connectivity malfunction during different …
atm1504 Jun 18, 2019
4d236de
chore(deps): bump com.diffplug.gradle.spotless from 3.23.0 to 3.23.1 …
dependabot-preview[bot] Jun 19, 2019
c732915
fix: Change http to https to avoid connection errors (#2273)
atm1504 Jun 19, 2019
7436701
chore(deps): bump kotlin-gradle-plugin from 1.3.31 to 1.3.40 (#2274)
dependabot-preview[bot] Jun 20, 2019
422f56f
chore(deps): bump realm-gradle-plugin from 5.11.0 to 5.12.0 (#2275)
dependabot-preview[bot] Jun 20, 2019
6fe2e14
fix: Connect smart speaker to open wifi (#2263)
atm1504 Jun 20, 2019
c87f1b6
chore: refactor rateskill code in viewholders (#2270)
Jun 22, 2019
ae46c39
feat: Add room feature (#2267)
atm1504 Jun 22, 2019
62a1e8c
feat: Resend message (#2264)
atm1504 Jun 25, 2019
038a8da
fix: Remove excess access token occurence (#2281)
atm1504 Jun 25, 2019
082442b
fix: Add location of the device (#2279)
atm1504 Jun 25, 2019
1e45b15
feat: Speaks welcome message when voice used for first time (#2093)
atm1504 Jun 25, 2019
5019efe
feat: Display connected devices (#2276)
atm1504 Jun 27, 2019
51bb133
feat: Order feedback by date (#2261)
atm1504 Jun 27, 2019
a8c2f70
fix: Clicking on room name redirect to connected device fragment (#2288)
atm1504 Jun 30, 2019
190a702
feat: Delete rooms in the device connect fragment (#2289)
atm1504 Jul 1, 2019
d81189b
feat: Add manage device section in settings page (#2285)
atm1504 Jul 2, 2019
7a0f74e
feat: Enhance the UI of the device card similar to google home (#2296)
atm1504 Jul 5, 2019
33a089d
feat: Implement remember me option in login screen (#2243)
atm1504 Jul 5, 2019
6327e4a
chore(deps): bump gradle from 3.4.1 to 3.4.2 (#2298)
dependabot-preview[bot] Jul 9, 2019
af6bdfd
chore: Update apk generation and naming convention (#2293)
atm1504 Jul 12, 2019
98d30a2
chore: Add fastlane metadata screenshots and update readme (#2304)
atm1504 Jul 15, 2019
779d12c
feat: Enhance SUSI.AI smart speaker connection flow (#2297)
atm1504 Jul 15, 2019
4f8d440
chore(deps): bump kotlin-gradle-plugin from 1.3.40 to 1.3.41 (#2305)
dependabot-preview[bot] Jul 15, 2019
1f77fbd
feat: Show wifi password layout (#2307)
atm1504 Jul 17, 2019
f2ba2ca
chore: Fix typos present in the app (#2308)
atm1504 Jul 17, 2019
2ab8580
chore: Update shimmer dependency (#2310)
atm1504 Jul 18, 2019
71d60d8
feat: Filter skills according to the user choice (#2311)
atm1504 Jul 22, 2019
5a1c097
fix: Remove filter options from settings page (#2317)
atm1504 Jul 23, 2019
2d98bce
feat: Update url to show display of connected devices (#2316)
atm1504 Jul 23, 2019
23ee126
chore(deps): bump realm-gradle-plugin from 5.12.0 to 5.13.0 (#2318)
dependabot-preview[bot] Jul 24, 2019
18dc0a2
chore: Update version number (#2322)
atm1504 Jul 26, 2019
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
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,24 @@ Our chat channel is on gitter here: https://gitter.im/fossasia/susi_android

<table>
<tr>
<td><img src="docs/_static/login.png" height = "480" width="270"></td>
<td><img src="docs/_static/signup.png" height = "480" width="270"></td>
<td><img src="docs/_static/voice_input.png" height = "480" width="270"></td>
<td><img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/login.png" height = "480" width="270"></td>
<td><img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/signup.png" height = "480" width="270"></td>
<td><img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/voice_input.png" height = "480" width="270"></td>
</tr>
<tr>
<td><img src="docs/_static/chat.png" height = "480" width="270"></td>
<td><img src="docs/_static/skills_list.png" height = "480" width="270"></td>
<td><img src="docs/_static/skills.png" height = "480" width="270"></td>
<td><img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/chat.png" height = "480" width="270"></td>
<td><img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/skills_list.png" height = "480" width="270"></td>
<td><img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/skills.png" height = "480" width="270"></td>
</tr>
<tr>
<td><img src="docs/_static/groupwise_skills.png" height = "480" width="270"></td>
<td><img src="docs/_static/rating_and_feedback.png" height = "480" width="270"></td>
<td><img src="docs/_static/settings1.png" height = "480" width="270"></td>
<td><img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/groupwise_skills.png" height = "480" width="270"></td>
<td><img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/rating_and_feedback.png" height = "480" width="270"></td>
<td><img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/settings1.png" height = "480" width="270"></td>
</tr>
<tr>
<td><img src="docs/_static/settings2.png" height = "480" width="270"></td>
<td><img src="docs/_static/help.png" height = "480" width="270"></td>
<td><img src="docs/_static/privacy.png" height = "480" width="270"></td>
<td><img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/settings2.png" height = "480" width="270"></td>
<td><img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/help.png" height = "480" width="270"></td>
<td><img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/privacy.png" height = "480" width="270"></td>
</tr>
</table>

Expand Down
10 changes: 6 additions & 4 deletions app/build.gradle
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.diffplug.gradle.spotless" version "3.23.0"
id "com.diffplug.gradle.spotless" version "3.23.1"
}

def rootConfiguration = {}
Expand All @@ -22,8 +22,8 @@ android {
applicationId "ai.susi"
minSdkVersion rootConfiguration.minSdkVersion
targetSdkVersion rootConfiguration.targetSdkVersion
versionCode 17
versionName "1.2.0"
versionCode 18
versionName "1.3.0"
vectorDrawables.useSupportLibrary = true
// for unit test
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -151,7 +151,9 @@ dependencies {
implementation "com.jakewharton.timber:timber:${rootConfiguration.timberVersion}"

//Shimmer
implementation 'com.facebook.shimmer:shimmer:0.4.0'
implementation "com.facebook.shimmer:shimmer:${rootConfiguration.shimmerVersion}"

//Smart LOck authentication
implementation "com.google.android.gms:play-services-auth:${rootConfiguration.playServiceAuthVersion}"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${rootConfiguration.kotlinVersion}"
}
2 changes: 2 additions & 0 deletions app/config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ ext {
customTabsVersion = '28.0.0'
jUnitVersion = '4.12'
mockitoCoreVersion = '1.10.19'
playServiceAuthVersion='16.0.1'
shimmerVersion = "0.5.0"
}
9 changes: 9 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:networkSecurityConfig="@xml/network_security_config"
android:vmSafeMode="true">
<activity android:name=".chat.search.ChatSearchActivity"></activity>
<activity
Expand Down Expand Up @@ -93,6 +94,14 @@
android:value="org.fossasia.susi.ai.login.LoginActivity" />
</activity>

<activity android:name=".device.managedevices.ManageDeviceActivity"
android:label="Manage Devices"
android:theme="@style/PreferencesThemeLight">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.fossasia.susi.ai.skills.SkillsActivity" />
</activity>

<activity
android:name=".skills.feedback.FeedbackActivity"
android:label="See All Reviews"
Expand Down
11 changes: 6 additions & 5 deletions app/src/main/java/org/fossasia/susi/ai/chat/ChatActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,9 @@ class ChatActivity : AppCompatActivity(), IChatView {
setUpUI()
initializationMethod(firstRun)

example = if (intent.getStringExtra("example") != null) {
intent.getStringExtra("example")
} else {
""
if (intent.hasExtra("example")) {
example = intent.getStringExtra("example")
intent.removeExtra("example")
}

networkStateReceiver = object : BroadcastReceiver() {
Expand All @@ -114,7 +113,7 @@ class ChatActivity : AppCompatActivity(), IChatView {
}
searchChat.visibility = View.VISIBLE
fabsetting.visibility = View.VISIBLE
voiceSearchChat.visibility = View.GONE
voiceSearchChat.visibility = View.VISIBLE
}

override fun onTouchEvent(event: MotionEvent): Boolean {
Expand Down Expand Up @@ -356,6 +355,7 @@ class ChatActivity : AppCompatActivity(), IChatView {
hideSoftKeyboard(this, window.decorView)
searchChat.visibility = View.GONE
fabsetting.visibility = View.GONE
voiceSearchChat.visibility = View.GONE
val fragmentTransaction = supportFragmentManager.beginTransaction()
fragmentTransaction.replace(R.id.speechToTextFrame, STTFragment())
fragmentTransaction.addToBackStack(null)
Expand Down Expand Up @@ -550,6 +550,7 @@ class ChatActivity : AppCompatActivity(), IChatView {
chatPresenter.getUndeliveredMessages()

if (!example.isEmpty()) {
Timber.d("Message is not empty.")
chatPresenter.addToNonDeliveredList(example, example)
example = ""
}
Expand Down
62 changes: 59 additions & 3 deletions app/src/main/java/org/fossasia/susi/ai/chat/STTfragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ package org.fossasia.susi.ai.chat
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.os.Handler
import android.speech.RecognitionListener
import android.speech.RecognizerIntent
import android.speech.SpeechRecognizer
import android.speech.tts.TextToSpeech
import android.support.annotation.NonNull
import android.support.v4.app.Fragment
import android.support.v7.widget.LinearLayoutManager
Expand All @@ -19,7 +21,9 @@ import kotlinx.android.synthetic.main.fragment_sttframe.view.*
import org.fossasia.susi.ai.R
import org.fossasia.susi.ai.chat.adapters.recycleradapters.VoiceCommandsAdapter
import org.fossasia.susi.ai.chat.contract.IChatPresenter
import org.fossasia.susi.ai.helper.PrefManager
import timber.log.Timber
import java.util.Locale

/**
* Created by meeera on 17/8/17.
Expand All @@ -28,6 +32,9 @@ class STTFragment : Fragment() {
lateinit var recognizer: SpeechRecognizer
lateinit var chatPresenter: IChatPresenter
private val thisActivity = activity
private var textToSpeech: TextToSpeech? = null
private val mainHandler: Handler = Handler()
private val subHandler: Handler = Handler()

override fun onAttach(context: Context?) {
super.onAttach(context)
Expand All @@ -39,27 +46,60 @@ class STTFragment : Fragment() {
val rootView = inflater.inflate(R.layout.fragment_sttframe, container, false)
if (thisActivity is ChatActivity)
thisActivity.fabsetting.hide()
promptSpeechInput()
setupCommands(rootView)
return rootView
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

recognizer = SpeechRecognizer
.createSpeechRecognizer(activity?.applicationContext)

mainHandler.post(runnable)
if (!PrefManager.getBoolean(R.string.used_voice, true)) {
subHandler.postDelayed(delayRunnable, 1500)
}

super.onViewCreated(view, savedInstanceState)
}

private val runnable: Runnable = Runnable {
textToSpeech = TextToSpeech(requireContext(), TextToSpeech.OnInitListener { status ->
if (status != TextToSpeech.ERROR) {
val locale = textToSpeech?.language
textToSpeech?.language = locale
if (!PrefManager.getBoolean(R.string.used_voice, false)) {
textToSpeech?.speak(getString(R.string.voice_welcome), TextToSpeech.QUEUE_FLUSH, null)
PrefManager.putBoolean(R.string.used_voice, true)
} else {
promptSpeechInput()
}
}
})
}

private val delayRunnable: Runnable = Runnable {
promptSpeechInput()
}

private fun setupCommands(rootView: View) {
var voiceCommand = getResources().getStringArray(R.array.voiceCommands)
var voiceCommandsList = voiceCommand.toCollection(ArrayList())
rootView.clickableCommands.layoutManager = LinearLayoutManager(activity, LinearLayoutManager.HORIZONTAL, false)
rootView.clickableCommands.adapter = VoiceCommandsAdapter(voiceCommandsList, activity)
}

private fun promptSpeechInput() {
val intent = Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH)
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM)
intent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE,
"com.domain.app")
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault())
intent.putExtra(RecognizerIntent.EXTRA_PARTIAL_RESULTS, true)
intent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS, 5000)
intent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS, 5000)

recognizer = SpeechRecognizer
.createSpeechRecognizer(activity?.applicationContext)
val listener = object : RecognitionListener {
override fun onResults(results: Bundle) {
val voiceResults = results
Expand All @@ -81,6 +121,9 @@ class STTFragment : Fragment() {
chatPresenter.startHotwordDetection()
}
(activity as ChatActivity).fabsetting.show()
activity?.searchChat?.show()
activity?.voiceSearchChat?.show()
activity?.btnSpeak?.isEnabled = true
activity?.supportFragmentManager?.popBackStackImmediate()
}

Expand All @@ -94,6 +137,10 @@ class STTFragment : Fragment() {
speechProgress?.onResultOrOnError()
recognizer.destroy()
activity?.fabsetting?.show()
activity?.searchChat?.show()
activity?.voiceSearchChat?.show()
activity?.btnSpeak?.isEnabled = true
chatPresenter.startHotwordDetection()
activity?.supportFragmentManager?.popBackStackImmediate()
}

Expand Down Expand Up @@ -134,7 +181,16 @@ class STTFragment : Fragment() {
thisActivity.enableVoiceInput()
thisActivity.fabsetting.show()
}
if (textToSpeech != null) {
textToSpeech?.stop()
}
recognizer.cancel()
recognizer.destroy()
}

override fun onDestroyView() {
super.onDestroyView()
mainHandler.removeCallbacks(runnable)
subHandler.removeCallbacks(delayRunnable)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import kotlinx.android.synthetic.main.activity_chat.searchChat
import kotlinx.android.synthetic.main.activity_chat.voiceSearchChat
import kotlinx.android.synthetic.main.activity_chat.fabsetting
import kotlinx.android.synthetic.main.activity_chat.btnSpeak
import kotlinx.android.synthetic.main.item_voice_commands.view.voiceCommand
import org.fossasia.susi.ai.R
import org.fossasia.susi.ai.chat.ChatActivity
import org.fossasia.susi.ai.chat.ChatPresenter
import org.fossasia.susi.ai.chat.contract.IChatPresenter

Expand All @@ -32,13 +37,16 @@ class VoiceCommandsAdapter(val items: ArrayList<String>, val context: Context?)
val voiceCommand: TextView = view.voiceCommand

init {
view.setOnClickListener {
val chatMessage = items[adapterPosition]
val splits = chatMessage.split("\n".toRegex()).dropLastWhile { it.isEmpty() }
val message = splits.joinToString(" ")
if (!chatMessage.isEmpty()) {
chatPresenter.sendMessage(message, items[adapterPosition])
}
voiceCommand.setOnClickListener {
val message = items[adapterPosition]
val this_activity = context
(this_activity as ChatActivity).setText(message)
this_activity.searchChat.show()
this_activity.voiceSearchChat.show()
this_activity.fabsetting.show()
this_activity.btnSpeak.isEnabled = true
chatPresenter.startHotwordDetection()
this_activity.supportFragmentManager.popBackStackImmediate()
}
}
}
Expand Down
Loading