Skip to content

Commit 4ab0dd7

Browse files
Merge pull request #136 from Omega-R/develop
Develop
2 parents e96662c + c2eb3f9 commit 4ab0dd7

54 files changed

Lines changed: 1814 additions & 388 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
689 Bytes
Binary file not shown.

.idea/codeStyles/Project.xml

Lines changed: 134 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jarRepositories.xml

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
buildscript {
44

5-
ext.kotlin_version = '1.3.11'
5+
ext.kotlin_version = '1.3.61'
66
ext.androidX = '1.0.2'
77
ext.sdkVersion = 28
88
ext.javapoet = '1.9.0'
@@ -12,7 +12,7 @@ buildscript {
1212
jcenter()
1313
}
1414
dependencies {
15-
classpath 'com.android.tools.build:gradle:3.2.1'
15+
classpath 'com.android.tools.build:gradle:3.5.3'
1616
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1717
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
1818

core/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies {
3636
implementation fileTree(dir: 'libs', include: ['*.jar'])
3737
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
3838
implementation 'com.github.Omega-R:OmegaLaunchers:1.0.2'
39-
api 'com.github.Omega-R.OmegaTypes:omegatypes:1.0.2'
39+
api 'com.github.Omega-R.OmegaTypes:omegatypes:6801f9f'
4040

4141
compileOnly "androidx.appcompat:appcompat:$androidX"
4242
}

core/src/main/AndroidManifest.xml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,27 @@
22
xmlns:tools="http://schemas.android.com/tools"
33
package="com.omega_r.libs.omegaintentbuilder">
44

5-
<uses-permission android:name="android.permission.INTERNET"/>
6-
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
7-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
5+
<uses-permission android:name="android.permission.INTERNET" />
6+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
7+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
8+
<uses-permission android:name="com.android.alarm.permission.SET_ALARM" />
89

910
<application>
1011
<provider
1112
android:name="com.omega_r.libs.omegaintentbuilder.providers.FileProvider"
1213
android:authorities="${applicationId}.${omegaSuffixAuthority}"
13-
android:grantUriPermissions="true"
14-
android:exported="false">
14+
android:exported="false"
15+
android:grantUriPermissions="true">
1516

1617
<meta-data
1718
android:name="android.support.FILE_PROVIDER_PATHS"
18-
android:resource="@xml/omega_file_paths"/>
19+
android:resource="@xml/omega_file_paths" />
1920

2021
</provider>
2122

22-
<activity android:name=".handlers.OmegaHandleResultActivity"
23-
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"/>
23+
<activity
24+
android:name=".handlers.OmegaHandleResultActivity"
25+
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
2426
</application>
2527

2628
</manifest>

core/src/main/java/com/omega_r/libs/omegaintentbuilder/OmegaIntentBuilder.kt

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@ package com.omega_r.libs.omegaintentbuilder
1414
import android.app.Activity
1515
import android.app.Service
1616
import android.net.Uri
17+
import android.os.Build
18+
import androidx.annotation.RequiresApi
1719
import com.omega_r.libs.omegaintentbuilder.builders.*
1820
import com.omega_r.libs.omegaintentbuilder.builders.pick.PickBuilder
1921
import com.omega_r.libs.omegaintentbuilder.builders.share.EmailIntentBuilder
2022
import com.omega_r.libs.omegaintentbuilder.builders.share.ShareIntentBuilder
2123
import com.omega_r.libs.omegaintentbuilder.types.CalendarActionTypes
2224
import com.omega_r.libs.omegaintentbuilder.types.MapTypes
25+
import com.omega_r.libs.omegaintentbuilder.types.ShowType
2326

2427
/**
2528
* OmegaIntentBuilder class for creating supports createdIntent builders.
@@ -39,6 +42,9 @@ object OmegaIntentBuilder {
3942
@JvmStatic
4043
fun share() = ShareIntentBuilder()
4144

45+
@JvmStatic
46+
fun view() = ViewIntentBuilder()
47+
4248
/**
4349
* @return ShareIntentBuilder for creating email Intent
4450
*/
@@ -135,4 +141,48 @@ object OmegaIntentBuilder {
135141
@JvmStatic
136142
fun speechToText() = SpeechToTextBuilder()
137143

144+
/**
145+
* @return InsertContactIntentBuilder
146+
*/
147+
@JvmStatic
148+
fun insertContact() = InsertContactIntentBuilder()
149+
150+
/**
151+
* @return AlarmIntentBuilder
152+
*/
153+
@JvmStatic
154+
@RequiresApi(Build.VERSION_CODES.KITKAT)
155+
fun createTimer() = TimerIntentBuilder()
156+
157+
/**
158+
* @return SearchWebIntentBuilder
159+
*/
160+
@JvmStatic
161+
fun searchWeb() = SearchWebIntentBuilder()
162+
163+
/**
164+
* @return AlarmIntentBuilder
165+
*/
166+
@JvmStatic
167+
@RequiresApi(Build.VERSION_CODES.KITKAT)
168+
fun createAlarm() = AlarmIntentBuilder()
169+
170+
/**
171+
* @return ShowAlarmsTimersIntentBuilder
172+
*/
173+
@JvmStatic
174+
fun showTimers() = ShowAlarmsTimersIntentBuilder(ShowType.TIMERS)
175+
176+
/**
177+
* @return ShowAlarmsTimersIntentBuilder
178+
*/
179+
@JvmStatic
180+
fun showAlarms() = ShowAlarmsTimersIntentBuilder(ShowType.ALARMS)
181+
182+
/**
183+
* @return VideoRecordBuilder
184+
*/
185+
@JvmStatic
186+
fun recordVideo() = VideoRecordBuilder()
187+
138188
}

core/src/main/java/com/omega_r/libs/omegaintentbuilder/builders/ActivityIntentBuilder.kt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ import com.omega_r.libs.omegaintentbuilder.handlers.ActivityIntentHandler
1717
import com.omega_r.libs.omegaintentbuilder.handlers.ContextIntentHandler
1818
import com.omega_r.libs.omegaintentbuilder.handlers.FragmentIntentHandler
1919
import com.omega_r.libs.omegaintentbuilder.handlers.SupportFragmentIntentHandler
20-
import com.omega_r.libs.omegaintentbuilder.interfaces.IntentHandler
20+
import com.omega_r.libs.omegaintentbuilder.interfaces.IntentHandlerBuilder
2121

2222
class ActivityIntentBuilder<T : Activity>(
2323
activity: Class<T>
24-
) : BaseIntentBuilder<ActivityIntentBuilder<T>, T>(activity), IntentHandler {
24+
) : BaseIntentBuilder<ActivityIntentBuilder<T>, T>(activity), IntentHandlerBuilder {
2525

2626
override fun createIntentHandler(context: Context): ContextIntentHandler {
2727
return ContextIntentHandler(context, createIntent(context))
@@ -39,9 +39,4 @@ class ActivityIntentBuilder<T : Activity>(
3939
return SupportFragmentIntentHandler(fragment, createIntent(fragment.activity!!))
4040
}
4141

42-
override fun startActivity(context: Context) {
43-
createIntentHandler(context)
44-
.startActivity()
45-
}
46-
4742
}

0 commit comments

Comments
 (0)