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

Places plugin #171

Merged
merged 30 commits into from
Dec 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1c8241d
Initial project started
Nov 16, 2017
b441f7e
Added more views
Nov 16, 2017
fd4b3d8
progress
Nov 17, 2017
16a8d37
added second search style
Nov 19, 2017
5ca81dd
Finished results card view
Nov 19, 2017
04ccf56
Added ability to add cards
Nov 19, 2017
cdb9d50
initial work completed
Nov 27, 2017
40de603
Merge branch 'master' into cam-plugin-places
Nov 27, 2017
23e8dab
fixed dependency issue
Nov 27, 2017
b6cae51
initial coded cleanup started
Nov 27, 2017
cae63df
removed access token
Nov 27, 2017
68f9242
cleaned up manifest file
Nov 27, 2017
5be43fe
added room schema to VCS
Nov 27, 2017
63f411e
code clean up
Nov 28, 2017
b0843b4
Added missing files
Nov 28, 2017
6a9c916
Fixed search view margins
Nov 28, 2017
9a528d2
checkstyle
Nov 29, 2017
c2058f5
Introduce more android arch component
Nov 30, 2017
4199510
Merge branch 'master' into cam-plugin-places
Nov 30, 2017
9533458
added package-info and fixed deleting entire search history db
Nov 30, 2017
f15a1dd
cleaned up code a bit
Nov 30, 2017
8bee62d
sonarqube fixes
Nov 30, 2017
c38c40e
remove mapboxGeocoding dependency in test app
Nov 30, 2017
55ddbf7
final fixes before initial review
Nov 30, 2017
eec268b
fixed checkstyle issue
Nov 30, 2017
d7bba35
Adding places plugin docs (#173)
Nov 30, 2017
fd2498e
Merge branch 'cam-plugin-places' of https://github.com/mapbox/mapbox-…
Nov 30, 2017
409d867
Merge branch 'master' into cam-plugin-places
Dec 1, 2017
b263aee
fixed string id
Dec 1, 2017
e9480be
Merge branch 'master' into cam-plugin-places
Dec 1, 2017
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
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ test:
./gradlew :plugin-locationlayer:test
./gradlew :plugin-building:test
./gradlew :plugin-cluster:test
./gradlew :plugin-places:test
./gradlew :plugin-offline:test

build-release:
Expand All @@ -18,6 +19,7 @@ build-release:
./gradlew :plugin-locationlayer:assembleRelease
./gradlew :plugin-building:assembleRelease
./gradlew :plugin-cluster:assembleRelease
./gradlew :plugin-places:assembleRelease
./gradlew :plugin-offline:assembleRelease

javadoc:
Expand All @@ -28,6 +30,7 @@ javadoc:
./gradlew :plugin-locationlayer:javadocrelease
./gradlew :plugin-building:javadocrelease
./gradlew :plugin-cluster:javadocrelease
./gradlew :plugin-places:javadocrelease
./gradlew :plugin-offline:javadocrelease

publish:
Expand All @@ -36,6 +39,7 @@ publish:
export IS_LOCAL_DEVELOPMENT=false; ./gradlew :plugin-locationlayer:uploadArchives
export IS_LOCAL_DEVELOPMENT=false; ./gradlew :plugin-building:uploadArchives
export IS_LOCAL_DEVELOPMENT=false; ./gradlew :plugin-cluster:uploadArchives
export IS_LOCAL_DEVELOPMENT=false; ./gradlew :plugin-places:uploadArchives
export IS_LOCAL_DEVELOPMENT=false; ./gradlew :plugin-offline:uploadArchives

publish-local:
Expand All @@ -45,4 +49,5 @@ publish-local:
export IS_LOCAL_DEVELOPMENT=true; ./gradlew :plugin-locationlayer:uploadArchives
export IS_LOCAL_DEVELOPMENT=true; ./gradlew :plugin-building:uploadArchives
export IS_LOCAL_DEVELOPMENT=true; ./gradlew :plugin-cluster:uploadArchives
export IS_LOCAL_DEVELOPMENT=true; ./gradlew :plugin-places:uploadArchives
export IS_LOCAL_DEVELOPMENT=true; ./gradlew :plugin-offline:uploadArchives
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Plugins are single-purpose libraries built on top of the [Mapbox Maps SDK for An

* [**Marker cluster:** Add marker/markerview clusters to display a large number of points on a map.](https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-cluster)

* [**Places:** Add location search to your app with beautiful UI.](https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-places)

## Installing a plugin

By using a plugin, you also include the Android Map SDK which means that you'll need to setup your project to use the Map SDK if you haven't already. Head over to the [overview page for the Mapbox Maps SDK](https://www.mapbox.com/android-docs/map-sdk/overview/) to learn more.
Expand All @@ -54,7 +56,6 @@ dependencies {
```
5. Click the Sync Project with Gradle Files near the toolbar in Studio.


## Help and Usage

This repository includes an app that shows how to use each plugins in this repository. [Check out its code](https://github.com/mapbox/mapbox-plugins-android/tree/master/app/src/main/java/com/mapbox/mapboxsdk/plugins/testapp) for ready-to-use snippets.
Expand Down
4 changes: 4 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ dependencies {
// Mapbox
implementation dependenciesList.mapboxMapSdk
implementation dependenciesList.mapboxServices
implementation dependenciesList.mapboxGeocoding

implementation dependenciesList.lifecycleExtensions

// Support libraries
implementation dependenciesList.supportAnnotation
Expand Down Expand Up @@ -73,6 +76,7 @@ dependencies {
implementation project(':plugin-building')
implementation project(':plugin-geojson')
implementation project(':plugin-cluster')
implementation project(':plugin-places')
implementation project(':plugin-offline')
}

Expand Down
319 changes: 163 additions & 156 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,160 +2,167 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mapbox.mapboxsdk.plugins.testapp">

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<application
android:name=".PluginApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">

<activity android:name=".activity.FeatureOverviewActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>

<activity
android:name=".activity.TrafficActivity"
android:description="@string/description_traffic"
android:label="@string/title_traffic">
<meta-data
android:name="@string/category"
android:value="@string/category_navigation"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>

<activity
android:name=".activity.BuildingActivity"
android:description="@string/description_building"
android:label="@string/title_building">
<meta-data
android:name="@string/category"
android:value="@string/category_extrusions"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>

<activity
android:name=".activity.location.LocationLayerModesActivity"
android:description="@string/description_location_modes"
android:label="@string/title_location_modes">
<meta-data
android:name="@string/category"
android:value="@string/category_location"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>

<activity
android:name=".activity.location.LocationLayerMapChangeActivity"
android:description="@string/description_location_map_change"
android:label="@string/title_location_map_change">
<meta-data
android:name="@string/category"
android:value="@string/category_location"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>

<activity
android:name=".activity.location.ManualLocationUpdatesActivity"
android:description="@string/description_location_manual_update"
android:label="@string/title_location_manual_update">
<meta-data
android:name="@string/category"
android:value="@string/category_location"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>

<activity
android:name=".activity.location.CompassListenerActivity"
android:description="@string/description_compass_listener"
android:label="@string/title_compass_listener">
<meta-data
android:name="@string/category"
android:value="@string/category_location"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>

<activity
android:name=".activity.GeoJsonActivity"
android:description="@string/description_geojson"
android:label="@string/title_geojson">
<meta-data
android:name="@string/category"
android:value="@string/category_annotations"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>

<activity
android:name=".activity.MarkerClusterActivity"
android:description="@string/description_cluster"
android:label="@string/title_cluster">
<meta-data
android:name="@string/category"
android:value="@string/category_annotations"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>

<activity
android:name=".activity.offline.OfflineDownloadActivity"
android:description="@string/description_offline_plugin"
android:label="@string/title_offline_plugin">
<meta-data
android:name="@string/category"
android:value="@string/category_offline"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>

<activity
android:name=".activity.offline.OfflineRegionListActivity"
android:description="@string/description_offline_regions"
android:label="@string/title_offline_regions">
<meta-data
android:name="@string/category"
android:value="@string/category_offline"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>

<activity
android:name=".activity.offline.OfflineRegionDetailActivity"
android:description="@string/description_offline_regions"
android:label="@string/title_offline_regions"
android:theme="@style/Translucent"/>

<service
android:name="com.mapbox.mapboxsdk.plugins.offline.OfflineDownloadService"
android:exported="false"/>

<receiver android:name="com.mapbox.mapboxsdk.plugins.offline.OfflineDownloadStateReceiver">
<intent-filter>
<action android:name="com.mapbox.mapboxsdk.plugins.offline"/>
</intent-filter>
</receiver>

</application>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<application
android:name=".PluginApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">

<activity android:name=".activity.FeatureOverviewActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>

<activity
android:name=".activity.places.AutocompleteLauncherActivity"
android:description="@string/description_autocomplete"
android:label="@string/title_places_autocomplete"
android:theme="@style/AppTheme.NoActionBar">
<meta-data
android:name="@string/category"
android:value="@string/category_places"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>
<activity
android:name=".activity.TrafficActivity"
android:description="@string/description_traffic"
android:label="@string/title_traffic">
<meta-data
android:name="@string/category"
android:value="@string/category_navigation"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>

<activity
android:name=".activity.BuildingActivity"
android:description="@string/description_building"
android:label="@string/title_building">
<meta-data
android:name="@string/category"
android:value="@string/category_extrusions"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>
<activity
android:name=".activity.location.LocationLayerModesActivity"
android:description="@string/description_location_modes"
android:label="@string/title_location_modes">
<meta-data
android:name="@string/category"
android:value="@string/category_location"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>
<activity
android:name=".activity.location.LocationLayerMapChangeActivity"
android:description="@string/description_location_map_change"
android:label="@string/title_location_map_change">
<meta-data
android:name="@string/category"
android:value="@string/category_location"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>
<activity
android:name=".activity.location.ManualLocationUpdatesActivity"
android:description="@string/description_location_manual_update"
android:label="@string/title_location_manual_update">
<meta-data
android:name="@string/category"
android:value="@string/category_location"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>
<activity
android:name=".activity.location.CompassListenerActivity"
android:description="@string/description_compass_listener"
android:label="@string/title_compass_listener">
<meta-data
android:name="@string/category"
android:value="@string/category_location"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>
<activity
android:name=".activity.GeoJsonActivity"
android:description="@string/description_geojson"
android:label="@string/title_geojson">
<meta-data
android:name="@string/category"
android:value="@string/category_annotations"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>

<activity
android:name=".activity.MarkerClusterActivity"
android:description="@string/description_cluster"
android:label="@string/title_cluster">
<meta-data
android:name="@string/category"
android:value="@string/category_annotations"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>

<activity
android:name=".activity.offline.OfflineDownloadActivity"
android:description="@string/description_offline_plugin"
android:label="@string/title_offline_plugin">
<meta-data
android:name="@string/category"
android:value="@string/category_offline"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>

<activity
android:name=".activity.offline.OfflineRegionListActivity"
android:description="@string/description_offline_regions"
android:label="@string/title_offline_regions">
<meta-data
android:name="@string/category"
android:value="@string/category_offline"/>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity"/>
</activity>

<activity
android:name=".activity.offline.OfflineRegionDetailActivity"
android:description="@string/description_offline_regions"
android:label="@string/title_offline_regions"
android:theme="@style/Translucent"/>

<service
android:name="com.mapbox.mapboxsdk.plugins.offline.OfflineDownloadService"
android:exported="false"/>

<receiver android:name="com.mapbox.mapboxsdk.plugins.offline.OfflineDownloadStateReceiver">
<intent-filter>
<action android:name="com.mapbox.mapboxsdk.plugins.offline"/>
</intent-filter>
</receiver>

</application>
</manifest>
Loading