forked from norkator/paketin-seuranta
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started implementing shelf code fetching from SMS messages
Signed-off-by: developerfromjokela <developerfromjokela@gmail.com>
- Loading branch information
1 parent
39df67b
commit ba9fb06
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
app/src/main/java/com/nitramite/lokerokoodi_catcher/SMSReader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright (c) 2020 | ||
* Paketin Seuranta | ||
* | ||
* @author developerfromjokela | ||
* @author norkator | ||
*/ | ||
|
||
package com.nitramite.lokerokoodi_catcher; | ||
|
||
import android.content.ContentResolver; | ||
import android.content.Context; | ||
import android.database.Cursor; | ||
import android.net.Uri; | ||
|
||
public class SMSReader { | ||
|
||
private Context context; | ||
|
||
public SMSReader(Context context) { | ||
this.context = context; | ||
} | ||
|
||
public void readSMSConversations() { | ||
// TODO check for permissions | ||
ContentResolver contentResolver = context.getContentResolver(); | ||
final String[] projection = new String[]{"*"}; | ||
Uri uri = Uri.parse("content://mms-sms/conversations/"); | ||
Cursor query = contentResolver.query(uri, projection, null, null, null); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters