Skip to content

Commit 3187d6d

Browse files
committed
adjust android app
1 parent 04c35f1 commit 3187d6d

File tree

66 files changed

+271
-260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+271
-260
lines changed

sample-app-android/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This application demonstrates it is possible to load data from Kontent using Jav
2323
2424
### Data loading using RxJava
2525

26-
All the data loaded from Kontent is using [RxJava](https://github.com/ReactiveX/RxJava) approach. Basically, the `CompletionStage` returned from Kontent Java SDK is wrapped to the `Observable`. This allows to easily synchronize IO and UI operation with proper thread. Take a look i.e. to [`ArticlesKontentSource#getArticles` method](./src/main/java/com/github/kentico/delivery_android_sample/data/source/articles/ArticlesKontentSource.java#L40) to see the actual implementation using `io.reactivex.rxjava3:rxjava` and `io.reactivex.rxjava3:rxandroid` packages.
26+
All the data loaded from Kontent is using [RxJava](https://github.com/ReactiveX/RxJava) approach. Basically, the `CompletionStage` returned from Kontent Java SDK is wrapped to the `Observable`. This allows to easily synchronize IO and UI operation with proper thread. Take a look i.e. to [`ArticlesKontentSource#getArticles` method](src/main/java/kontent/ai/data/source/articles/ArticlesKontentSource.java#L40) to see the actual implementation using `io.reactivex.rxjava3:rxjava` and `io.reactivex.rxjava3:rxandroid` packages.
2727

2828
```java
2929
Observable.fromCompletionStage(client.getItems(Article.class))

sample-app-android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ android {
4040
versionCode 1
4141
versionName "1.0"
4242
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
43-
applicationId 'com.github.kentico.delivery_android_sample'
43+
applicationId 'kontent.ai.delivery_android_sample'
4444
}
4545
buildTypes {
4646
release {

sample-app-android/google-services.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
{
22
"project_info": {
33
"project_number": "570480954854",
4-
"firebase_url": "https://kenticosampleandroiddg-178508.firebaseio.com",
5-
"project_id": "kenticosampleandroiddg-178508",
6-
"storage_bucket": "kenticosampleandroiddg-178508.appspot.com"
4+
"firebase_url": "https://kontent-ai-sampleandroiddg-178508.firebaseio.com",
5+
"project_id": "kontent-ai-sampleandroiddg-178508",
6+
"storage_bucket": "kontent-ai-sampleandroiddg-178508.appspot.com"
77
},
88
"client": [
99
{
1010
"client_info": {
1111
"mobilesdk_app_id": "1:570480954854:android:43635e8f375869fe",
1212
"android_client_info": {
13-
"package_name": "com.github.kentico.delivery_android_sample"
13+
"package_name": "kontent.ai.delivery_android_sample"
1414
}
1515
},
1616
"oauth_client": [
1717
{
1818
"client_id": "570480954854-kebeh99nj79dprfqq700a6t8rehg1o4h.apps.googleusercontent.com",
1919
"client_type": 1,
2020
"android_info": {
21-
"package_name": "com.github.kentico.delivery_android_sample",
21+
"package_name": "kontent.ai.delivery_android_sample",
2222
"certificate_hash": "8aa02fc7b18bd37f617c08eaf96edd5c788872ba"
2323
}
2424
},
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019 Kentico s.r.o. and Richard Sustek
2+
* Copyright 2022 Kontent s.r.o.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
55
*
@@ -8,7 +8,7 @@
88
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
99
*/
1010

11-
package com.github.kentico.delivery_android_sample;
11+
package kontent.ai.delivery_android_sample;
1212

1313
import android.content.Context;
1414
import android.support.test.InstrumentationRegistry;
@@ -31,6 +31,6 @@ public void useAppContext() throws Exception {
3131
// Context of the app under test.
3232
Context appContext = InstrumentationRegistry.getTargetContext();
3333

34-
assertEquals("com.github.kentico.sample-app-android", appContext.getPackageName());
34+
assertEquals("kontent.ai.sample-app-android", appContext.getPackageName());
3535
}
3636
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
99
*/
1010

11-
package com.github.kentico.delivery_android_sample.tests;
11+
package kontent.ai.delivery_android_sample.tests;
1212

1313
import org.junit.Test;
1414

sample-app-android/src/main/AndroidManifest.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1010
-->
1111
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
12-
package="com.github.kentico.delivery_android_sample">
12+
package="kontent.ai.delivery_android_sample">
1313
<uses-permission android:name="android.permission.INTERNET"/>
1414
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
1515
<uses-permission android:name="android.permission.VIBRATE"/>
@@ -19,43 +19,43 @@
1919
android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true"
2020
android:theme="@style/AppTheme">
2121
<meta-data android:name="com.google.android.geo.API_KEY" android:value="@string/config_google_API_key"/>
22-
<activity android:name="com.github.kentico.delivery_android_sample.app.articles.ArticlesActivity"
22+
<activity android:name="kontent.ai.delivery_android_sample.app.articles.ArticlesActivity"
2323
android:label="@string/app_main_activity_title" android:theme="@style/AppTheme.NoActionBar">
2424
<intent-filter>
2525
<action android:name="android.intent.action.MAIN"/>
2626
<category android:name="android.intent.category.LAUNCHER"/>
2727
</intent-filter>
2828
</activity>
29-
<activity android:name="com.github.kentico.delivery_android_sample.app.cafes.CafesActivity"
29+
<activity android:name="kontent.ai.delivery_android_sample.app.cafes.CafesActivity"
3030
android:theme="@style/AppTheme.NoActionBar">
3131
</activity>
32-
<activity android:name="com.github.kentico.delivery_android_sample.app.article_detail.ArticleDetailActivity"
32+
<activity android:name="kontent.ai.delivery_android_sample.app.article_detail.ArticleDetailActivity"
3333
android:theme="@style/AppTheme.NoActionBar"
34-
android:parentActivityName="com.github.kentico.delivery_android_sample.app.articles.ArticlesActivity">
34+
android:parentActivityName="kontent.ai.delivery_android_sample.app.articles.ArticlesActivity">
3535
</activity>
36-
<activity android:name="com.github.kentico.delivery_android_sample.app.cafe_detail.CafeDetailActivity"
36+
<activity android:name="kontent.ai.delivery_android_sample.app.cafe_detail.CafeDetailActivity"
3737
android:theme="@style/AppTheme.NoActionBar"
38-
android:parentActivityName="com.github.kentico.delivery_android_sample.app.cafes.CafesActivity">
38+
android:parentActivityName="kontent.ai.delivery_android_sample.app.cafes.CafesActivity">
3939
</activity>
40-
<activity android:name="com.github.kentico.delivery_android_sample.app.coffees.CoffeesActivity"
40+
<activity android:name="kontent.ai.delivery_android_sample.app.coffees.CoffeesActivity"
4141
android:theme="@style/AppTheme.NoActionBar">
4242
</activity>
43-
<activity android:name="com.github.kentico.delivery_android_sample.app.coffee_detail.CoffeeDetailActivity"
43+
<activity android:name="kontent.ai.delivery_android_sample.app.coffee_detail.CoffeeDetailActivity"
4444
android:theme="@style/AppTheme.NoActionBar"
45-
android:parentActivityName="com.github.kentico.delivery_android_sample.app.coffees.CoffeesActivity">
45+
android:parentActivityName="kontent.ai.delivery_android_sample.app.coffees.CoffeesActivity">
4646
</activity>
4747
<uses-library
4848
android:name="org.apache.http.legacy"
4949
android:required="false"/>
5050

5151
<!-- <service-->
52-
<!-- android:name="com.github.kentico.delivery_android_sample.app.notifications.DGFirebaseMessagingService">-->
52+
<!-- android:name="kontent.ai.delivery_android_sample.app.notifications.DGFirebaseMessagingService">-->
5353
<!-- <intent-filter>-->
5454
<!-- <action android:name="com.google.firebase.MESSAGING_EVENT"/>-->
5555
<!-- </intent-filter>-->
5656
<!-- </service>-->
5757
<!-- <service-->
58-
<!-- android:name="com.github.kentico.delivery_android_sample.app.notifications.DGFirebaseInstanceIDService">-->
58+
<!-- android:name="kontent.ai.delivery_android_sample.app.notifications.DGFirebaseInstanceIDService">-->
5959
<!-- <intent-filter>-->
6060
<!-- <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>-->
6161
<!-- </intent-filter>-->
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
99
*/
1010

11-
package com.github.kentico.delivery_android_sample.app.article_detail;
11+
package kontent.ai.delivery_android_sample.app.article_detail;
1212

1313
import android.os.Bundle;
14-
import com.github.kentico.delivery_android_sample.R;
15-
import com.github.kentico.delivery_android_sample.app.core.BaseActivity;
16-
import com.github.kentico.delivery_android_sample.app.shared.CommunicationHub;
17-
import com.github.kentico.delivery_android_sample.data.source.articles.ArticlesKontentSource;
18-
import com.github.kentico.delivery_android_sample.data.source.articles.ArticlesRepository;
19-
import com.github.kentico.delivery_android_sample.util.ActivityUtils;
14+
import kontent.ai.delivery_android_sample.R;
15+
import kontent.ai.delivery_android_sample.app.core.BaseActivity;
16+
import kontent.ai.delivery_android_sample.app.shared.CommunicationHub;
17+
import kontent.ai.delivery_android_sample.data.source.articles.ArticlesKontentSource;
18+
import kontent.ai.delivery_android_sample.data.source.articles.ArticlesRepository;
19+
import kontent.ai.delivery_android_sample.util.ActivityUtils;
2020

2121
public class ArticleDetailActivity extends BaseActivity{
2222

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
99
*/
1010

11-
package com.github.kentico.delivery_android_sample.app.article_detail;
11+
package kontent.ai.delivery_android_sample.app.article_detail;
1212

13-
import com.github.kentico.delivery_android_sample.app.core.IBasePresenter;
14-
import com.github.kentico.delivery_android_sample.app.core.IBaseView;
15-
import com.github.kentico.delivery_android_sample.data.models.Article;
13+
import kontent.ai.delivery_android_sample.app.core.IBasePresenter;
14+
import kontent.ai.delivery_android_sample.app.core.IBaseView;
15+
import kontent.ai.delivery_android_sample.data.models.Article;
1616

1717
interface ArticleDetailContract {
1818
interface View extends IBaseView<Presenter> {
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
99
*/
1010

11-
package com.github.kentico.delivery_android_sample.app.article_detail;
11+
package kontent.ai.delivery_android_sample.app.article_detail;
1212

1313
import android.os.Build;
1414
import android.support.annotation.RequiresApi;
1515
import android.text.Html;
1616
import android.view.View;
1717
import android.widget.ImageView;
1818
import android.widget.TextView;
19-
import com.github.kentico.delivery_android_sample.R;
20-
import com.github.kentico.delivery_android_sample.app.core.BaseFragment;
21-
import com.github.kentico.delivery_android_sample.data.models.Article;
19+
import kontent.ai.delivery_android_sample.R;
20+
import kontent.ai.delivery_android_sample.app.core.BaseFragment;
21+
import kontent.ai.delivery_android_sample.data.models.Article;
2222
import com.squareup.picasso.Picasso;
2323

2424
import java.time.format.DateTimeFormatter;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
99
*/
1010

11-
package com.github.kentico.delivery_android_sample.app.article_detail;
11+
package kontent.ai.delivery_android_sample.app.article_detail;
1212

1313
import android.support.annotation.NonNull;
14-
import com.github.kentico.delivery_android_sample.data.models.Article;
15-
import com.github.kentico.delivery_android_sample.data.source.articles.ArticlesDataSource;
16-
import com.github.kentico.delivery_android_sample.data.source.articles.ArticlesRepository;
14+
import kontent.ai.delivery_android_sample.data.models.Article;
15+
import kontent.ai.delivery_android_sample.data.source.articles.ArticlesDataSource;
16+
import kontent.ai.delivery_android_sample.data.source.articles.ArticlesRepository;
1717

1818
import static com.google.common.base.Preconditions.checkNotNull;
1919

0 commit comments

Comments
 (0)